make an active window

jack Lindsay

Member
Joined
Nov 27, 2008
Messages
13
Programming Experience
Beginner
hi Guys.

im making a simple application, but i want a preceding window to open first. i know it can be set in the properties of the project, but i'd rather not do that.

i put the command Form2.show() in the Form1_Load section, but form1 remains the active window. i want form1 to open, then form2 to open infront of it and be the active window. also, is there a way to make form1 unaccessable while form2 is open?

im sure this can be done somehow, but i've gone on a complete blank, and cant remember anything :(

thanks in advance

jack
 
i want form1 to open, then form2 to open infront of it and be the active window. also, is there a way to make form1 unaccessable while form2 is open?
ShowDialog method can be used if you don't want to arrange differently.
 
any ideas how i can take text from one form and put it in another form

example:

got a combo box with a few entried in it on form 2. when one is selected and you push a button, that text is put into a label on form 1
 
The reason it's happening that way is because Form2 is loading before Form1 finishes loading. Form1 finishes loading second so Form1 is the active window. You need to make sure that Form1 has finished loading before displaying Form2, so you should be using the Shown event instead of the Load event.

As for your second question, Form2 simply exposes the data via a property and Form1 reads the value of that property.
 
Back
Top