Author: Yi Yu dust MSN: kevinphj@hotmail.com Time: 2006.6.23 Original Address: http://bbs.hackbase.com/viewthread-2965330-1.html a good software, in addition to meeting user on functional requirements, It is also important in the design of the interface. However, the initialization of the software is the first level of the software. How to do better, more perfect, have become a problem of designers. (Note: Large software production, professional art). Even, even the graphic design and the level of animation are not high, do not do a beautiful image. What is the problem in front of how to improve the beauty of the interface? I was doing a few projects and found that the API function was a good way. So today I will share my experience with everyone. The usage of the API function is generally not explained in the course of the university (as far as I know). (1) Let's talk about the initialization interface of VB: VB is a visual programming tool in Basic language as its basic language. Since VB does not have a cross-platform, it also determines that VB will gradually. Exited the programmed stage. When I started software initialization, I used several simple functions such as setlayeredWindowAttributes, getWindowlong, SetWindowlong. In fact, the API function is more, do not remember, use several ways to see: 1. After installing VB, VB6.0 Chinese Tool -API Text Browser, you can review the appropriate API functions. 2. Buy an API programming manual, please feel free to check. 3. You can use WinAPI e-book (my collection), send you free. Attachment 1 download. Code: Option ExplicitPrivate Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As LongPrivate Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long , ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByValdwNewLong As Long) As LongPrivate Sub Form_Load () Dim rtn As Long rem: window for the originally Pattern. RTN = getWindowlong (me.hwnd, -20) REM: Make the form to add a new style. RTN = RTN OR 524288 REM: Assign a new style to the form. Setwindowlong Me.hWnd, -20, RTN REM: The following parameters can be modified by themselves.
SetlayeredWindowAttributes me.hwnd, 0, 200, 2nd Sub Image: Download: Attachment 2 has downloaded source. (2) Using third-party controls: if: Flash control, GIF control attachment 3 and attachment 4 download. (3) Delphi initialization design is Borland's products, naturally inherited the company's consistently good tradition: the code execution efficiency is high. (Delphi 7.0) Simple interface:
Attachment 5 Download. (4) The VC initialization interface based on the visual development tool for the MFC library, the preferred tool for developing software. (VC 6.0). Articles and address: http://bbs.hackbase.com/viewthread-2963773-1.html