...

View Full Version : Vb



WNxPunk
05-01-2004, 05:50 PM
I'm currently trying to code this VB script with allowed's me to load up another VB box with all the data from the first box in the other box.. how can I do that?

WNxPunk
05-01-2004, 08:22 PM
I got it to exit out of it self but not load the second dialog



Private Sub ComButton1_Click()
'Hide Dialog One
Unload D1
'Load Dialog Two
Load D2
End Sub

sage45
05-02-2004, 05:48 AM
Well you have to think logically...

When you unload the original box, you no longer have a call to load the second box in memory... To accomplish what you are wanting to do there are a couple of things you can do...

First scenario:

Load the second dialog and make the first dialog disabled... When you do this, have the second dialog grab the information you need and then close the first dialog from the second dialog (this is usually the easiest and cleanest way to acomplish this and is generally preferred by programers)...

Second scenario:

Load the second dialog from the first dialog, transfer the information from within the first dialog to the second dialog, then close the first dialog from the first dialog... (more confusing and a little dirtier)

HTH,

-sage-

shmoove
05-02-2004, 09:27 AM
Loading a form isn't enough, it just loads the form into memory. You forgot to show the form (D2.Show).

shmoove



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum