| | |
how to connect two form in single project?
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2007
Posts: 20
Reputation:
Solved Threads: 0
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
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
Last edited by sneha sirohi; Aug 2nd, 2007 at 2:03 am. Reason: some small prolem in last post
•
•
Join Date: Jul 2007
Posts: 20
Reputation:
Solved Threads: 0
•
•
•
•
Do you have any code after form2.show ? The program might show the form for a short time and then continue with the code and you don't see the form because it went so fast.
If you want form2 to show and wait for some user input try
form2.show vbmodal
It will now show and wait
Hi 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:
REgards
Veena
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:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Load Form2 Call Form2.MyProcedure
REgards
Veena
•
•
Join Date: Jul 2007
Posts: 20
Reputation:
Solved Threads: 0
•
•
•
•
Hi 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:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Load Form2 Call Form2.MyProcedure
REgards
Veena
now it's working .thank u for ur response.
![]() |
Similar Threads
- php drop down menu to search multiple sql tables (PHP)
- Error creating new ASP.Net project (ASP.NET)
- Scrolling MDI Child form (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Winsock Control for VB5
- Next Thread: How to show Access Table in a form
Views: 5215 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window





