Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

New Features in Visual Studio 2005 Windows Forms : Page 4

Updated IDE features, new Menu, Toolstrip and multimedia controls, support for background threading, and a new deployment technology called ClickOnce aimed squarely at reducing the number of Web-based intranet applications are among the new capabilities in Visual Studio 2005.


advertisement
SplitContainer Control
You can think of the SplitContainer control, located on the Containers section of the Toolbox, as the combination of two panels separated by a splitter bar. The user controls the size of each panel by dragging the splitter bar to the left or right. The Orientation property determines if the splitter bar runs top to bottom (Orientation = Vertical) or left to right (Orientation = Horizontal). The vertical orientation creates left and right panels side-by-side, and the horizontal orientation create top and bottom panels, one above the other.

The SplitContainer control provides a number of properties and events to manage it's operation (see Table 3).

Table 3:Control the operation of the SplitContainer control and handle user interaction with these properties and events.

Properties



Description

FixedPanel

Specifies which panel will remain the same size when the control is resized.

IsSplitterFixed

Specifies if the splitter can be moved.

Orientation

Specifies if the splitter is arranged vertically or horizontally.

SplitterDistance

Specifies the distance from the left or upper edge to the splitter bar.

SplitterIncrement

Specifies the minimum distance that the splitter can be moved.

SplitterWidth

Specifies the thickness of the splitter.

Events

Description

SplitterMoving

Fires when the splitter is moving.

SplitterMoved

Fires when the splitter has been moved.


The Text File Reader form shows the SplitContainer control in action (see Figure 13).

 
Figure 13. The SplitContainer Control: This form demonstrates the SplitContainer control in action.
SystemSounds Class
The SystemSounds class, located in the System.Media namespace, makes easy work of adding the Windows operating system sounds to your Windows Forms application. When a system event occurs, Windows alerts the user with the sound associated with the event. Since users can choose to associate any sound file with a specific event, in prior versions of .NET it was a challenge to determine and locate the files mapped to the system events. The SystemSounds class remedies this problem.

The SystemSounds class exposes five shared object properties (see Table 4) that correspond to specific operating system events.

Table 4:The SystemSounds class is limited to working with just a few system sounds.

Objects

Description

Asterisk

Gets the sound associated with the Asterisk system event in the current Windows sound scheme.

Beep

Gets the sound associated with the Beep system event in the current Windows sound scheme.

Exclamation

Gets the sound associated with the Exclamation system event in the current Windows sound scheme.

Hand

Gets the sound associated with the Hand system event in the current Windows sound scheme.

Question

Gets the sound associated with the Question system event in the current Windows sound scheme.


Use the Play method to play the sound file associated with the specified system event.

System.Media.SystemSounds.Beep.Play() System.Media.SystemSounds.Question.Play()



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date