Monday, September 23, 2013

How to Make a Notepad in Visual Basic


Create a Notepad Program
1. Start Visual Basic.
2. Select a new project and click on the 'OK' button.
3. Click on the 'OLE' control icon in the tool box (on the left-hand side of the Visual Basic interface).
4. Draw a square in the form window. A dialogue box will appear.
5. Select 'Create New' from the 'Insert Object' dialogue box.
6. Scroll down the text box. Click on 'Microsoft Notepad' and click on the 'OK' button.
7. Press the F5 function key on your keyboard. This action runs the program so you can test it out before you save your work. Click inside of the text box and type. Click on the 'Properties' window to customize the look of your Notepad program. The properties for background color, appearance, border style and font are on the right-hand side of the interface. Set the background color to 'white,' the appearance to '3D' (or 'flat' if you prefer a two-dimensional appearance), the border style to 'single' (one line around the notepad text area) and the font to 'Times New Roman' (or another commonly used font).
8. Make your Notepad an executable program. This means making the program capable of being run outside of Visual Basic and on any computer. Click on the 'Project' menu and select 'Project Properties.' This opens a dialogue box for customizing your current project and Visual Basic itself.
9. Click on the 'General' tab to view the general project options. Click on the list box under 'Startup Object,' and then select 'Form1,' which contains the Notepad object. This action will cause the form to be loaded immediately upon running the program.
10. Click on the 'Make' tab. Type in the name of your program, 'My First Notepad,' for example. Click on 'Options' below the 'OK' button. Type the name you'd like displayed when Notepad is running, such as 'Custom Notepad.' This name is different from the file name. File names are not displayed when the application is running. Click on the 'Save in' list box to select the location where you want to save your Notepad program. Click on the 'OK' button. Your program is now saved.
Customize the notepad icon
11. Open the Notepad project you created.
12. Scroll down the 'Properties' window. Click on the three dots next to 'Icon.'
13. Select the icon you want to represent your Notepad program. Click on the 'Open' button.
14. Create a new version of your Notepad program using a shortcut to make it executable. Click on the 'File' menu and then select 'Make.exe.' Click on the 'OK' button to save your new Notepad program.