-
Aug 1st, 2019, 11:12 AM
#1
Thread Starter
Junior Member
VB6 IDE moving modules on Multiple Monitors after running
When I run my app then go back to edit-mode Forms and Code modules have moved to different locations, making it very difficult to stay organized.
Can anyone help with this issue?
The form and code modules are here (see red arrows below)
Then, after running the app, F5, and then going back to edit both modules have now moved to the left (see red arrows below)
-
Aug 1st, 2019, 03:28 PM
#2
Thread Starter
Junior Member
Re: VB6 IDE moving modules on Multiple Monitors after running
To me, it seems that the IDE is not aware of the multiple monitors and thinks the modules are (off-screen)?
-
Aug 1st, 2019, 04:03 PM
#3
Thread Starter
Junior Member
Re: VB6 IDE moving modules on Multiple Monitors after running
See 40 second video below for more details?
https://youtu.be/ntzElKWnkpU
Last edited by ultimateNoob; Aug 1st, 2019 at 04:14 PM.
-
Aug 1st, 2019, 04:27 PM
#4
Re: VB6 IDE moving modules on Multiple Monitors after running
It looks like you have extended the IDE across 2 monitors out of 4 total monitors. Does your program alter any display settings? If not, it may be that VB is not remembering the settings. Does this happen on all projects or just one?
-
Aug 1st, 2019, 05:03 PM
#5
Re: VB6 IDE moving modules on Multiple Monitors after running
Try switch the IDE to SDI mode in Tools->Options in Advanced tab.
This will take some getting used to it but AFAIK is the only option to keep sanity with the IDE on multi-monitor setups.
cheers,
</wqw>
-
Aug 2nd, 2019, 09:31 AM
#6
Thread Starter
Junior Member
Re: VB6 IDE moving modules on Multiple Monitors after running
It happens on all projects. Been dealing with this for years, tolerable but a bit irritating. Running the IDE in SDI remedies the problem but. . . well, you know, modules scattered all about.
-
Aug 2nd, 2019, 01:17 PM
#7
Fanatic Member
Re: VB6 IDE moving modules on Multiple Monitors after running
You could make an Add-in that saves/restores window positions. You can use the Add-in mentioned here as a template. It's based on hidden events that tells you when the user just about to run a project and when it ends.
You would probably need to call EnumChildWindows, GetWindowRect, and SetWindowPos. Here is a VB6 sample for EnumChildWindows.
-
Aug 3rd, 2019, 11:04 AM
#8
Re: VB6 IDE moving modules on Multiple Monitors after running
Yeah, I've never used the MDI mode (not even in the beginning), preferring to use the SDI mode.
However, the problem still exists when you use the SDI mode. And it can be particularly annoying for form designer windows. I do all my development on a high-end laptop, and I haul it around with me everywhere, frequently plugging in strange monitors at various client sites. Often I won't use the actual laptop's monitor, but sometimes I will. In other words, I'm constantly changing my monitors around.
Regarding my forms, I always center them in code (although, in some of these, I "remember" the last monitor they were on and center on that monitor, and not necessarily the primary monitor).
But, back to the IDE. When calling up the form designer windows, they're frequently off the screen. I've even written a little add-in to "Set Form with Focus to Left=0". I use that often.
Now, regarding other modules that get scattered into strange places, they usually have an "edge" showing which allows me to pull them back onto a visible monitor. But, even then, that's annoying. All of this non-Form location stuff is stored in the project's .VBW file. But that file isn't essential. To get things back to where they're easier to work with, I'm often just deleting that .VBW file, and starting over with the positions of various windows (where they just open to a default position on the primary monitor).
Maybe that'll help,
Elroy
EDIT1: Deleting the .VBW file when in MDI mode may also help. But you'd have to test that one.
Last edited by Elroy; Aug 3rd, 2019 at 11:07 AM.
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.
Tags for this Thread
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
|