M2762D LG monitor resolution with VB6

When I load VB6 source code, my LG 27" M2762D monitor reverts to 640 x 480 resolution. Its using HDMI video output, and second monitor (which does not have issue) uses DVI.
Video card is ATI Radeon HD 4600 series with latest drivers.  Device manager calls monitors "Generic PnP monitor.


Larry BiedermanSoftware EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kbireckiCommented:
I assume you mean when you launch the VB6 IDE, correct?

I'm jealous of the 27" inch display, but what resolution does it run normally?  

If you set it to something like 1280x1024 before you launch VB6 IDE, does it still drop to 640?

Do you have an option to connect it via DVI to see if it still behaves this way, even if it is connected as the secondary monitor, just to see if the HDMI functionality is the cause.
0
kbireckiCommented:
And once it drops to 640, can you set the resolution back up to the normal res?  If so, maybe one solution is to let it do it's thing; use a batch file to first launch the VB6 IDE and then run MultiRes to change the resolution back to what it should be.  It would be automatic then.
0
Larry BiedermanSoftware EngineerAuthor Commented:
Thanks for help!  I run monitor at 1680 x 1050.  I've tried others, but same problem.
I will try running it via DVI and see if works.  The use of MultiRes sounds like a good solution.
Not Familiar with it, but will check it out.

Is it better to run 2 identical video cards, than one, using both HDMI and DVI outputs?

If MultiRes works, I'll gve you all poiints.
Thanks again, Larry
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Larry BiedermanSoftware EngineerAuthor Commented:
Also, Yes I can set resolution back to whatever I want.  Problems repeats each time VB6 IDE is run, or the *.vbp fie is double clicked.
0
kbireckiCommented:
One of my users that has a problem when he docks his laptop sometimes where it doesn't retain the proper resolution, and it's too difficult (cough, cough!) for him to right click, select the "Settings" tab and drag a slider.  Poor user. :(  So I put MultiRes on his system with a shortcut to this as a batch file:

multires 1024,768,32 /exit

Open in new window


He only has the one monitor, but MultiRes is capable of managing multiple monitors.

This concept of a batch file would work if you were intentionally opening VB6 directly; just use a batch file with a line similar to the one above and then another that executes the VB6 IDE.  But when you double-click on a VBP project, you'd be back to where you are now.  

Except.....!  I have another idea.  I haven't tried it yet, but if MultiRes sets the resolution the way you want, you could do this.  Create a batch file that first opens the VB6 IDE with the project as a parameter (it would use %1 parameter), and the the next line would run the MultiRes command you need to restore your resolution.  Then you could associate VBP project files with your batch file instead of the VB6 IDE executable.  It's a theory at this point, because you'd have to deal with timing issues (when the IDE starts, when the resolution gets screwed up, when to run MultiRes to fix it).

I'd like to know if the problem follows the HDMI monitor or something else, because that is a strange issue.
0
Larry BiedermanSoftware EngineerAuthor Commented:

Thanks again!
I downloaded and installed MultiRes.  Don't know how to use it yet.  Doesn't seem to do anything "out of box".  When I click its icon, it just launches screen with check boxes.

I think your expanded idea is realistic.  
Even if I just had to click MultiRes icon after VB^ opens, would be faster than going through the res reset procedure, X times/day.

 Will read docs on it tomorrow after church, and wrap this up.
Thanks
0
kbireckiCommented:
That example command I gave was a batch file command.  Are you familiar with DOS batch files?  I can expand and clarify if you'd like, but basically if you put that command in a text file with an extension of .BAT (or .CMD, either works, it's just a matter of preference), you then double click on it and it executes the MultiRes program with the parameters specified.  So you can combine that with a first step of calling vb6, like the following (copy this to a text file named "StartVB6.bat"):

start /Dc:\MIS\VB6\ "VB6 Window Name" "C:\Program Files\Microsoft Visual Studio\VB98\VB6.EXE"
"C:\Program Files\MultiRes\multires.exe" /1:1920,1200,32,60 /2:1680,1050,32,60 /exit

Open in new window


MultiRes parameters:
The parameter /Dc:\MIS\VB6\ indicates what the "current" folder should be when the executable starts.

The parameter "VB6 Window Name" seems to be required so that START recognizes what it is actually supposed to launch - the next parameter of the VB6 IDE executable.  Without this, the executable won't launch.

So this batch file starts the VB6 IDE and then forces the screen resolution to a certain setting.  There is a /restore setting for multires that you could try as well to see if it works to just restore the previous resolution settings.  I didn't try that, but it is dependent on an INI file in the "current" folder.  (See MultiRes docs for more info).

