CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Posts
    4

    autoresize form w/ center

    Im writing a backend client to real producer plus, but I need to figure out how to resize the form when the real producer video window changes (ie 160x120 is default, but can change to 256x192 and 320x240) ... what I want to do is center it, but if it hits 320x240 it will keep it center, and just increase the size of the form... any ideas? thanks a bunch!


  2. #2
    Join Date
    Feb 2000
    Posts
    137

    Re: autoresize form w/ center

    Once the form is set to the new size do...

    Top = (Screen.Height - Height) \ 2
    Left = (Screen.Width - Width) \ 2




    Hope this helps.
    Spectre



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured