myWinClass.cls
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:2k
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "myWinclass"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Private Declare Function SetShowString Lib "myWinclass.dll" (fcmywnd As Long, ByVal ss As String) As Integer
- Private Declare Function myCreate Lib "myWinclass.dll" (szClassName As String, szTitle As String, hInstance As Long, hWndParent As Long, dwStyle As Long, ByVal BackName As String, ByVal PictName As String, ByVal WhiteBack As String) As Long
- Private Declare Function CloseWin Lib "myWinclass.dll" (fcmywnd As Long) As Integer
- Private Declare Function SetWinSize Lib "myWinclass.dll" (fcmywnd As Long, Width As Long, Height As Long) As Integer
- Private Declare Function SetWinZoom Lib "myWinclass.dll" (fcmywnd As Long, Zoom As Double) As Integer
- Private Declare Function StopTime Lib "myWinclass.dll" (fcmywnd As Long) As Integer
- Private Declare Function ContinueTime Lib "myWinclass.dll" (fcmywnd As Long) As Integer
-
- Dim fcmywnd As Long
- Public Runing As Boolean
- Private Sub Class_Initialize()
- fcmywnd = 0
- Runing = True
- End Sub
- Public Function ContinueT() As Long
- Runing = True
- ContinueTime fcmywnd
- End Function
- Public Function CycSet() As Long
- If (Runing = True) Then
- StopT
- Else
- ContinueT
- End If
- End Function
- Public Function StopT() As Long
- Runing = False
- StopTime fcmywnd
- End Function
- Public Function SetZoom(Zoom As Double) As Long
- SetWinZoom fcmywnd, Zoom
- End Function
- Public Function Create(hInstance As Long, hwnd As Long, ByVal BackName As String, ByVal PictName As String, ByVal WhiteBack As String) As Long
- fcmywnd = myCreate("dd", "dyd", hInstance, hwnd, 0, BackName, PictName, WhiteBack)
- Create = fcmywnd
- End Function
- Public Function SetSize(Width As Long, Height As Long) As Long
-
- SetWinSize fcmywnd, Width, Height
-
- End Function
- Public Function ShowString(ss As String) As Long
- SetShowString fcmywnd, ss
- End Function
- Public Function myClose()
-
- CloseWin fcmywnd
- fcmywnd = 0
-
- End Function
- Private Sub Class_Terminate()
- CloseWin fcmywnd
- fcmywnd = 0
- End Sub