Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to open another vb application by form

Status
Not open for further replies.

bantakiah

Programmer
Oct 1, 2006
48
ID
1. I use vb 6.0 and access database. my problem is how if i want access my program use other computer which connected with network
2. i have 2 application vb how to open another program by form. for example : i open vb application A. and then i click one button to open vb application B
3. if i have open 1 form how code so i can open another form and close other form which not active


thanks a lot you all
 
There are many ways to do this, but probably the shell command is the easiest. This is for opening one program from another.

A better way would be to create a DLL or Com object as one of the applications. Much easier to call and you'll have more control.

Code:
Dim Ret
Ret = Shell("FullProgamPath", vbNormalFocus)

As for your other question, opening one form from another. Place a button on one form and call it Form1. Have a second form called Form2.
Code:
Sub Button1_Click''this is on Form1
Form2.Show
Unload(Me)
End Sub

Your first question is a bit harder to answer. If the machine you are on has all the controls already loaded, you can simply find your app on the network and run it. Otherwise, you will have to setup the app on any PC that you want to run it.

I hope this helps.






Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
Thanks but to question no 2 how if i load from mdiform?
and for number 1 if 2 computer add and update record at the same time there will any error?
or i must set my access database with odbc or i can connected directly with adodc.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top