Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This page links to help on widely used J# Windows tasks. To view other categories of popular tasks covered in Help, see How Do I in Visual J# Express.
- How to: Author Controls for Windows Forms
Explains how to design and create controls for Windows Forms.
- WFCUsingWinForm Sample (Extend WFC Application Built in Visual J++ 6.0 Using Windows Forms)
Demonstrates how a WFC application built in Visual J++ 6.0 can be extended using Windows Forms.
ActiveX Controls
- How to: Add ActiveX Controls to Windows Forms
Shows you how to put ActiveX controls on Windows Forms.
Controls
- Button Control Overview (Windows Forms)
Describes binding an event handler to a button control.
- How to: Add Buttons to a ToolBar Control
Describes how to add buttons at design time and programmatically.
- How to: Designate a Windows Forms Button as the Accept Button Using the Designer
Describes how to designate a button control to be the accept button, also known as the default button.
- How to: Designate a Windows Forms Button as the Cancel Button Using the Designer
Describes how to designate a button control to be the cancel button.
- How to: Define an Icon for a ToolBar Button
Describes designating an icon for a button at design time and programmatically.
- How to: Determine When Formatting Attributes Change in the Windows Forms RichTextBox Control
Describes how to respond to changes in formatting attributes.
- How to: Display Scroll Bars in the Windows Forms RichTextBox Control
Describes the seven possible values for the Scrollbars property of the RichTextBox control.
- How to: Display Web-Style Links with the Windows Forms RichTextBox Control
Describes how link to a Web page with the RichTextBox control.
- How to: Enable Drag-and-Drop Operations with the Windows Forms RichTextBox Control
Drag operations with the Windows Forms RichTextBox control are done by handling the DragEnter and DragDrop events.
- How to: Load Files into the Windows Forms RichTextBox Control
Shows how to call the LoadFile method to display a plain-text, Unicode plain-text, or Rich-Text-Format (RTF) file.
- How to: Save Files with the Windows Forms RichTextBox Control
Shows how to save a file by calling the SaveFile method.
- How to: Set Font Attributes for the Windows Forms RichTextBox Control
Describes using SelectionFont and SelectionColor.
- How to: Set Indents, Hanging Indents, and Bulleted Paragraphs with the Windows Forms RichTextBox Control
Describes using the properties that indent paragraphs and format paragraphs as bulleted lists.
- How to: Respond to Windows Forms CheckBox Clicks
Describes programming an application to perform some action depending upon the state of the check box.
- How to: Set Options with Windows Forms CheckBox Controls
Describes how to use the CheckBox control to give users True/False or Yes/No options
- How to: Bind the Windows Forms DataGrid Control to a Data Source
Describes binding controls to the datagrid at design time and programmatically.
- How to: Change Displayed Data at Run Time in the Windows Forms DataGrid Control
Describes changing the data source and the data programmatically.
- How to: Delete or Hide Columns in the Windows Forms DataGrid Control
Describes how to hide or delete a column in a datagrid control programmatically.
- How to: Format the Windows Forms DataGrid Control
Describes setting color and style in a datagrid control at design time and programmatically.
- How to: Respond to Clicks in the Windows Forms DataGrid Control
Describes detecting when and where a user clicks a datagrid control.
- How to: Validate Input with the Windows Forms DataGrid Control
Describes validating user input in the datagrid control.
- How to: Access Specific Items in a Windows Forms ComboBox, ListBox, or CheckedListBox Control
Describes how to access specific items in a Windows Forms combo box, list box, or checked list box to programmatically determine what is in a list, at any given position.
- How to: Add and Remove Items from a Windows Forms ComboBox, ListBox, or CheckedListBox Control
Demonstrates the simplest method of binding items to the controls, assuming no data binding
- How to: Create a Lookup Table for a Windows Forms ComboBox, ListBox, or CheckedListBox Control
Describes creating a binding a lookup table to a control.
- How to: Bind a Windows Forms ComboBox or ListBox Control to Data
Describes binding data to a control.
- How to: Sort the Contents of a Windows Forms ComboBox, ListBox, or CheckedListBox Control
Demonstrates how to display sorted data by using a data source that supports sorting and then have the data source sort it.
- How to: Change the Windows Forms MonthCalendar Control's Appearance
Describes customizing the appearance of the Windows Forms MonthCalendar control.
- How to: Display More than One Month in the Windows Forms MonthCalendar Control
Describes displaying and arranging more than one month in the control.
- How to: Display Specific Days in Bold with the Windows Forms MonthCalendar Control
Describes using the three properties that control the appearance of individual dates.
- How to: Select a Range of Dates in the Windows Forms MonthCalendar Control
Describes selecting a range of dates in the month calendar control.
- How to: Modify the Size or Placement of a Picture at Run Time (Windows Forms)
Describes how to set the SizeMode property on Windows Forms PictureBox control to align or stretch the picture.
- How to: Load a Picture Using the Designer (Windows Forms)
Describes loading and displaying a picture on a form at design time by setting the Image property to a valid picture.
- How to: Set Pictures at Run Time (Windows Forms)
Describes how to set the image displayed by a Windows Forms PictureBox control programmatically.
- How to: Add a Control to a Tab Page
Demonstrates the steps for adding a tab control programmatically.
- How to: Add and Remove Tabs with the Windows Forms TabControl
Explains how to add and remove tabs from the Windows Forms TabControl in the designer or programmatically.
- How to: Group Windows Forms RadioButton Controls to Function as a Set
Describes grouping RadioButton controls as a set to function independently of other sets.
- How to: Give Your Control a Transparent Background
Explains how to allow your control to have a background color that is opaque, transparent, or partially transparent by using the Control.SetStyle method in the constructor.
- How to: Add to or Remove from a Collection of Controls at Run Time
Explains adding (and removing) controls to any container control on your forms.
- Walkthrough: Authoring a User Control with Visual J#
Demonstrates how to create a simple user control and then extend the functionality of this control through inheritance.
Dialog Boxes
- How to: Display Dialog Boxes for Windows Forms
Demonstrates how to display a dialog box in the same way you display any other form in an application.
- How to: Close Dialog Boxes and Retain User Input
Demonstrates setting the DialogResult property at run time, which allows you to dynamically handle user responses.
- How to: Create Dialog Boxes at Design Time
Describes creating a dialog box at design time.
Drag and Drop
- How to: Enable Drag-and-Drop Operations with the Windows Forms RichTextBox Control
Describes how do drag-and-drop operations by handling the DragEnter and DragDrop events.
Event Handling
- How to: Create Event Handlers at Run Time for Windows Forms
Explains creating an event handler at run time, which allows you to connect event handlers based on conditions in code at run time as opposed to having them connected when the program initially starts.
Forms
- How to: Set the Screen Location of Windows Forms
Explains how to specify where a form is to be displayed on the screen by entering values in the Location property.
- How to: Create Nonrectangular Windows Forms
Explains how to create forms in non-standard shapes.
- How to: Keep a Windows Form on Top
Explains how to make a window stay on top of any other windows on the screen.
- How to: Get a Value from Another Form (Visual C#)
Explains how to retrieve a value from a text box on a Windows Form and display it in a text box on another form.
- Windows Forms Data Binding
Explains how you can bind controls to both traditional data sources as well as almost any structure that contains data.
- How to: Draw Text on a Form (Visual C#)
Shows using the C# class DrawText to draw text on a Windows form.
- System.Drawing.Imaging Namespace
Provides advanced GDI+ imaging functionality in the .NET Framework.
- How to: Create an Application Icon (Visual J#)
Describes how to create an icon for an application.
- How to: Specify an Application Icon
Describes how to bind an icon to an application.
Graphics
- How to: Draw an Outlined Shape
Shows how to draw outlined ellipses and rectangles on a form.
- How to: Create a Linear Gradient
Shows how to fill a line, an ellipse, and a rectangle with a horizontal linear gradient brush.
- How to: Create a Path Gradient
Shows you how to customize the way you fill a shape with gradually changing colors.
- How to: Create Figures from Lines, Curves, and Shapes
Explains how to create a path that has a single or multiple figures.
- How to: Create Graphics Objects for Drawing
Explains how to create graphics objects for drawing.
- How to: Create Thumbnail Images
Demonstrates how to construct an image object from a bitmap file.
- How to: Create Vertical Text
Demonstrates how to use a StringFormat object to specify that text be drawn vertically rather than horizontally.
- How to: Align Drawn Text
Demonstrates how to draw text in a rectangle. Each line of text is centered, and the entire block of text is centered in the rectangle.
- How to: Draw a Line on a Windows Form
Demonstrates how to draw a line on a form.
- How to: Rotate, Reflect, and Skew Images
Demonstrates how to rotate, reflect, and skew an image by specifying destination points for the upper-left, upper-right, and lower-left corners of the original image.
- How to: Draw Text on a Windows Form
Shows how to use the DrawString method of the Graphics to draw text on a form.
- How to: Load and Display Bitmaps
Shows how to load a bitmap from a file and display that bitmap on the screen.
- How to: Load and Display Metafiles
Shows how to use the methods of the Metafile class for recording, displaying, and examining vector images.
Menus and Context Menus
- Walkthrough: Creating an MDI Form with Menu Merging and ToolStrip Controls
Demonstrates how to use ToolStripPanel controls with an MDI form.
Printing
- How to: Display the PrintDialog Component
Describes displaying the PrintDialog component.