We just got a new win 7 64 computer and one very old program does not display properly on launch - it doesn't draw itself completely until I change the size of its window. I'd like to write a small script program that launches the old program, then changes its size (for example, minimize then restore or maximize then restore its window) or otherwise forces the program to redraw itself.
That way a user could click on the program icon and it would flicker a moment and display properly.
I tried:
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("""c:\Program Files (x86)\VideoLan\VLC\vlc.exe""")
objShell.SendKeys "% x"
objShell.SendKeys "% r"
Set objShell = Nothing
Based on How can I maximize, restore, or minimize a window with a vb script? That worked to launch vlc (test program, not the problem program), but did not change its size.
EDIT: adding a slight delay after run (wscript.sleep(200)) fixed the problem. I'd still like to know if there's a better way.