Results 1 to 6 of 6

Thread: Form Buttons & Images Move Around

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2016
    Posts
    29

    Form Buttons & Images Move Around

    My program works perfectly on MY laptop.

    But, when I compile it, then run it on another computer, one of my images moves to a different location. My button also moves to another location. Neither is supposed to move.

    This only happens on the 1st form.
    Why is this?

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Form Buttons & Images Move Around

    No idea why this would occur for one Form and not another unless you are positioning controls at runtime for one and not the other.

    But it sounds like a high-DPI issue to me given so little information. Can you tell us anything more, like the DPI settings in use on each PC or anything else related to positioning?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2016
    Posts
    29

    Re: Form Buttons & Images Move Around

    Quote Originally Posted by dilettante View Post
    ...
    it sounds like a high-DPI issue ...
    That was what I was thinking, but wasn't sure. If that's the problem, how do I resolve this?

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Form Buttons & Images Move Around

    Is it the same OS on both systems? I have saw some differences between 7 and 10 where size and position of listview columns were different on 10 than 7 even with the same res and dpi settings.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Apr 2016
    Posts
    29

    Re: Form Buttons & Images Move Around

    Quote Originally Posted by DataMiser View Post
    Is it the same OS on both systems? I have saw some differences between 7 and 10 where size and position of listview columns were different on 10 than 7 even with the same res and dpi settings.
    This brings up a good point.
    My laptop was originally a Windows 10 OS, then changed over to Windows 7.

    I run VB6 on a 2nd laptop that has always been Windows 7 (not a fan of anything higher than 7),

    I will copy the program over to my 2nd laptop, then compile it from there to see if that makes a difference.

    I won't know if this did the trick until tommorow.

    I'll post here, one way or the other.

    Thanks.

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Form Buttons & Images Move Around

    Why would recompiling make any difference?

    I suppose if you ran the IDE on a system with different DPI settings and then altered your UI layout to fit it might look better after compiling but just compiling won't do anything. And if you alter the layout it will now be broken differently on a system with different DPI settings.

    You basically have two choices: make the program DPI Aware which requires a lot of work, or rely on appcompat and live with the results. The kinds of appcompat available, how they are selected, and how they look will vary based on the OS and the current DPI setting.


    The good news is that the newer "GDI Scaling" appcompat option looks pretty good for many programs and it requires no programming change. Of course you don't have that until Windows 10 1703.

    An OS on its last gasp (Win7 SP1 falls off Extended Support in 14 months so not even security patches will be provided for much longer) means just making do.


    At this point we don't even know that you have DPI issues though. You never told us what DPI settings the machines behaving differently have.

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