Results 1 to 5 of 5

Thread: [RESOLVED] Flipping Applicaton based Screen Orientation

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    863

    Resolved [RESOLVED] Flipping Applicaton based Screen Orientation

    I wrote an MDI application written for the standard screen orientation (i.e. horizontal axis is longer than the vertical).
    A question was raised, if the physical screen was oriented
    such that the vertical axis is now longer than the horizontal axis, could the application appear the same but take advantage of the longer vertical axis so more data shows vertically.

    I tried windows Ctrl+Alt+UpArrow in the compiled App and nothing happened other than screen flashing. FWIW these keys work to rotate Firefox, but the whole display is rotated rather than visual display remaining the same and having the display spread out to take
    advantage of the longer vertical axis.

    A bigger question that comes to mind is whether VB Controls would even display correctly?

    Anyone ever messed with this concept and can offer some advice?
    Last edited by vb6forever; Oct 16th, 2021 at 09:14 PM.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    863

    Re: Flipping Applicaton based Screen Orientation

    Bump. Had hoped someone had messed with this.

    As I see it, the App could be re-coded or a view port included which would switch the X and Y axis. But whether Windows (or VB) would display this correctly on the screen is ???. Windows 10 does have the ability for the display to be presented in either landscape (X axis longer) or portrait mode (Y axis longer), but on my Win10 system, going to portrait is only a temp fix (lasts about 1-2 minutes) and the display is automatically rotated back to landscape mode.

  3. #3
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: Flipping Applicaton based Screen Orientation

    I have users with multiple monitors who put one of them in portrait mode. However, I didn't make that setting from VB6.

    The main problem it caused me was that none of the methods associated with the Screen object worked correctly. To deal with that, I just quit using the Screen object for much of anything except its .FontCount and .Fonts() properties. To replace the other, I wrote functions that make API calls to get it all done. When you go straight to the Windows API, everything works correctly regardless of whether you're in Portrait or Landscape mode.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    863

    Re: Flipping Applicaton based Screen Orientation

    Elroy: Thanks for responding. Figured someone had messed with this before me.

    I have users with multiple monitors who put one of them in portrait mode. However, I didn't make that setting from VB6.
    So I assume this was toggled to portrait in control panel from Win10 or earlier OS
    --- OR ---
    You just coded for it (see next) and then physically changed the screen orientation?


    When you go straight to the Windows API, everything works correctly regardless of whether you're in Portrait or Landscape mode.
    Good to know. Makes things lot simpler.

    =================
    Out of curiosity tried the Ctrl+Alt+Arrow Keys on the VB Compiled App today (a minute ago) and they worked. Had a Win10 update yesterday -- prior to that did not work (unless my error). So appear, all I need to do is adjust for the screen boundaries (Elroy's first comment Not to use Screen object).
    Last edited by vb6forever; Oct 19th, 2021 at 04:45 PM. Reason: Add

  5. #5
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: Flipping Applicaton based Screen Orientation

    Yeah, the users just change it under "Display Settings" (or, control panel before it was there).
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

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