Home All Groups Group Topic Archive Search About
Author
23 Jan 2006 9:23 PM
Rob Meade
Lo all,

I'm creating a small app - I've added a menu across the top and some other
menu items - one of which is the "About" - I've set this to centerparent yet
everytime I run it - its always about 10pixels in from  the top and left of
the main window - is there something else I need to set to achieve this?

Any information would be appreciated.

Regards

Rob

Author
23 Jan 2006 9:35 PM
Rob Meade
Ok - I've resolved that one - showdialogue on the calling function...

Next question! :o)

How do I prevent this little window from being moved around - I want it to
appear in the center of the parent and be stuck there until the user clicks
ok - I've been through all of the properties in the form and cant see
anything obvious - have played with a few - none made any difference.

Any info appreciated.

Regards

Rob
Author
23 Jan 2006 9:52 PM
AMDRIT
on menu click, all you should need to do is...


dim f as frmAbout
f = new frmAbout

f.MinimizeBox = False  'Hides the minimize button
f.MaximizeBox = False 'Hides the maximize button
f.Locked = true 'prevents the form from being resized or repositioned by the
user
f.StartPosition = FormStartPosition.CenterParent  'centers the form in it's
parent's bounds
f.ShowDialog(Me) 'displays the form, sets it's owner.


Show quoteHide quote
"Rob Meade" <ten.bewdoowsg***@edaem.bbor> wrote in message
news:k_bBf.6694$wl.4675@text.news.blueyonder.co.uk...
> Ok - I've resolved that one - showdialogue on the calling function...
>
> Next question! :o)
>
> How do I prevent this little window from being moved around - I want it to
> appear in the center of the parent and be stuck there until the user
> clicks ok - I've been through all of the properties in the form and cant
> see anything obvious - have played with a few - none made any difference.
>
> Any info appreciated.
>
> Regards
>
> Rob
>
Author
23 Jan 2006 10:36 PM
Rob Meade
HI Amdrit,

Thanks for the reply.

I have the "locked" property set on the "about" form already but it doesn't
seem to do anything...

Does it make a difference if its set on the actual form, or whether its
declared programmatically when calling the about form etc?

Any info appreciated.

Regards

Rob
Author
23 Jan 2006 10:39 PM
Rob Meade
Oh, and "locked" doesn't appear when I do this:


Dim About as new About

About.

ie there's no intelliesense for "Locked"...neither is there on the actual
About.vb file - when you look at the properties "Locked" only appears under
"Design" - could it be that this only locks the "design" view, and has
nothing to do with the code/application itself when run?

Regards

Rob
Author
23 Jan 2006 11:09 PM
AMDRIT
No, the Lock() method is avaible from the underlying windows form base, it
is available at run time.  Is this your about box from scratch, do you have
any logic in the resize event, initialize, or form_load events?  Create a
new form for the project, call it frmTest and replace the logic for about
with frmTest, do you get the same results?


Show quoteHide quote
"Rob Meade" <ten.bewdoowsg***@edaem.bbor> wrote in message
news:OWcBf.6740$wl.166@text.news.blueyonder.co.uk...
> Oh, and "locked" doesn't appear when I do this:
>
>
> Dim About as new About
>
> About.
>
> ie there's no intelliesense for "Locked"...neither is there on the actual
> About.vb file - when you look at the properties "Locked" only appears
> under "Design" - could it be that this only locks the "design" view, and
> has nothing to do with the code/application itself when run?
>
> Regards
>
> Rob
>