Form Load Method and CenterParent property 
Author Message
 Form Load Method and CenterParent property

1. I need to load a form, but not show it. In VB 6.0 I could use Load Form1,
for example. How can I do this with VB.NET?
2. I have a form in a MDI form.
This doesn't work: Form1.StartPosition = FormStartPosition.CenterParent
This works: Form1.StartPosition = FormStartPosition.CenterScreen
Just can't figure it out.

thanks,



Tue, 17 May 2005 20:00:52 GMT  
 Form Load Method and CenterParent property
Hello Marcelo,

Q 1:
you have to do a reference to the Form (OOP).

Dim MiForm As New Form2
'No Modal
MiForm.Show()
'Modal
MiForm.ShowDialog()

I hope that helps,

--
Jorge Serrano Prez
Microsoft Visual Basic MVP 2002
Microsoft Beta Tester - Visual Studio .NET 2003
http://www.portalvb.com/
Responsable de la Comunidad de Desarrolladores de Microsoft Visual Basic
.NET en espa?ol
http://www.microsoft.com/latam/msdn/comunidad/comunidades/vbnet/



Quote:
> 1. I need to load a form, but not show it. In VB 6.0 I could use Load
Form1,
> for example. How can I do this with VB.NET?
> 2. I have a form in a MDI form.
> This doesn't work: Form1.StartPosition = FormStartPosition.CenterParent
> This works: Form1.StartPosition = FormStartPosition.CenterScreen
> Just can't figure it out.

> thanks,



Fri, 20 May 2005 06:35:45 GMT  
 Form Load Method and CenterParent property
But I need to load the form without showing it.



Quote:
> Hello Marcelo,

> Q 1:
> you have to do a reference to the Form (OOP).

> Dim MiForm As New Form2
> 'No Modal
> MiForm.Show()
> 'Modal
> MiForm.ShowDialog()

> I hope that helps,

> --
> Jorge Serrano Prez
> Microsoft Visual Basic MVP 2002
> Microsoft Beta Tester - Visual Studio .NET 2003
> http://www.portalvb.com/
> Responsable de la Comunidad de Desarrolladores de Microsoft Visual Basic
> .NET en espa?ol
> http://www.microsoft.com/latam/msdn/comunidad/comunidades/vbnet/



> > 1. I need to load a form, but not show it. In VB 6.0 I could use Load
> Form1,
> > for example. How can I do this with VB.NET?
> > 2. I have a form in a MDI form.
> > This doesn't work: Form1.StartPosition = FormStartPosition.CenterParent
> > This works: Form1.StartPosition = FormStartPosition.CenterScreen
> > Just can't figure it out.

> > thanks,



Sat, 21 May 2005 02:22:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Changing form-properties while running before loading the form

2. Changing Form's BorderStyle property at run time but before form is loaded

3. form loading methods and form_load

4. Form load event with ShowDialog method

5. Load form vs.Show method

6. Class Method vs Form Load

7. Form Load and Print Method

8. calling methods in usercontrol from loaded forms

9. Hiding Form Properties/Methods from other Objects

10. Form Inheritance / inheriting properties and methods

11. Should my properties be a method or set by a method

12. load another form form one form

 

 
Powered by phpBB® Forum Software