zoukankan      html  css  js  c++  java
  • Windows API (VB)

    VB 范例金典

    1-1

    Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
    Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long

    1-2

    Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long

    1-4

    Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
    (ByVal hwnd As Long, ByVal nIndex As Long) As Long
    Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
    (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Const GWL_EXSTYLE = (-20)
    Const WS_EX_TRANSPARENT = &H20&

     1-5

    Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
    Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
    Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long

    Const RGN_DIFF = 4  

    1-6

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)Me.PaintPicture Picture1.Picture, i * 10, 0, , , i * 10, 10, 10, Me.Height, vbSrcCopy

     1-8

    Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

    SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) ‘’设置窗体总是最前

    SetWindowPos(Me.hwnd, -2, 0, 0, 0, 0, 3)  ''取消设置

    1-10

    MDI form

    Project-> add mdi  

    Dim NewDocument As New ChildForm '﹚'新建子窗口
    NewDocument.Show

     ParentForm.arrange vbTileVertical

    ParentForm.arrange vbTileHorizontal

    1-11

    Private Declare Function ReleaseCapture Lib "user32" () As Long
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

    Private Const WM_SYSCOMMAND = &H112   ‘移动指令
    Private Const SC_MOVE = &HF010&
    Private Const HTCAPTIO = 2

  • 相关阅读:
    [转] 使用C#开发ActiveX控件
    [转] error LNK2026: 模块对于 SAFESEH 映像是不安全的
    Struts2详细说明
    a web-based music player(GO + html5)
    oracle_单向函数_数字化功能
    UVA 1364
    ORA-12545: Connect failed because target host or object does not exist
    左右v$datafile和v$tempfile中间file#
    二十9天 月出冲击黑鸟 —Spring的AOP_AspectJ @annotation
    Shell编程入门(再版)(在)
  • 原文地址:https://www.cnblogs.com/gosteps/p/3060718.html
Copyright © 2011-2022 走看看