-
Nov 30th, 2021, 01:09 PM
#1
Thread Starter
Junior Member
[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:
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?
-
Nov 30th, 2021, 02:34 PM
#2
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
-
Nov 30th, 2021, 02:41 PM
#3
Re: Position form at the top left corner of the screen in Windows 10
Have you tried setting the left to a negative number?
-
Nov 30th, 2021, 03:16 PM
#4
Re: Position form at the top left corner of the screen in Windows 10
-
Dec 1st, 2021, 03:10 AM
#5
Thread Starter
Junior Member
Re: Position form at the top left corner of the screen in Windows 10
Originally Posted by Magic Ink
Magic Ink, Thanks for your help
-
Dec 1st, 2021, 09:44 AM
#6
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.
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.
-
Dec 1st, 2021, 03:40 PM
#7
Thread Starter
Junior Member
Re: [RESOLVED] Position form at the top left corner of the screen in Windows 10
Originally Posted by Elroy
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.
-
Dec 8th, 2021, 08:26 PM
#8
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|