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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i hide a form and load another one?

Status
Not open for further replies.

splitsie

Programmer
Jun 29, 2001
7
0
0
AU
i would really apreciate some help with loading one form and hiding another upon the pressing of a command button. also would someone be able to let me know how to set which form is loaded when the program is run

thanks in advance for the help
 
Hi splitsie

To load a form
MyForm.Show

To Hide a form
MyForm.Hide

To unload a form
Unload MyForm

Remember :
A form can be loaded without it being shown
e.g Load MyForm
or by accessing any of the forms objects
e.g MyForm.Text1.Text = "Hallo World"
This will also load your form, but it will be hidden

-- Startup Form
In your project properties, there is a dropdown with a list of startup objects. Select the form you want your application to start with.

Hope this helps
Cheers
Toyman
 
when i try to unload the form i get an error message saying....

invalid property value

the line of code i am using for the unload statement is:

If Form3.Visible = True Then "Unload (Form2)"
with the part in "inverted commas" highlighted when i select debug

could someone please help me with this? thanks = )
 
If form3.visible = true then
Unload Form2
endif

withouth brackets and inverted comma's should work.
(i am a student not professional and a little rusty)
Pls tell me if i was right.:)

Wizzbone
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top