亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 27.txt

?? 介紹VB里的各種控件的使用方法,窗口控制,圖像編程以及OCX等內容,還提供了一個API集供參考.
?? TXT
字號:
不用OCX來創建自己的控件(一)
讓我們以進度條Progress Bar這個通用控件(Common Control)為例。進度條是一個較為簡單的Windows通用控件,它為一個操作的時間長短提供了一種圖形化的顯示方式。要使用該控件 一般是將Comctl32.ocx添加到工程中。Comctl32.ocx是一個超級 OCX,它本身包含了許多其它的控件。 
但是如果你只想用進度條而不想用Comctl32.ocx中的其它控件,通常有兩種方法可供選擇。一種是用VB的PictureBox或 Label控件做一個假的進度條;另一種是自己做一個進度條。

你可以通過引用Comctl32.dll來自己做一個進度條。該動態鏈接庫包含所有的common controls的功能。用Comctl32.dll來創建進度條或其它的common control,控件的定義(它的window風格, API函數,數據結構以及window消息)必須包含進去。common control的定義被儲存在Comctl32.dll的頭文件Commctrl.h中,你可以用Visual C++讀取這些信息或者到微軟網站中的某個地方找到。找到這些定義.將其轉換為VB風格的聲明并應用它們,就是本文所要講的東西。

下面的例子向你講述如何在不利用Comctl32.ocx的情況下創建自己的進度條。將下面的代碼分別粘貼到工程模塊和窗體模塊中,為完成該程序,你還需要在你的工程窗體中添加一個命令按鈕,名為“Command1”和一個標簽控件,名為“Label1”. 
Desclare

Declare Sub InitCommonControls Lib "comctl32.dll" ()

Public Const PROGRESS_CLASS = "msctls_progress32"

Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long

' Styles
' The PBS_SMOOTH & PBS_VERTICAL progress bar window styles
' are defined in Comctl32.dll that comes w/ IE3 and later (v4.70).

Public Const PBS_SMOOTH = &H1
Public Const PBS_VERTICAL = &H4
Public Const WS_VISIBLE = &H10000000
Public Const WS_CHILD = &H40000000

Declare Function IsWindow Lib "user32" (ByVal hWnd As Long) As Long

Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long

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

' Messages
Public Const WM_USER = &H400

' The PBM_SETRANGE message sets the minimum and maximum values
' for a progress bar and redraws the bar to reflect the new range.
' wParam = 0
' lParam = nMinRange Or (nMaxRange * &H10000)
' nMinRange: Minimum range value. By default, the minimum value is zero.
' nMaxRange: Maximum range value. By default, the maximum value is 100.
' Returns the previous range values if successful, or zero otherwise. The
' low-order word specifies the previous minimum value, and the high-order
' word specifies the previous maximum value.

Public Const PBM_SETRANGE = (WM_USER + 1)

' The PBM_SETSTEP message specifies the step increment for a progress bar.
' The step increment is the amount by which the progress bar increases its
' current position whenever it receives a PBM_STEPIT message. By default, the
' step increment is set to 10.
' wParam = New step increment.
' lParam = 0
' Returns the previous step increment.

Public Const PBM_SETSTEP = (WM_USER + 4)

' The PBM_STEPIT message advances the current position for a progress bar by
' the step increment and redraws the bar to reflect the new position. An application
' sets the step increment by sending the PBM_SETSTEP message.
' wParam = 0
' lParam = 0
' Returns the previous position.
' When the position exceeds the maximum range value, this message resets the
' current position so that the progress indicator starts over again from the beginning.

Public Const PBM_STEPIT = (WM_USER + 5)

' The five remaining progrss bar constants not included here (as well as all of the
' other common control definitions) can be found in the file Commctrl.h at:
' http://www.microsoft.com/msdn/sdk/platforms/doc/sdk/headers/c35.htm
' (this URL was current as of 5/20/97)
' End Bas module declares

Code

' Begin Form module code:

Private Sub Form_Load()

    ScaleMode = vbPixels

    Command1.Caption = "Do stuff..."

End Sub

Private Sub Command1_Click()

' Dynamically creates a 15 pixel wide vertical progress bar and
' places it at the right of the form, does stuff that takes a while &
' shows the progress, then destroys the progress bar.

Dim hProgBar As Long
Dim dwIncrement As Long
Dim dwIdx As Long
Dim vDummy As Variant
Static bRunning As Boolean

