Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide mdi child show dialog form's breadcrubs while were moving?

Status
Not open for further replies.

assimang

Programmer
Mar 11, 2008
96
Hello,
I have a mdi application. A mdi parent form (CentralFrm) and 4 children forms. Because i was wanted the user being unable to access the mdi parent form, while he was loading a mdi child form and during the child form is visible, i didn't declared the clildren forms as children which means that i didn't use Me.MdiParent = CentralFrm and i display them like this FrmChild.ShowDialog() and i am getting what i want, with a small problem. When i move a mdi child form i can see its breadcrumb and i want to avoid this. Any suggestions? Any help will be much appreciated.

Thanks everyone
in advanced
assimang
 
Then you defeat the whole purpose of having an MDI application.

I suggest that you investigate what functionality you can control through the Windows API.

So far, we have been doing this for you, but you stubbornly reject every suggestion offered - surely it is about time that you did your own research. I'm sure that google works just as well for you as it does for us.

[vampire][bat]
 
Sorry for my english, i think that's a little bit bad. Yes i think i mean the flickering. Trace or track i don't know exactly the word
 
I have set centralfrm ismdicontainer property to false.
My centralfrm has a backgroundimage a jpg file streched and when i load other forms with showDialog method when i drag them there is a flickering. I realized that if i don't have a backgroundimage i don't receive any kind of flickering in forms i load. But the problem is that i want have the background image in centralfrm and when load and moving other forms don't receive their flickering. Any suggestions? Any help will be much appreciated.

Thanks everybody
in advanced.
 
While any thing is remotely possible generally speaking it isn't going to happen. That flickering occurs be cause even if you use a background image it is still being painted on top of the form. What happens is that it paints the back of the form before it paints the picture on top. If the flickering is that pronounced then generally either your program is running on too low a system, your computer is running to many other things so system resources are too low, your program is doing heavy processing so it is delayed in painting the picture, or other things of that nature. Like other things that is just the nature of the windows form. And I'm done.

-I hate Microsoft!
-Forever and always forward.
 
Sorwen, agreed.

assimang, your best bet is to investigate bitblt-ing the background image - this is the fastest way to draw it. Someone may be prepared to put together an example for you (although there are plenty of examples available on the internet), I don't have the time, especially since there is no guarantee that that would actually solve the problem, because, as Sorwen has said, there are many other factors involved.



[vampire][bat]
 
Thanks all of you. After searching solutions and trying several things I found a solution but i don't know if it is the right way. I am thinking to use something like this.
Private Sub CentralFrm_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
value = Color.Gray
Me.TransparencyKey = value
End Sub

I don't get any flickering when i load other forms. Although if there is a better way to accomplish this i am waiting for your solution.

Thanks to anyone.
 
Since you are just asking about code you posted I'll answer. What that does is basically make the form totally see through. I'm rather surprised that you can't see through it to the desktop when it flickers I guess because it doesn't have to take the time to draw it that it just doesn't show, but if it works for you then I say use it.

One thing I almost hate to bring up is you might want to change is that if the people who are going to use it are allowed to change their windows color scheme it may not work by always setting the color to gray. I can't remember if the mdi form will force to gray in that instance so you might want to test that. Otherwise if it is working for you go for it.

-I hate Microsoft!
-Forever and always forward.
 
Sorwen you are right. I realized that when a form is loaded not work by always setting the color to gray especially if the users change their windows color scheme. I can tell that when a form loaded, the backcolor is not gray but is the windows desktop's current backround. I don't know if it's possible to change. What do you think can i do? I am just searching for a solution, but results other problems?
 
On that you would have to play around I'm not sure at what point you would need to get the color. I would first just try in that shown event value = CentralFrm.BackColor and see if that works.

-I hate Microsoft!
-Forever and always forward.
 
The colors you want to use are in the SystemColors collection. These colors correspond to the settings that the user can change such as the desktop color. More than likely, the color you want is SystemColors.ControlDark

-Brian
 
Thanks all, i think its a good idea for now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top