Select from IAMPROBE's Blog from the Detailed Process of Creating an Application to Making a Installation Pack

xiaoxiao2021-03-06  51

Create a Windows application Point "New" on the File menu and select Project. In the New Project dialog box, select "Visual Basic Project" in the Project Type pane, then select "Windows Application" in the Template pane. In the Name box, type "My Notepad". This item is added to the Solution Explorer and the form designer opens. Select the Windows Forms tab in Toolbox and drag the "Button" control to the form. Double-click the Button control to add an event handler for the button. Add the following code to the event handler: Shell ("NOTEPAD.EXE", AppWinStyle.Normalfocus) This will start NotePad.exe and align the focus. On the Generate menu, select "Generate My Notepad" application. Creating a deployment item Points To "Add Project" on the File menu, then select New Project. In the Add New Project dialog, select Install and Deploy Projects in the Project Type pane, then select Install Projects in the Template pane. In the Name box, type "My Notepad Installer". The project is added to the Solution Explorer and the file system editor opens. Select "My Notepad Installer" item in Solution Explorer. In the Properties window, select the productName property and type "My Notepad". Note The ProductName property determines that the application is displayed in the folder name and the name in the Add / Remove Programs dialog. Add a Windows application to the installer in the Solution Explorer Select "My Notepad Installer" project. In the File System Editor, select the Application Folder node. On the "Operation" menu, select Add "-> Project Output. In the Add Issue Output Group dialog box, select "My Notepad" from the Project drop-down list. Select the "Main Output" group from the list and click OK. Select "Generate My Notepad Installer" on the Generation menu. Deployment Applications (Basic Installer) If a complete exercise process is being executed, you can skip this step. Select "My Notepad Installer" item in Solution Explorer. Select "Install" on the Project menu. This will run the installer and install "My Notepad" on the development of your computer. The rest of the steps demonstrate optional deployment. Creating shortcuts for Windows Applications This step will create a shortcut for your application. During the installation process, you will place this shortcut to the desktop of the target computer. Select "My Notepad Installer" item in Solution Explorer. In the File System Editor, select "The Main Output" node from 'My Notepad'. On the "Operation" menu, select "Create a shortcut to the Notepad (Event)". This will add a "shortcut" node for the main output from yourself. Renaming "The shortcut" shortcut "of the main output from yourself (activity). Select "The shortcut" of the main output from yourself "and drag it to the" User Desktop "folder of the left pane. Creating files for Windows Applications This step is to add files to "My Notepad" to double-click the "My Notepad" application when you double-click .vbn file. Select "My Notepad Installer" item in Solution Explorer. Point "Editor" on the View menu and select File Type. Select the "File Type" node on the Target computer in the File Type Editor. On the Actions menu, select Add File Type. A "New Document Type # 1" node will be added, and the node will open so that you rename it. Rename "New Document Type # 1" is VBN.DOC.

In the Properties window, set the extension property of the file type to VBN. Select the Command property and click the "Monory Number" () button. In the "Select Project" dialog, locate it to "Application Folders" and select "Main Output from 'My Notepad'". Add registry items to Windows Applications This step adds a registry key and the corresponding value to the registry. This registry key can be referenced from the application code to retrieve each user information. Select "My Notepad Installer" item in Solution Explorer. On the View menu, point to Editors and select Registry. Select the HKEY_CURRENT_USER node and expand it, then expand the "Software" node and select the "[Manufacturer] node. Note that the "Manufacturer" node has parentheses, which means it is an attribute. It will replace the Manufacturer attribute value of the deployment item being entered. On the "Operation" menu, select "New" -> "Key". Rename the Userchoice button. On the "Operation" menu, select "New" and select "String Value". Rename the TextColor value. In the Properties window, select the Value property and enter the Black. Add Custom Installation Dialog This step adds and configures a custom user interface dialog that is displayed during installation. Select "My Notepad Installer" item in Solution Explorer. Point "Editor" on the View menu and select User Interface. In the User Interface Editor, select the "Start" node under the Install node. On the Actions menu, select Add Dialog. In the Add Dialog Box dialog box, select the check box (a). On the "Operation" menu, select "Double" twice, set the "check box (a)" dialog on top of the Select Install Folder dialog. In the Properties window, set the bannerText property to Example. Setting the BodyText property to "'Installing the sample file' check box to control whether the sample file is installed. If you are in an unselected state, you don't install the example." Set the CheckBox1Label property to "To install the sample?" Set the checkbox2visible, checkbox3visible and checkbox4visible properties to false. This will hide other check boxes. Add Samples folder This step Create an Samples subfolder that will be installed below the Application folder. Select "My Notepad Installer" item in Solution Explorer. Point "Editor" on the View menu and select File System. "Application Folder" should still be selected. Point "Add" from the Actions menu and select Folder. Rename "New Folder # 1" "Example". Creating sample files for applications This step Create two simple text files, if users select the Install Sample option in the Custom Dialog box, will install these two text files. Create a text file containing text "this is rules.vbn" using a Notepad or other text editor, and then saves it as rules.vbn. Note To prevent Notepad from adding a .txt extension, select All Files from the File Type drop-down list. Create another text file containing text "this is a memo.vbn", saved it as Memo.vbn. Add the example to the installer This step adds the sample file to the Samples folder and sets the conditions that determines if the file is installed. Select "My Notepad Installer" item in Solution Explorer. From the "View" menu, point to "Editor", select File System, and then select the Example folder. From the Actions menu, point to Add, then select File. Add Rules.vbn and Memo.vbn files to the Example folder.

转载请注明原文地址:https://www.9cbs.com/read-115610.html

New Post(0)