Display style with VB control window

zhaozj2021-02-11  177

Display style with VB control window

http://www.tongyi.net Author: End of the World wind chimes Hits: 504

The software interface is vividly determined to design and control your window. In fact, Windows programmers can manipulate any windows in the system. It means that Windows programmers can manipulate any running application window; I can find that a specific application is running, if the app is not running Start it; you can rearrange all windows on the screen; you can also maximize or minimize other applications. Below we explore a very meaningful application. We hope that when the program activates other windows, it still makes the cover window in the front desk, that is, the window has "always in the foremost" ("Always On TOP"). In fact, Microsoft Series software does this. When you run Word, Excel or PowerPoint, you will find that their cover window will disappear without the system to activate other windows. Visual Basic for Windows (hereinafter referred to as VB) is known as a visual programming software to design a style with its excellent graphical interface. Using it allows the software development cycle to be greatly shortened, but VB's powerful features that call Windows DLL (Dynamic Link Library) are ignored by many programmers. In fact, flexible application of Windows DLL API (application interface) can make your development system more energetic. It is because VB supports DLL allows us to display the window as you want to control the window, so that we can make the system cover in front of the front desk, and the API functions used below. . SetWindowPOSVB defined: Declare Sub SetWindowPosLib "User" (Bybal hWnd as Integer, hWndInsertAfter as Integer, ByValXas Integer, ByValYas Integer, ByVal cx as Integer, ByVal cy as Integer, ByVal wFlags as Integer) Description: to change the position and size of the window, You can modify the location where the window is in the internal window list to control the order. Parameter Type / Description HWnd Integer- The window HWNDINSERTAFTER INTEGER- window handle, in the window list, the window hwnd will place behind the window handle, it can take the value: hwnd_bottom: put the window at the bottom of the window list; HWND-TOP: Place the window on the top of the z order. The z-order is the order in which the window is displayed at level; hWND_TOP (MOST): Put the window on the top of the list, after all the top window. X Integer - New X coordinate, if hwnd is a child window, gives the customer coordinates of the parent window. Y Integer - New Y coordinate, if hwnd is a sub-window, y gives the customer coordinates of the parent window. CX Integer - Specifies the new window width. CY Integer - Specifies the height of the new window.

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

New Post(0)