Results 1 to 8 of 8

Thread: [RESOLVED] Position form at the top left corner of the screen in Windows 10

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2017
    Posts
    10

    Resolved [RESOLVED] Position form at the top left corner of the screen in Windows 10

    Hi everyoneو

    When you place a sizable form on the left, right or bottom side of the screen in windows 10, the form does not completely stick to the left, right or bottom side of the screen. for example:

    Code:
    Private Sub Form_Load()
        Me.Left = 0
        Me.Top = 0
    End Sub
    And the result is as follows:

    Name:  left.png
Views: 136
Size:  8.4 KB

    This problem occurs only in the compiled exe file and not in the VB6 IDE. and only in win 10.
    Please help me to know what is the problem and what is the solution?

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,859

    Re: Position form at the top left corner of the screen in Windows 10

    It happens for me also in the IDE.
    The gap between the left of the screen and the visual left of the form also depends on the BorderStyle of the form.
    As if there is a transparent border around the form

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    13,875

    Re: Position form at the top left corner of the screen in Windows 10

    Have you tried setting the left to a negative number?

  4. #4
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,200

    Re: Position form at the top left corner of the screen in Windows 10

    this https://www.vbforums.com/showthread....g-Aero-Borders old thread of mine may be of help

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2017
    Posts
    10

    Re: Position form at the top left corner of the screen in Windows 10

    Quote Originally Posted by Magic Ink View Post
    this https://www.vbforums.com/showthread....g-Aero-Borders old thread of mine may be of help
    Magic Ink, Thanks for your help

  6. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    7,219

    Re: [RESOLVED] Position form at the top left corner of the screen in Windows 10

    This also happens to me, sort of, but only on the left (not the top). However, if I move my mouse pointer into that small region, it still has the resize pointer icon, so I assume there are a couple of transparent pixel columns there that still actually belong to the form.

    Name:  Pointer.png
Views: 82
Size:  3.3 KB

    Code:
    
    Option Explicit
    
    Private Sub Form_Load()
        Top = 0
        Left = 0
    End Sub
    
    
    Personally, I've never worried about it.
    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. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  7. #7

    Thread Starter
    New Member
    Join Date
    Jul 2017
    Posts
    10

    Re: [RESOLVED] Position form at the top left corner of the screen in Windows 10

    Quote Originally Posted by Elroy View Post
    Personally, I've never worried about it.
    Hi Elroy,
    This is important when you want to create a sizable form that should snap to the edges of the desktop when dragging. In Windows 10, this gap from the left, right and bottom of the desktop is always present.

  8. #8
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    7,219

    Re: [RESOLVED] Position form at the top left corner of the screen in Windows 10

    I just noticed that I've got a shim named NoPaddedBorder installed on my VB6 IDE. Shims are a bit complex. Basically, they're related to the compatibility settings. Also, if this fixes your problem, you'd need to do it on any compiled EXE as well (or there may be a way to specify this in a manifest that you could apply to your compiled EXE, not sure).
    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. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. 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