Avatar of MERCOMMS
MERCOMMS
 asked on

Refresh screen

I have an app that opens a command prompt window then moves that command prompt window.  Everything works fine but after the command prompt window is moved there is a "ghost" of the window where it originally was.  If you grab the command prompt window and move it around it will erase the ghost of itself if that makes sense.  

What I need is something that will refresh the screen to get rid of the "ghost" image of the command prompt window (vb6).
Visual Basic Classic

Avatar of undefined
Last Comment
shorvath

8/22/2022 - Mon
Element1910

Is it creating a ghost copy every time you move it or only once?
MERCOMMS

ASKER
I only move it via code one time and it doesn't create the ghost then but instead leaves a ghost of where it was originally.  Then if I grab the window I can use it kind of like an eraser to erase the ghost.
Martin Liss

Does the same thing happen if the code is run in the IDE? If NOT then try putting a DoEvents line after the code that moves the window.
Your help has saved me hundreds of hours of internet surfing.
fblack61
MERCOMMS

ASKER
Doevents after moving the window has no affect.
eemit

Try to set Form AutoRedraw property to True.
Martin Liss

Does it only happen with the exe?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Mike Tomlinson

Is your app by chance waiting for the command prompt window to close?

How are you opening that command prompt?
ASKER CERTIFIED SOLUTION
shorvath

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question