473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

repainting the screen when switching from formmax to formnormal

I have an mdi container that is opened max. Inside can be zero or dozens of
child forms. One of the forms - my reporttree - is to be opened normal; all
others maximized. When you have the reporttree opened and you open another
on top of it, that's fine, but when you switch to the reporttree, I have the
following code in a timer loop inside my mdi container:
Dim child As Form

For Each child In Me.MdiChildren

If child.Name = "reporttree" And child.WindowState =
FormWindowState.Maximized Then

Application.DoEvents()

child.WindowState = System.Windows.Forms.FormWindowState.Normal

Application.DoEvents()

Exit For

End If

Next

Here's the problem: the other form(s) are now normal, which is fine, but the
mdi container background is not repainted, so you see remnants of the
'other' window(s) screen all over the place. Any way to solve this?

Thanks for any help.

Bernie Yaeger


Nov 21 '05 #1
1 1163
Figured it out - me.refresh().
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...
I have an mdi container that is opened max. Inside can be zero or dozens of child forms. One of the forms - my reporttree - is to be opened normal; all others maximized. When you have the reporttree opened and you open another on top of it, that's fine, but when you switch to the reporttree, I have the following code in a timer loop inside my mdi container:
Dim child As Form

For Each child In Me.MdiChildren

If child.Name = "reporttree" And child.WindowState =
FormWindowState.Maximized Then

Application.DoEvents()

child.WindowState = System.Windows.Forms.FormWindowState.Normal

Application.DoEvents()

Exit For

End If

Next

Here's the problem: the other form(s) are now normal, which is fine, but the mdi container background is not repainted, so you see remnants of the
'other' window(s) screen all over the place. Any way to solve this?

Thanks for any help.

Bernie Yaeger

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Richardson | last post by:
Hello, I am using VB.net. Is there a way to stop the screen from repainting. I would perfer to stop screen repainting for the entire application. Example when a form is loading. Stop...
5
by: Bob | last post by:
I am displaying a form with a datagrid populated from a select of database records which now exceed 12,000 when I select them all. The form displays just fine with all 12,000+ entries but when I...
1
by: Phil Sandler | last post by:
I am having a strange problem with IE 6 and an image swap. I have a page with a dropdown list. The script changes an image on screen based on the value selected in the list. Simple enough,...
6
by: Nicky | last post by:
hi,all We are going to develop a program and when it is running, we need it full screen and also, user can not switch to other place before exit our program. I am thinking, we can make a window...
0
by: Nicky | last post by:
hi,all We are going to develop a program and when it is running, we need it full screen and also, user can not switch to other place before exit our program. I am thinking, we can make a window...
2
by: Geraldine Hobley | last post by:
Hello, In my application I am trying to load up some forms, however the loading of the forms is causing a lot of flickering. Are there any commands that can stop showing the repainting of the forms...
5
by: Jesse Aufiero | last post by:
Hello all, I have many buttons on a form and at the bottom of the form is a grid that behaves as though it is 'retractable' - at various times during the life of the app, the grid becomes taller...
2
by: vunet.us | last post by:
Please, explain an interesting phenomenon, if you can. I have an array of references to an HTML element: <div id='container'> <div id='someId1'></div> <div id='someId2'></div> </div> ........
3
by: piers.allard | last post by:
I am looking for assistance with an issue I am gettting with an Access2k application. When I have xp style switched on, switching from screen to screen causes the first screen to resize to it's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.