Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2007

Tip: Looking for answers? Try searching our database.

Disabling resize when double clicking on title bar - how do I keep my app fullscreen Always.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 23 Mar 2007 01:59 GMT
Hi all,

I wish to keep my application maximised at all times ..  however right now
even though there is no control box double clicking on the title bar will
'free' the app and it can be dragged around the window. My poor users get
mightily confused in this situation as half the app hangs off the bottom of
the screen.

How can I ensure that no matter how much random clicking they do the
application will always be 'maximised'.

regards.
Tony Wissler - 23 Mar 2007 02:49 GMT
Bob-

How about something quick and dirty like this:

Private Sub frmMain_SizeChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.SizeChanged
       Me.WindowState = FormWindowState.Maximized
   End Sub

I tested it out quickly and depending on the speed of the machine, every now
and again you may see a very short flicker but I did not see any form shrink
and then resize - just the occassional flicker.

If you come up with something better, let me know - I would deffinately be
interested.

Thanks-

Tony Wissler
tewissler@REMOVEME.gmail.com
Dad, MCP, MCSE

> Hi all,
>
[quoted text clipped - 8 lines]
>
> regards.
Bob - 26 Mar 2007 02:05 GMT
Thanks Tony,

I'm using your suggestion .. it keeps the Application the right size and
puts it back where I had it intended to be positioned ... it doesnt 'lock'
the App to window so it can be dragged around the screen still .. is there a
way to do this?

Or am I using this wrong...

private void ofsConsole_SizeChanged(object sender, EventArgs e)
{
   this.WindowState = FormWindowState.Maximized;
}

> Bob-
>
[quoted text clipped - 17 lines]
> tewissler@REMOVEME.gmail.com
> Dad, MCP, MCSE
Oli - 23 Mar 2007 11:23 GMT
...there's a "minsize" property on the form isn't there? - not ideal -
but best I can do ;)
Tony Wissler - 23 Mar 2007 12:27 GMT
Your absolutely right and this may work better tthen the workaround I gave
above - but what if the screen resolution and/or screen format (standard vs
wide) on the user machines differ...

That was the problem I ran into when I had to battle an issue similar to
this for one Windows Form application I had the oppurtunity to work on.

> ...there's a "minsize" property on the form isn't there? - not ideal -
> but best I can do ;)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.