vbAccelerator - Contents of code file: fSDITest.frmVERSION 5.00
Begin VB.Form frmSDITest
Caption = "vbAccelerator Form Caption Focus Modifier Sample"
ClientHeight = 2175
ClientLeft = 5220
ClientTop = 3075
ClientWidth = 4905
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 2175
ScaleWidth = 4905
Begin VB.CommandButton Command1
Caption = "&New Instance..."
Height = 555
Left = 2460
TabIndex = 5
Top = 120
Width = 1095
End
Begin VB.CommandButton cmdMsgBox
Caption = "&Msg Box"
Height = 555
Left = 3600
TabIndex = 3
Top = 120
Width = 1095
End
Begin VB.CommandButton cmdModalForm
Caption = "&Show Modal Form..."
Height = 555
Left = 1320
TabIndex = 2
Top = 120
Width = 1095
End
Begin VB.Timer tmrActiveWindow
Interval = 50
Left = 2940
Top = 1380
End
Begin VB.CommandButton cmdToolWindow
Caption = "&Show Tool Window"
Height = 555
Left = 180
TabIndex = 0
Top = 120
Width = 1095
End
Begin VB.Label lblhWNd
Caption = "&Active Window:"
Height = 255
Left = 1560
TabIndex = 4
Top = 780
Width = 1335
End
Begin VB.Label lblActive
Caption = "&Active Window:"
Height = 255
Left = 180
TabIndex = 1
Top = 780
Width = 1335
End
End
Attribute VB_Name = "frmSDITest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'
===============================================================================
=======
' Name: vbAccelerator cActiveTitleBar sample
' Author: Steve McMahon (steve@vbaccelerator.com)
' Date: 25 August 1999
'
' Requires: SSUBTMR.DLL
' cActiveTitleBar.cls
'
' Copyright 1998-1999 Steve McMahon for vbAccelerator
'
-------------------------------------------------------------------------------
-------
' Visit vbAccelerator - advanced free source code for VB programmers
' http://vbaccelerator.com
'
-------------------------------------------------------------------------------
-------
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private c As New cActiveTitleBar
Private Sub cmdModalForm_Click()
frmAbout.Show vbModal, Me
End Sub
Private Sub cmdMsgBox_Click()
MsgBox "Testing Message Box.", vbExclamation
End Sub
Private Sub cmdToolWindow_Click()
Dim f As New frmToolWindow
f.ParentForm = Me
f.Show , Me
End Sub
Private Sub Command1_Click()
Dim f As New frmSDITest
f.Show
End Sub
Private Sub Form_Load()
c.Attach Me.hWnd
End Sub
Private Sub tmrActiveWindow_Timer()
lblhWNd.Caption = Hex$(GetActiveWindow()) '& "," & Hex$(Me.hwnd)
End Sub
|
|