Results 1 to 8 of 8

Thread: resize monitor

  1. #1

    Thread Starter
    Fanatic Member Navarone's Avatar
    Join Date
    Jun 2003
    Location
    Akron, Ohio USA
    Posts
    740

    resize monitor

    Does anyone know how to resize the monitor? Some api or something?

    I built my application as 800x600 stage size, I want to resize the monitor to 800x600 with a button that says "full screen" and then have a button that would switch back to the users previous monitor res.
    He who never made a mistake never made a discovery?

  2. #2
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: resize monitor

    all you need to to is put the windowstate to maxmized

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: resize monitor

    The question is asked so often on the forum - if you will search you will find dozens and dozens of threads...

    The basic point of most of them is that you cannot change someones resolution - it will cause shortcuts to move around - it's just not nice.

    It's really up to you to re-size the form and controls to fit the users resolution. Some flat-screen LCD's can only run at one suggested resolution - anything else gets fuzzy letters.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: resize monitor

    People don't like it when apps change the resolution of the screen, which you seem to want to do. It takes a minute or two, and rearranges all the desktop icons.

    If the user has a higer resolution than you designed in, your forms will be slightly smaller. If you maximize your form, you will have to resize all the controls to match the resolution. You can buy a resizer control that does it automatically.
    Search the forums for resizer for more information.

  5. #5
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: resize monitor

    Quote Originally Posted by Navarone
    I built my application as 800x600 stage size, I want to resize the monitor to 800x600 with a button that says "full screen" and then have a button that would switch back to the users previous monitor res.
    If your app is built for 800x600 why do you want to resize the screen not monitor to 800x600?

    If you resize the Form to fit the screen then you'll have to resize all the controls for suit the new Form size.
    Attached Files Attached Files
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  6. #6
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: resize monitor

    I fully agree with everyone else in this thread that you normally shouldn't change the screen resolution. However to do it you would use the ChangeDisplaySettings API function.

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: resize monitor

    I would also recommend you use the EnumDisplaySettings API to ensure that the screen resolution you are trying to set is compatiable with users screen. If not, it may have some very unsavoury results.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: resize monitor

    My friend tried to set the resolution on a W98 box to something incompatible with the monitor/video card, and even safe mode didn't bring back 640x480!
    I had to study the display to guess at the buttons to click, but didn't succeed.
    Finally plugged in a different monitor and booted up and changed the resolution.
    Don't attempt to change unknown hardware!

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