Click here to Skip to main content
14,357,666 members
Rate this:
Please Sign up or sign in to vote.
See more:
Whenever I minimize my VB6 Application it leaves a white blank screen exactly where the application window was. How can I stop that?


I have a Single Document Application, some call it Single Document Interface (SDI) written in VB6, that includes a Single Forum with a START Button. The Application simply reads an invoice text file (16 lines at a time before opening the next invoice) and prints it out to a default printer.

My problem is that, once the application is started and I minimize the running window, a white square space exactly the same size and position as the minimized window is displayed and I cannot go back to it. Meanwhile, application keeps running at the back ground. How do I correct this? In short, I would like to do other jobs on the same computer whilst the application is running and I should also be able to max/min at any stage.

My PC has got G41 Motherboard, 2.8Gig Dual Core CPU, 4Gig DDR2 Memory, 500Gig SATA HDD and is not connected to the internet. Surely it cant be memory usage! Finally, I have tried it onto a PC with i5 CPU, 8Gig DDR3 Memory, 500Gig SATA HDD and got same results.

Any ideas?
[no name] 6-Sep-12 9:29am
And? Is your application giving up timeslices so that the CPU has the opportunity to service other requests such as painting the desktop?
fjdiewornncalwe 6-Sep-12 9:46am
It sounds like you have an architectural problem in your application. Check your memory usage using Task Manager when you minimize the application. Is something pinning your CPU? If it is your application then you need to examine why that is happening. When you solve that you solve your problem.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

This is just a guess, but what I would start with is
setting the main form's AutoRedraw property to true
and inserting DoEvents maybe after reading the 16 lines.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100