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
    Junior Member
    Join Date
    Jul 2017
    Posts
    16

    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: 1422
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
    5,872

    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
    14,205

    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,210

    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
    Junior Member
    Join Date
    Jul 2017
    Posts
    16

    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
    9,853

    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: 1275
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. To all, peace and happiness.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jul 2017
    Posts
    16

    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
    9,853

    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. 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