How to catch WM_GETMINMAXINFO with C# ???


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How to catch WM_GETMINMAXINFO with C# ???

  1. #1
    Max Favilli Guest

    How to catch WM_GETMINMAXINFO with C# ???

    I have just installed visualstudio.net and I was curious to try C# and see
    if it can be useful with my work. So I am really a novice. I usually develop
    with C++ and VB.
    No I can't find out who to override WM_GETMINMAXINFO to set the minimum size
    of the window... Maybe I should use something else? I saw a mintracksize,
    but didn't understand how it works.
    The documentation does really suck.
    Thanks,
    Max



  2. #2
    Mattias Sjögren Guest

    Re: How to catch WM_GETMINMAXINFO with C# ???

    Max,

    >No I can't find out who to override WM_GETMINMAXINFO to set the minimum size
    >of the window... Maybe I should use something else? I saw a mintracksize,
    >but didn't understand how it works.


    MinTrackSize should be what you're looking for. Put this in your Form:

    protected override Size MinTrackSize
    {
    get { return new Size(400, 300); }
    }


    Matt

    ====================================
    Mattias Sjögren - mattias @ mvps.org
    http://www.msjogren.net/dotnet/

    CodeHound - The Software Developer's Search Engine
    http://www.codehound.com

  3. #3
    Mattias Sjögren Guest

    Re: How to catch WM_GETMINMAXINFO with C# ???

    >protected override Size MinTrackSize
    >{
    > get { return new Size(400, 300); }
    >}


    .... or even better, forget that override and just set the property to
    what you want, for example in your constructor.

    MinTrackSize = new Size(400, 300);


    Matt

    ====================================
    Mattias Sjögren - mattias @ mvps.org

  4. #4
    Max Favilli Guest

    Re: How to catch WM_GETMINMAXINFO with C# ???

    Half ot times I compile my very simple project it crash, is it common? Maybe
    I should install it on win2000?
    Where can I find a good documentation, or a good book, about all these
    things work with c#?
    Thanks,
    Max

    "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> ha scritto nel messaggio
    news:3a724f47.129943919@news.devx.com...
    > >protected override Size MinTrackSize
    > >{
    > > get { return new Size(400, 300); }
    > >}

    >
    > ... or even better, forget that override and just set the property to
    > what you want, for example in your constructor.
    >
    > MinTrackSize = new Size(400, 300);
    >
    >
    > Matt
    >
    > ====================================
    > Mattias Sjögren - mattias @ mvps.org




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center