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
Forminstead of aPanel/PictureBox, assuming that they provide maximize, minimize, and close buttons.You could add your own buttons to the
Panelcontrol, and then write code in theirClickevent 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 aForm.I’d ditch the
Panelcontrol, add a newFormto my project, place the existingPictureBoxcontrol onto the form that I just added, and go from there. You might want to set the form’sFormBorderStyleproperty to something like “SizableToolWindow”, depending on how you want it to look.