How To Display a WFC Form in a Visual J++ Applet (288824)



The information in this article applies to:

  • Microsoft Visual J++ 6.0, when used with:
    • the operating system: Microsoft Windows 2000

This article was previously published under Q288824

SUMMARY

The WFCApplet.exe sample demonstrates how to load a Windows Foundation Classes (WFC) form in a Visual J++ 6.0 applet.

Note Because the Visual J++ graphical user interface (GUI) designer does not work for applets, you must create the form as a WFC control. You can only use WFC under Microsoft Windows operating systems with the Microsoft virtual machine for Java (Microsoft VM). Also, you cannot use WFC controls directly in an applet, or else the applet simply instantiates the form because there is no inherent relationship between the form and the applet. To use WFC controls, you must place the controls in a WFC container.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
Release Date: Mar-13-2001

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The WFCApplet.exe sample contains the following files:

File nameSize
EULA.txt2 KB
WFCApplet.sln1 KB
WFCApplet.vjp13 KB
WFCApplet.htm1 KB
Local.htm1 KB
WFCApplet.java4 KB
WFCAppletForm.java3 KB

How to Use the WFCApplet.exe Sample

This sample demonstrates the use of WFC controls on a Java applet and how to install this applet into the Java Package Manager.

Note You do not put the WFC controls directly onto the applet area. You must create a WFC form and drop the controls on the form. When you run the applet, the Form window appears on top of the Microsoft Internet Explorer window.

This sample contains the Visual J++ 6.0 project, including two .htm files: Local.htm, which you use from the Visual J++ 6.0 Integrated Development Environment (IDE), and WFCApplet.htm, which you use for deployment to a Web server.

There are only two Java classes in this project: WFCApplet.java, which is a simple applet class that creates the WFC form, and WFCAppletForm.java, which is the WFC form class.

Using the WFCApplet.htm file, clients are prompted to install the Microsoft VM if they do not have the latest version. If they must update the Microsoft VM, the clients must also restart their computers after installation. Then, the two classes are installed into the Package Manager on the client computer to offer versioning, in the likely event that you will need to upgrade the package someday.

For additional information on installing classes into the Java Package Manager, click the article number below to view the article in the Microsoft Knowledge Base:

179652 How To Deploy Java in Internet Explorer 4.0 and Netscape 4.0

Caution After you run WFCApplet.htm, these classes are installed into the Package Manager and are located on the classpath before any new versions of the classes, even when you make subsequent changes through Visual J++ 6.0. To prevent this, go to the WINNT\Downloaded Program Files folder. Select and then right-click WFCApplet, click Remove, and then click Yes.

Modification Type:MinorLast Reviewed:8/5/2004
Keywords:kbdownload kbdownload kbCAB kbcode kbDownload kbfile kbhowto kbSample kbWFC KB288824 kbAudDeveloper