|
|
|
The General Winforms Interview Questions consists the most frequently
asked questions in Winforms. This list of 100+ questions guage your familiarity
with the Winforms platform. The q&a have been collected over a period
of time from various blogs, forums and other similar Winforms sites
|
7.Windows Forms Layout
|
| 7.1 How can I
programmatically set the initial position of a Form so that it is displayed
properly after calling ShowDialog()?
|
| 7.2 I have a form with
several controls on it. As I size the form, the controls are being resized
continuously. Is it possible to postpone changing the controls position until
the resizing is complete?
|
7.1 How can I programmatically set the initial position of a Form so that it is
displayed properly after calling ShowDialog()?
|
|
In addition to setting the Location property of the form, make sure you also
set the StartPosition property of the form to FormStartPosition.Manual.
|
7.2 I have a form with several controls on it. As I size the form, the controls
are being resized continuously. Is it possible to postpone changing the
controls position until the resizing is complete?
|
|
Use the static property Control.ModifierKeys.
|
Console.WriteLine(Control.ModifierKeys);
if( (Control.ModifierKeys & Keys.Shift) != 0)
Console.WriteLine("the shift key is down");
if( (Control.ModifierKeys & Keys.Alt) != 0)
Console.WriteLine("the alt key is down");
if( (Control.ModifierKeys & Keys.Control) != 0)
Console.WriteLine("the control key is down");
|
|