9.0
139
Example
Declare Function GetForegroundWindow& Lib "user32" ()
Declare Function
GetWindowTextLengthA& Lib "user32"(ByVal hwnd&)
Declare Sub
GetWindowTextA Lib "user32"(ByVal hwnd&, ByVal lpsz$, ByVal cbMax&)
Function
ActiveWindowTitle$()
ActiveWindowTitle$ = vbCr
ActiveWindow = GetForegroundWindow()
TitleLen = GetWindowTextLengthA(ActiveWindow)
If TitleLen > 0 Then
TitleLen = TitleLen + 1
Title$ = Space
$(TitleLen)
GetWindowTextA ActiveWindow,Title$,TitleLen
ActiveWindowTitle$ = Title$
End If
End Function
C:\ABCTemp\vbs\Sub_Definition.htm
Sub
Main
Clipboard ActiveWindowTitle$
End Sub
Def Definition
Syntax
Def{Bool|Cur|Date|Dbl|Int|Lng|Obj|Sng|Str|Var} _
letterrange[, ...]
Group
Declaration
Description
Define untyped variables as:
DefBool - Boolean
DefByte - Byte
DefCur - Currency
DefDate - Date
DefDbl - Double
DefInt - Integer
DefLng - Long
DefObj - Object
DefSng - Single
DefStr - String
DefVar - Variant
Parameter Description
letterran
g
e letter, o
r
A letter is one of A to Z. When letter-letter is used, the first letter must be










