can I somehow disable the "lag" in the mdi parent form? - c#

I have the following problem:
I have set a background image to the parent form. And every time I open a child and move it somewhere, the parent redraw the bgimage, or reload it and because this it looks like lagging. Can I somehow disable this effect?

Related

Loading Windows Form before Showing

I have a Parent Windows Form from which there are multiple Child forms. Almost every single one of these has the same background image, the parent is a MDIContainer.
It is working properly, my problem is that when I call the Form.Show() method, after selecting a MenuStrip item for a child Form, the form is already showing WHILE the background image is being set.
I think this would be solved by first loading the BackgroundImage and then, after a while, showing the form itself.
Any possible advice? Thanks in advance
Best fix I think would be to set the right background image for each child form at design time and simply call. show to display the form..
Setting BackgroundImageLayout to ImageLayout.Stretch seems to ease the transition, however it still looks a bit odd. I'll keep trying stuff

Silverlight 5: Create an overlay above child window

I want to add a custom loading indicator when a button on child window is clicked. The loading overlay should appear above the whole screen. For this, I have created an overlay in rootvisual page which is hidden initially. When a button on child window is clicked, I make that overlay visible, but the problem is, the overlay appears behind the child window. What should I do to make it visible above child window? Is there any approach better than one I am using?
I could create overlay without having to use something like Modal Window or another Child Window. I created one div occupying whole screen and containing loading.gif. The div is hidden initially (display:none) While I want to show loading indicator, I make that div visible through Silverlight code as shown below:
HtmlElement div = HtmlPage.Document.GetElementById("loading-overlay");
div.RemoveStyleAttribute("display");
To hide the loading indicator again,
HtmlElement div = HtmlPage.Document.GetElementById("loading-overlay");
div.SetStyleAttribute("display", "none");

Show icon in taskbar for hidden windows

When I set the main window's visibility to hidden, No icon is shown in taskbar, so I have no control over the window to show it again. I want for the application's icon to be visible even when I hide the window, and to show the window when I click it's button in the taskbar. (something like minimize behavior)
How can I achieve that using WPF and .Net 4.0 in C#?
Edit: I mean the icon in taskbar (usually in the left and middle of the horizontal taskbar) not the notifyicon in system tray.
So, based on "comments" section, what you are looking to do is minimize or hide a window but still show some windows or dialogues that the window opens. First if you want to keep your window in the task bar, you should minimize with:
this.WindowState = WindowState.Minimized
That can be called from anywhere within the form. As you mentioned, though, this will close hide any dialogues that have this window set as the parent. The key, then is to not use this window as the parent. Lets say your dialogues inherit from form. You want to use:
newWindow.Show();
I am guessing that you are calling "ShowDialog", which ties the window state to the parent window state. Try this out and hopefully it will help!
Edit
One more note: the same is actually true of MessageBoxes, but the way to control the parent form is with the first parameter of the MessageBox.Show() call. If you pass in a form as the first parameter, that will be the parent, otherwise the parent will not be set.

Win api in C#. Parent window draws on its child

I have created a window in C# by win api. And made it as child to another window. This parent window is an external program and I don't know its source code.
When i move my window inside parent window some parent's elements draw itself on my window.
For, better understanding i've made some screens.
This is before I move my window. My window is gray.
And this one is after moving my window over the "SeatOpen" button.
I have no idea how parent window can draw on my window.
So, why this is happening and how to fix?
The parent window is not drawing on your window... you are failing to draw on your window yourself -- your window is not responding to WM_PAINT messages for some reason so whatever garbage was on the screen remains there.
Try to redraw your window when location is changed and it is over Seat Open button.

Delete icon from MDI container form

I have a parent form and some child forms. Each of the child form has an icon at the top and left of the form. I would like to discard those icons but when I click on the icon property, I can only browse another icon and not delete the existing one. For that reason I set the showIcon property in each child form to false and the icons are not visible any more on the forms. So far so good.
My problem is that when a child form is open and maximized, the icon is shown. I want to make it go away and unfortunately I didn't find a way to do this. Any suggestions?
Thanks!
EDIT: I added a screenshot of the form, the unwanted icon is shown above menu strip. I want it to go away. When child form is NOT maximized, the icon disappears.
I guess you need to create a custom form border.
Please check http://geekswithblogs.net/kobush/articles/CustomBorderForms3.aspx

Categories