On Error GoTo Out

    ' Allows this proc to cancel itself
    If bRunning Then bRunning = False: Exit Sub

    ' Make sure the library is loaded
    InitCommonControls

    ' Create the progress bar using the standard window styles
    ' and the two new IE3 progress bar styles, smooth & vertical.
    ' Addition standard or extended window styles can be specified
    ' to alter the default appearance of the progress bar.

    hProgBar = CreateWindowEx(0, PROGRESS_CLASS, vbNullString, WS_CHILD Or WS_VISIBLE Or     PBS_SMOOTH Or PBS_VERTICAL, ScaleWidth - 15, 0, 15, ScaleHeight, hWnd, 0, App.hInstance, ByVal 0)

    If hProgBar = 0 Then MsgBox "Uh oh...": Exit Sub

    ' Here we go...

    bRunning = True

    Command1.Caption = "Cancel"

    ' Set the range of the progess bar.

    ' 0 (lParam low word) to &H4FFF (lParam high word).

    SendMessage hProgBar, PBM_SETRANGE, 0, ByVal (&H4FFF * &H10000)

    ' Set the value of the highlight increment. We''ll go w/ 100 itins here.
    ' The width and number of progress blocks are determined by the
    ' progress bar's width & height.

    dwIncrement = &H4FFF \ 100

    SendMessage hProgBar, PBM_SETSTEP, ByVal dwIncrement, 0

    ' Let's do some stuff...

    For dwIdx = 1 To &H4FFF

        DoEvents

        If Not bRunning Then Exit For

        vDummy = vDummy & Format(Chr(Asc(Trim(Left("a", InStr(1, "a", "a", 1)))))) '\___/'

        If dwIdx Mod dwIncrement = 0 Then

            ' Advance the current position of the progress bar by the step increment.

            SendMessage hProgBar, PBM_STEPIT, 0, 0

            Label1 = dwIdx \ dwIncrement & "%"

        End If

    Next

Out:

    ' Frees all resources associated with the progress bar.

    If IsWindow(hProgBar) Then DestroyWindow hProgBar

        bRunning = False

    Command1.Caption = "Do stuff..."

    Label1 = ""

End Sub

