home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Test DJApi Control"
- ClientHeight = 3135
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5355
- LinkTopic = "Form1"
- ScaleHeight = 3135
- ScaleWidth = 5355
- StartUpPosition = 3 'Windows Default
- Begin prjDJApi.DJApi DJApi1
- Left = 2220
- Top = 465
- _ExtentX = 1349
- _ExtentY = 582
- End
- Begin VB.CommandButton Command1
- Caption = "Command1"
- Height = 495
- Left = 2415
- TabIndex = 12
- Top = 2355
- Width = 1215
- End
- Begin VB.CommandButton cmdScroll
- Caption = "Toggle Scroll"
- Height = 495
- Left = 4110
- TabIndex = 11
- Top = 2535
- Width = 1215
- End
- Begin VB.CommandButton cmdNum
- Caption = "Toggle Num"
- Height = 495
- Left = 4110
- TabIndex = 10
- Top = 1950
- Width = 1215
- End
- Begin VB.CommandButton cmdCaps
- Caption = "Toggle Caps"
- Height = 495
- Left = 4110
- TabIndex = 9
- Top = 1350
- Width = 1215
- End
- Begin VB.CommandButton cmdTaskBar
- Caption = "Hide TaskBar"
- Height = 495
- Left = 4110
- TabIndex = 8
- Top = 750
- Width = 1215
- End
- Begin VB.CommandButton cmdNoClose
- Caption = "Disable Form Close"
- Height = 495
- Left = 4110
- TabIndex = 7
- Top = 105
- Width = 1215
- End
- Begin VB.CommandButton cmdGetWin
- Caption = "GetWinRect"
- Height = 495
- Left = 0
- TabIndex = 6
- Top = 1950
- Width = 1215
- End
- Begin VB.CheckBox chkTrue
- Caption = "True"
- Height = 225
- Left = 1350
- TabIndex = 5
- Top = 2700
- Value = 1 'Checked
- Width = 735
- End
- Begin VB.CommandButton cmdWinPos
- Caption = "Set Win Pos"
- Height = 495
- Left = 0
- TabIndex = 4
- Top = 1350
- Width = 1215
- End
- Begin VB.CommandButton cmdSetParent
- Caption = "Set Parent"
- Height = 495
- Left = 0
- TabIndex = 3
- Top = 105
- Width = 1215
- End
- Begin VB.PictureBox picContain
- Height = 810
- Left = 2040
- ScaleHeight = 750
- ScaleWidth = 1230
- TabIndex = 2
- Top = 1215
- Width = 1290
- End
- Begin VB.CommandButton cmdName
- Caption = "GetCmpName"
- Height = 495
- Left = 0
- TabIndex = 1
- Top = 750
- Width = 1215
- End
- Begin VB.CommandButton cmdKeys
- Caption = "Disable Keys"
- Height = 495
- Left = 0
- TabIndex = 0
- Top = 2535
- Width = 1215
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdNum_Click()
- Call DJApi1.LockToggle(VK_NUMLOCK)
- End Sub
- Private Sub cmdCaps_Click()
- Call DJApi1.LockToggle(VK_CAPITAL)
- End Sub
- Private Sub cmdScroll_Click()
- Call DJApi1.LockToggle(VK_SCROLL)
- End Sub
- Private Sub cmdGetWin_Click()
- Dim Left As Long
- Dim Top As Long
- Call DJApi1.GetWindowRect(picContain.hWnd, Left, Top)
- Debug.Print Left, Top
- End Sub
- Private Sub cmdKeys_Click()
- Dim blnDisable As Boolean
- If chkTrue.Value = Checked Then
- blnDisable = True
- Else
- blnDisable = False
- End If
- Call DJApi1.DisableSystemKeys(blnDisable)
- End Sub
- Private Sub cmdName_Click()
- MsgBox DJApi1.GetComputerName
- End Sub
- Private Sub cmdNoClose_Click()
- DJApi1.DisableClose (Me.hWnd)
- End Sub
- Private Sub cmdSetParent_Click()
- Dim lnghWnd As Long
- With DJApi1
- lnghWnd = cmdSetParent.hWnd
- If .GetParent(lnghWnd) = Me.hWnd Then
- Call .SetParent(lnghWnd, picContain.hWnd)
- Else
- Call .SetParent(lnghWnd, Me.hWnd)
- End If
- End With
- End Sub
- Private Sub cmdTaskBar_Click()
- Call DJApi1.ShowTaskBar
- With cmdTaskBar
- If Left(.Caption, 1) = "H" Then
- .Caption = "Show TaskBar"
- Else
- .Caption = "Hide TaskBar"
- End If
- End With
- End Sub
- Private Sub cmdWinPos_Click()
- Dim Left As Long
- Dim Top As Long
- If picContain.Left = 0 Then
- Left = 2200
- Top = 1000
- Else
- Left = 0
- Top = 0
- End If
- Call DJApi1.SetWindowPos(picContain.hWnd, HWND_TOP, Left, Top)
- End Sub
- Private Sub Command1_Click()
- MsgBox DJApi1.GetNextWindow(Me.hWnd, GW_OWNER)
- End Sub
-