Krzysztof Mossakowski
Windows Programming
2008 - Tasks
Windows Forms
Standard Controls
Demonstration
Two forms:
The main form with all tools
Menu:
File / Exit - closes the application
Add control - 4 menu items to add a button, listbox, combobox or textbox, respectively
3 tool strips:
Containing a trackbar changing the opacity of the main form in a range: 20% - 100%
Containing 4 buttons for moving the control selected on the listbox
values of properties visible in the property grid must be automatically refreshed
Containing a listbox with a list of all added controls
after adding a new control, it is automatically selected on the listbox
The property grid
It presents properties of the selected control
It fills the main form's client area not covered by tool strips
The sample form containing controls added using tools of the main form
Additional requirements:
The user should be able to rearrange tool strips and to dock them to other side of the main form
The initial layout must be the same as presented on the screenshot (sizes of forms do not matter)
Add one button automatically at the beginning of the application
Hints:
MenuStrip
ToolStrip, ToolStripControlHost
PropertyGrid - if not visible on the toolbox, add it using the 'Choose Items...' option available on the toolbox's context menu
Approximate points:
Menu: 0.5
Tool strips: 2.5
Changing opacity using a trackbar: 1.0
Moving the selected control using buttons: 1.0
A listbox of added controls (with reaction for changing selection): 1.5
Property grid: 1.0
The sample form: 1.5
The initial layout of the main form: 1.0
Links for uploading:
Solutions
Corrections