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
Related
I am developing a generic GUI with a windows form in c#.
I have added different buttons and windows on the right panel of the form. What I would like to do is to link these buttons on the right with different subforms (?) which will appear on the left. In particular, when pressing a button on the right panel, I would like to display a new form/userControl/window/or-anything-you-recommend on the left panel of my ParentForm. Should I go with MDI Form? How could I specify where to position each of the child forms on the Parent one?
Many thanks in advance!
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.
I am making a webbrowser and I have to make the tabs draggable. So when you pull out a tab, I delete the tabitem from the tabcontrol and put it in another window, which I create on that very moment, and that's the tab, the window, you drag. Now I have to be able to drop the tab back in so I need to check if the window, the window I am dragging, is over another window where it could be dropped.
So I actually need two things:
1) Is the window over another one?
2) If it is over a window, is it the first window underneath the window youre dragging?
Thanks in advance
This should give you a good starting point Drag and Drop Overview
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?
I am creating a GUI with C#. I intended to use a ListView to see preview of pictures, and a PictureBox to display the full view. I used a Panel as parent and placed a PictureBox inside of that to have scrollbars appear on the picture box.
What I still can't figure out how to do is to provide close, maximize, and minimize, buttons on the Panel, as seen in many GUI applications.
How can I do this? Any ideas will be appreciated.
Those other GUI applications probably use a Form instead of a Panel/PictureBox, assuming that they provide maximize, minimize, and close buttons.
You could add your own buttons to the Panel control, and then write code in their Click event handlers to do whatever you want with the control. This is easy and relatively straight-forward if you just want to be able to close the picture, but it seems like unnecessary work to duplicate all of the functions that are built right into a Form.
I'd ditch the Panel control, add a new Form to my project, place the existing PictureBox control onto the form that I just added, and go from there. You might want to set the form's FormBorderStyle property to something like "SizableToolWindow", depending on how you want it to look.