Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SplitContainer Control Sample

The SplitContainer Control Sample demonstrates the use of several regular and advanced features of the control, including orientation, splitter distance, splitter width, and splitter increment.

For information about using the samples, see the following topics:

Security noteSecurity Note:

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

To build and run the sample using the command prompt

  1. At the command prompt, navigate to the location where you saved the uncompressed sample files.

  2. Navigate to one of the language-specific subdirectories under the SplitContainerSample directory.

  3. Type msbuild to build the sample using the solution (.sln) file provided.

  4. Type cd SplitContainer\bin\Debug to navigate to the location of the executable file.

  5. Type SplitContainer.exe to run the sample.

To build and run the sample using Visual Studio

  1. In Windows Explorer, navigate to the location where you saved the uncompressed sample files.

  2. Navigate to one of the language-specific subdirectories under the SplitContainerSample directory.

  3. Double-click the solution (.sln) file to open it in Visual Studio.

  4. In Visual Studio, press F5 to build and run the sample.

To use the SplitContainerSample

  1. Enter various values in the Splitter Width and Splitter Increment boxes and observe the results.

  2. Change the orientation and observe the results.

  3. Drag the splitter and observe that the value of the Splitter Distance box changes.

  • Setting the orientation of the SplitContainer.

  • Setting the initial position of the splitter.

  • Setting the width of the splitter.

  • Setting the number of pixels that the splitter moves at a time.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft