hi friends,
i am newbie for vb.i made a program in which i want to use two forms.i made two forms and wrote code for two.in form1,when i am clicking ok next form should appear so i wrote like-"
//
Private sub ok_click()
Form2.show
End sub
//
now the next form should appear in which i have written the code for applying one company.All of the controls like "candidate name,age ,date of birth" etc. are given there.if i am running this program it is not showing any error but it is not showing form2.
we can run two form simultaneously or not.I saw in one material that we can select "project window" and we can select the required form to be run from there but i want to run both form through programming only.first form should appear when i run the program and first code will give the instruction like "Form2.show" and next form should appear.
if anyone knows the ans,tell me fast so that i can proceed further
thanks!
sneha
sneha sirohi 4 Newbie Poster
Recommended Answers
Jump to PostHi
Code is Ok.. and dont worry u can add multiple forms to ur project.
u r not able to see second form..?
Check if Form2's Visible =TrueRegards
Veena
Jump to PostHi Sneha,
to show the form:
u have to use :
Form2.Show.To Run a Procedure in Form2, first make the Procedure from Private To Public, and use this code:
Load Form2 Call Form2.MyProcedure
REgards
Veena
Jump to PostIf the form2 is not showing, try
form2.show
form2.setfocusThis should bring the form2 window in front.
All 11 Replies
QVeen72 104 Posting Shark
plusplus 0 Posting Whiz in Training
sneha sirohi 4 Newbie Poster
QVeen72 104 Posting Shark
sneha sirohi 4 Newbie Poster
aparnesh 9 Junior Poster
kinyuadave 0 Newbie Poster
kinyuadave 0 Newbie Poster
mieseth 0 Newbie Poster
kinwang2009 7 Posting Whiz in Training
Bukho 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.