Create a .NET Windows Forms target and project

Note

Now you create a new Windows Forms target using the .NET Windows Forms Application target wizard.

  1. Click the New button on the PowerBar and select the Target tab.

  2. Select the .NET Windows Forms Application icon and click OK.

    The first page of the wizard displays information about what the wizard does.

  3. Click Next. On the Create the Application page, select “Use the library list and application object from an existing target” and click Next.

  4. Select the pbtutor target and click Next.

    By default, the new target name is pbtutor_winform.pbt.

  5. Click Next to accept the target name.

  6. On the Specify Project Information page, click Next to accept the default project name and library.

  7. On the Specify Application General Information page, specify Acme Update as the product name and AcmeUpdate.exe as the executable file name, and click Next.

  8. On the Resource Files/Directories page, click Add Files, select tutsport.bmp, thsirtw.jpg, and tutorial.ico, click Open, and click Next.

  9. Click Next on the Specifying Win32 Dynamic Library Files page.

    Since the tutorial application does not call any external functions, you do not specify any DLL names for deployment with the application.

  10. On the Specify Support for Smart Client page, select the Publish as smart client application check box and click Next.

  11. Click Next on the Specifying Application Running Mode page.

    You accept the default option that allows users to run the application from the Windows Start menu as well as from a browser.

  12. On the Specify How Application Will be Installed or Launched page, change localhost to the name of your computer, change pbtutor to acmeupdate, and click Next.

    You can leave the host name as localhost if you do not plan to access the published application from another computer. This is described in “Install the application on another computer”.

  13. Click Next on the Specify Application Update Mode page, then click Finish on the final page.

    The .NET Windows Forms Application wizard creates the pbtutor_winform target and the p_pbtutor_winform project. You now have two targets in MyWorkspace, both using pbtutor.pbl and tutor_pb.pbl.

  14. Expand pbtutor.pbl in both the pbtutor target and the pbtutor_winform target in the System Tree and look at the project objects that display.

    When you use the library list and application object of an existing target to create a Windows Forms project, the libraries are shared by both targets, but the System Tree displays only projects that are appropriate for the target type. In the pbtutor target, you see p_pbtutor_exe and p_pbtutor_webdw. In the pbtutor_winform target, you see p_pbtutor_winform.

  15. Collapse the pbtutor target, but leave the pbtutor_winform target expanded.