PB as a tool developed by the database, has long been recognized by the developers. When developing the PB application, some programmed experience skills are summarized, introduced to everyone. 1. Add the startup sound to Win 98's startup sound must be unfamiliar, then have you ever thought about adding a startup for your PB application? It is easy to implement using the Win32 API function Plays. The method is to add the following function declaration in "Global External Functions ...": Function Long Plays (Int MOD, INT FLAGS) Library "Winmm.dll" Get this function declaration is in Visual Basic "API Viewer", just rewrite the resulting result into a PB format, then add the following code in the Open event of Application: IRet = Plays ("C: / Program Files / Joint / Start.wav", 1, 1 ) Parameter 1 Specifies the startup file, the parameter 2 specifies the play mode, and the parameter 3 specifies the playback mark. Play successfully returns 1, otherwise returns 0. If the playback failure does not generate an error prompt due to the no existence of sound files, there is no need to capture the return value. 2. Enable the PB window in the position page of the window attribute to set the pop-up position of the window. However, you don't know how much the client's screen resolution (800 × 600 is still 1024 × 786), it is better to add the following code to the Open event: getEnvironment (ENV) // Get client environment information DY = ( Pixelstounits (Env.ScreenHeight, Ypixelstounits!) - this.height) / 2 dx = (pixelstounits (env.screenwidth, xpixelstounits!) - this.width / 2 this.move (dx, dy) // env is Environment type, DX, DY is long type 3. Using the ActiveX control VB can directly reference the ActiveX control, and PB can only be referenced by "control nested" methods. This approach requires the OLE container. The following is an animation control as an example to illustrate the reference process and conventions. When the form is designed, select OLE. In the "Insert Object" dialog box pop-up, select all registered ActiveX controls in the system under Control Type, select "Microsoft Animation Control". References to the properties and methods of the ActiveX control must follow the "OLE control. Object. Property (or method)" rule. The following code will play a video clip by calling the property and method of the Animation control: OLE-1.Object.AutOPlay = true // Set to Auto OLT.Object.Open ("C: / Program Files / Joint / Firework .avi ") // Open an AVI file If your PB program uses ActiveX control, it is best to publish the corresponding OCX file with your program and register in the installer because the client does not necessarily register. The corresponding control. The registration method is to use Regsvr32. If installshield is used to make an installer, you can also put all the OCX files to be registered in a File Group, and then set it "Self-Registered" to Yes to move registration.