Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 441
Top = 107
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'GetWindowSize Test'
ClientHeight = 211
ClientWidth = 476
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 34
Top = 32
Width = 95
Height = 13
Caption = 'Select Window Title'
end
object Label2: TLabel
Left = 34
Top = 100
Width = 165
Height = 13
Caption = 'The size of the selected window is:'
end
object lblSize: TLabel
Left = 236
Top = 96
Width = 6
Height = 20
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object MSComboBox1: tMSComboBox
Left = 34
Top = 50
Width = 375
Height = 21
Sorted = True
TabOrder = 0
end
object MSButton1: tMSButton
Left = 357
Top = 167
Width = 75
Height = 25
Caption = 'Exit'
ModalResult = 2
TabOrder = 1
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>Dialog1
GetWindowList>WindowList
SetDialogProperty>Dialog1,MSComboBox1,ListText,WindowList
AddDialogHandler>Dialog1,MSComboBox1,OnSelect,SetDialogCaption
show>Dialog1,DialogResult
SRT>SetDialogCaption
GetDialogProperty>Dialog1,msComboBox1,Text,WindowTitle
GetWindowSize>%WindowTitle%,nWidth,nHeight
Let>strCaption=%nWidth% x %nHeight%
SetDialogProperty>Dialog1,lblSize,Caption,strCaption
END>SetDialogCaption