This sample shows how you can create a set of special-purpose text boxes that are designed for a specific type of input. This sample includes text boxes for e-mail addresses, IP addresses, and phone numbers.
The
The RegExTextBox class, derived from
This sample shows how you can create a set of special-purpose text boxes that are designed for a specific type of input. This sample includes text boxes for e-mail addresses, IP addresses, and phone numbers.
The
The RegExTextBox class, derived from
Many document-based applications support multiple windows, one per open document, which are displayed in the taskbar. The ALT+TAB key combination can be used to switch between the documents, but without the overhead incurred by loading each document in a separate process. This sample implements this behavior.
The startup object for the application is the Sub Main method inside a class named FormsManager. The Main method creates a new form instance by calling the NewForm method of the FormsManager class and then adds the new form to a list object. Once the first form is created, the code calls
Each form also provides Close and Exit menu items. Choosing Close starts the closing process. Each form has a
If you try to close a changed document by closing the form or exiting the application, you will see a dialog box asking you to save the form's contents. If you click Yes, the code calls the form's Save method and closes the form. If you click No, the form simply closes. If you click Cancel, the form does not close and a custom event is raised telling the application to stop shutting down. This application does not actually perform any file I/O to save the file.
Several types of data are displayed:
Text Text is displayed in a panel.
Keyboard status The status of the CAPS LOCK and NUM LOCK keys are displayed as text in a panel.
Date The date is displayed in the current culture in a panel.
Progress A