Krzysztof Mossakowski
Windows Programming
2009 - Tasks
Windows Forms: forms, events
Mouse tracking
Demonstration
4 windows tracking current mouse position:
positioned as in the demonstration
do not let to move one of these windows independently
transparency
default: ca. 50%
'+' key: increasing the transparency, '-' key: decreasing the transparency
mouse cursor:
NS or WE sizing (see the demonstration)
background color - system color of active window's caption
always on top
only one window visible on the taskbar and in Alt+Tab window
dragging using left mouse button: changing of windows' sizes (see the demonstration)
when the Scroll Lock key is turned on stop tracking the mouse
Technical requirements:
Drawing is forbidden
(no GDI, GDI+ or other graphical library function can be used)
Using controls is forbidden
(i.e. Form.Controls collection cannot be used in any way)
More than 1 window can be created, but always only the main window can be visible on the taskbar and in Alt-Tab switch window
Hints:
see
Sample Task 2
Application.Run(), Application.Exit()
Form class, Timer class, Cursors class
Cursor.Position, Screen.PrimaryScreen.Bounds
Control.IsKeyLocked()
Approximate points:
4 windows: 1.0
positions and changing of the size: 2.0
tracking the mouse cursor (also checking the state of Scroll Lock key): 2.5
mouse cursors: 0.5
background color: 0.5
always on top: 0.5
only one window visible on the taskbar: 0.5
transparency (also changing of transparency): 2.5
Links for uploading:
Solutions
Corrections