Now the timing aspect comes in where it depends on at what point your screen resolution is automatically being changed.   And if the MultiRes line executes too quickly, you'd have to add a delay between those two lines.  There are many ways to do this, and a simple search will find them, if you don't already have one.
0
Larry BiedermanSoftware EngineerAuthor Commented:
Yes, familiar with BAT files (Started programming in 1971 !).

Here is what I have on Win7 64bit computer:

start /Dc:\MIS\VB6\ "VB6.exe" "C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE"
"C:\Program Files (x86)\MultiRes\multires.exe" /1:1920,1200,32,60 /2:1680,1050,32,60 /exit

It launches the DOS window and flashes a few times, but nothing launches.
If I include only the second line in batch file, it does correct the screen.
I think my problem in within the quotes.  Is this supposed to be the full ath to the *.vbp app VB6 is to launch?

I believe this solution will work, as second line is correcting the resolution, if I can find *'bat icon which moves.

thanks

0
kbireckiCommented:
OK, let's take this in parts.  I always recommend "plain vanilla" when troubleshooting.  This means make no assumptions and focus on and change one thing at a time.

First, can you click the Windows button and paste the following in to the command line to make sure Windows recognizes and launches the VB6 IDE.:

"C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE"

Open in new window


...and press <ENTER>.  Did it start?  If not, we need to fix whatever is incorrect, but I'm guessing you have this correct and the problem may be something else on this line of your batch file.  (It may be obvious, but that was the "no assumptions" part.)

Now let's modify your batch file as follows:
1) If necessary, make any change from above to the path to your VB6.exe.
2) Just to stick to basics, comment out the second line with a "rem" and a space at the beginning.  This will make it not run the MultiRes command for now.  That's fine, we need to verify your VB6 IDE starts as expected.
3) The parameter /Dc:\MIS\VB6\ is to indicate the current directory to be set when the application starts, in this case VB6.exe.  That was just my path to where I store my VB6 applications.  Your's is probably different, and that folder may not even exist.  So change the "c:\MIS\VB6\" portion of that to something on your local system that does exist, ideally the parent location where you store your VB6 projects.  (I'm guessing this is the likely culprit.)
4) Try changing your window title from "VB6.exe" to something less like a file name.  For now, maybe just "VB6 Launcher".

Then save that and run your batch file.  Does VB6 launch now?  We need to make sure that works first, then we can re-enable the MultiRes line.  Once the VB6 IDE starts and the MultiRes line is enabled, is the timing right?  Does MultiRes run too soon or just right?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Larry BiedermanSoftware EngineerAuthor Commented:

Thanks again for your patience and help.
I changed the c;\ pathway and VB6 launches fine.
When I run the second line independently, after VB6 launches, it works!

When I run both lines in same batch file, screen res does not reset.
If there is a way to set a delay, I'd like to do.
But, I can make this work by clicking 2 different icons, if I must.

Thanks

0
Larry BiedermanSoftware EngineerAuthor Commented:
Looked on line and can't find MultiRes manual.
If I had manual or delay command, we'd be done.
Then, Time to award you the 500 points !

Thanks
0
kbireckiCommented:
I just finished dinner.  I haven't started my computer yet, but you'll need a DOD based way to insert a delay.  There are several ways to do this.  There are DOS-based apps, but the easiest may be to use the built-in CHOICE.COM external Dos command.  Add the following between the two lines you have:

Rem|Choice /c:ab /t:a,3 >nul

Play with the 3 to adjust the delay in seconds.

As for docs on MultiRes, when I installefd mine, out added a Start menu group for multires that has a shortcut to docs.  Let me know if that doesn't show for you.
0
kbireckiCommented:
Not "DOD", I meant DOS.
0
kbireckiCommented:
And if CHOICE.COM is not in your path, you'll have to add the full path to reference it.
0
Larry BiedermanSoftware EngineerAuthor Commented:

Choice line works!
Found the documentation!

What can I say, but thanks a "500 points" lot.

Enjoy your dinner, and God bless.
0
Larry BiedermanSoftware EngineerAuthor Commented:
A perfect solution!
Much appreciated.
0
kbireckiCommented:
Happy it worked!  Thanks for the points.
0
Larry BiedermanSoftware EngineerAuthor Commented:
Solution continues to work well.
Fully satisfactory patch for a defective hardware issue.

Thanks, kbirecki
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Components

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.