visible=true/Form.Show makes Form.Location change! 
Author Message
 visible=true/Form.Show makes Form.Location change!

Hi all!

I do the following in my program:

-make a new form programmatically with the visible property set to false
-set the location of the form
-do some other stuff
-set the visible property to true when user clicks a menu button

When I set Form.Visible=true, the placement is suddenly changed!
Why is that happening?

The only workaround I've found so far, is to make the form visible, set the
placement, and then hide the form.
This is not a very good solution since the form splashes once on the screen
when it is created.

Anyone who knows what is causing this?
Is it a bug??

Thanks in advance!

-Nils Magne Lunde



Sun, 27 Nov 2005 03:19:59 GMT  
 visible=true/Form.Show makes Form.Location change!
Hi, you need to set the StartupPosition property of your form to Manual.

--
Happy to help,
-- Tom Spink

Please respond to the newsgroup,
so all can benefit.

One Day,


Quote:
> Hi all!

> I do the following in my program:

> -make a new form programmatically with the visible property set to false
> -set the location of the form
> -do some other stuff
> -set the visible property to true when user clicks a menu button

> When I set Form.Visible=true, the placement is suddenly changed!
> Why is that happening?

> The only workaround I've found so far, is to make the form visible, set
the
> placement, and then hide the form.
> This is not a very good solution since the form splashes once on the
screen
> when it is created.

> Anyone who knows what is causing this?
> Is it a bug??

> Thanks in advance!

> -Nils Magne Lunde



Sun, 27 Nov 2005 04:42:50 GMT  
 visible=true/Form.Show makes Form.Location change!
That was it!
Thanx!

-Nils Magne


Quote:
> Hi, you need to set the StartupPosition property of your form to Manual.

> --
> Happy to help,
> -- Tom Spink

> Please respond to the newsgroup,
> so all can benefit.

> One Day,


> > Hi all!

> > I do the following in my program:

> > -make a new form programmatically with the visible property set to false
> > -set the location of the form
> > -do some other stuff
> > -set the visible property to true when user clicks a menu button

> > When I set Form.Visible=true, the placement is suddenly changed!
> > Why is that happening?

> > The only workaround I've found so far, is to make the form visible, set
> the
> > placement, and then hide the form.
> > This is not a very good solution since the form splashes once on the
> screen
> > when it is created.

> > Anyone who knows what is causing this?
> > Is it a bug??

> > Thanks in advance!

> > -Nils Magne Lunde



Sun, 27 Nov 2005 14:11:13 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Making a user defined text box visible in a custom form

2. Form flashing momentarily before opacity makes it visible

3. Making Components Visible to Multiple Forms

4. Picture.visible = true and some buttons are show !?

5. .Show/.Visible=true

6. HELP: WhatsThisButton not show in form when MDIChild is True

7. HELP: WhatsThisButton not show in form when MDIChild is True

8. Showing 2nd Form in Certain Location

9. Making a form a child form of an MDI form

10. Making a form a child form of an MDI form

11. Changing .ForeColor without the form becoming visible

12. Change in WebBrowser.Visible and form resize?

 

 
Powered by phpBB® Forum Software