' End Form module code

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲亚洲国产日韩| 一区二区三区高清不卡| 91精品国产乱码久久蜜臀| 91福利在线导航| 欧美高清性hdvideosex| 制服丝袜成人动漫| 精品国产一区二区三区av性色| 777色狠狠一区二区三区| 69av一区二区三区| 欧美成人性战久久| 国产精品乱人伦| 亚洲三级在线免费观看| 亚洲人成网站色在线观看| 日韩美女精品在线| 日韩精品免费专区| 激情文学综合插| 99在线精品一区二区三区| 欧美性视频一区二区三区| 91精品麻豆日日躁夜夜躁| 日韩女同互慰一区二区| 中文一区在线播放| 国产精品美女视频| 性做久久久久久免费观看| 国产精品综合av一区二区国产馆| 午夜国产精品一区| 欧美日韩国产一区二区三区地区| 日韩欧美在线影院| 中文字幕一区二区三区色视频| 亚洲国产日韩一区二区| 国产精品一区三区| 欧美日韩一区成人| 日本一区二区三区在线观看| 午夜视频一区二区| 成人av网址在线| 91麻豆精品91久久久久同性| 日本一区二区三区四区| 日韩二区在线观看| 本田岬高潮一区二区三区| 欧美一级片在线观看| 亚洲桃色在线一区| 国产在线视频不卡二| 欧美日韩国产另类一区| 国产精品无圣光一区二区| 日本亚洲欧美天堂免费| 91浏览器打开| 国产欧美日产一区| 久久se精品一区二区| 欧美色综合影院| 亚洲欧美日韩国产手机在线 | 亚洲精品高清在线| 国模大尺度一区二区三区| 欧美日韩一级二级| 日韩一区日韩二区| 国产成人免费在线观看不卡| 日韩欧美的一区| 亚洲h动漫在线| 色综合天天天天做夜夜夜夜做| 久久精品人人做人人综合 | 久久99在线观看| 色婷婷综合久久久| 国产精品不卡视频| 狠狠色狠狠色合久久伊人| 亚洲精品国产无套在线观| 国产成人在线观看| 久久天堂av综合合色蜜桃网| 奇米777欧美一区二区| 国产揄拍国内精品对白| 色婷婷综合久久| 亚洲一区二区在线免费观看视频| 95精品视频在线| 国产精品久久久久影视| 99久久伊人久久99| 久久久午夜精品理论片中文字幕| 捆绑调教一区二区三区| 欧美精品一区男女天堂| 亚洲成av人在线观看| 欧美日韩激情在线| 日韩国产高清影视| 精品999久久久| 成人丝袜高跟foot| 亚洲精品国产成人久久av盗摄| 国产一区二区三区在线观看免费视频 | 成人av在线网| 亚洲视频一区在线| 欧美四级电影网| 亚洲美女视频在线观看| 成人av集中营| 久久久久久久综合日本| 成人福利视频在线看| 综合久久给合久久狠狠狠97色 | 欧美一区日本一区韩国一区| 免费看精品久久片| 欧美激情在线看| 欧洲国内综合视频| 视频在线观看国产精品| 久久精品亚洲精品国产欧美kt∨| 国产91精品精华液一区二区三区| 亚洲视频精选在线| 在线播放视频一区| 国产91丝袜在线播放九色| 中文字幕一区二区三区四区| 99re这里都是精品| 免费成人av在线| 中文字幕一区av| 欧美一区二区三区在线| 精品国产伦一区二区三区观看方式| 精品一区二区三区久久| 亚洲精品免费播放| 久久婷婷成人综合色| eeuss鲁片一区二区三区在线观看| 亚洲va韩国va欧美va| 欧美国产1区2区| 欧美二区在线观看| 成人免费毛片嘿嘿连载视频| 天堂一区二区在线| 亚洲色图19p| 国产无人区一区二区三区| 欧美日韩一区二区三区在线| 豆国产96在线|亚洲| 日本美女视频一区二区| 中文字幕在线观看不卡视频| 日韩欧美在线网站| 欧美日韩黄色一区二区| 成人av在线看| 国产精品12区| 精品一区二区三区久久| 亚洲视频在线一区| 久久午夜老司机| 欧美白人最猛性xxxxx69交| 欧美日韩视频专区在线播放| 菠萝蜜视频在线观看一区| 国产精品亚洲视频| 久久国产精品第一页| 无码av免费一区二区三区试看| 日韩毛片视频在线看| 国产精品色呦呦| 国产精品久久久久永久免费观看 | 亚洲影视资源网| 日韩毛片精品高清免费| 国产精品免费视频一区| 国产午夜精品久久| 久久久精品2019中文字幕之3| 精品精品国产高清a毛片牛牛| 在线不卡一区二区| 在线不卡一区二区| 日韩欧美一区二区视频| 欧美一区日本一区韩国一区| 欧美一区二区视频在线观看2020| 欧美在线三级电影| 欧美视频自拍偷拍| 91精品国产一区二区三区| 欧美乱妇15p| 欧美猛男超大videosgay| 久久新电视剧免费观看| 日韩欧美视频在线| 久久午夜色播影院免费高清| 久久精品一区四区| 国产精品久久二区二区| 一区二区三区在线影院| 亚洲一区二区三区影院| 亚洲一区二区av电影| 偷拍自拍另类欧美| 麻豆国产精品一区二区三区 | 亚洲人成精品久久久久| 国产精品久久99| 亚洲高清在线精品| 美女视频第一区二区三区免费观看网站| 亚洲午夜电影在线观看| 秋霞电影网一区二区| 国产一区二区不卡| 91网站在线播放| 欧美一区二区三区电影| 日本一区二区视频在线| 亚洲一区精品在线| 久久精品国产在热久久| a级精品国产片在线观看| 欧美日韩在线亚洲一区蜜芽| 日韩免费观看2025年上映的电影| 日本一区二区综合亚洲| 亚洲一区二区三区四区五区黄 | 国产精品乱人伦| 日韩精品一二三| 成人精品视频.| 欧美一区二区在线播放| 国产精品剧情在线亚洲| 日韩经典一区二区| 99久久久精品免费观看国产蜜| 欧美精品在线视频| 国产精品美女www爽爽爽| 日韩精品一二三四| av亚洲精华国产精华| 欧美一二三区在线| 国产精品久久久久一区二区三区 | aaa欧美大片| 日韩视频免费观看高清完整版| 国产精品伦一区二区三级视频| 日韩avvvv在线播放| 日本精品免费观看高清观看| 国模一区二区三区白浆| 不卡的av网站|