A program called a calculator is an example and requires the image to be dynamically.
Below is the dialog and code I wrote.
I want to put the calculator screen in MSImage1.
Is there a good way?
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 1024
Top = 557
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 530
ClientWidth = 732
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -17
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 144
TextHeight = 20
object MSImage1: tMSImage
Left = 16
Top = 16
Width = 561
Height = 497
end
object MSButton1: tMSButton
Left = 591
Top = 18
Width = 130
Height = 55
Caption = 'MSButton1'
TabOrder = 8
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,MSButton1,OnClick,MSButton1_Clicked
Show>Dialog1,res1
SRT>MSButton1_Clicked
Let>lpWindowName=Calculator
Let>lpWindowName2=CustomDialog
LibFunc>User32,FindWindowA,Handle1,0,%lpWindowName%
LibFunc>User32,FindWindowA,Handle2,0,%lpWindowName2%
LibFunc>User32,PrintWindow,p,Handle1,Handle2,1
SetDialogProperty>Dialog1,MSImage1,LoadImage,%p% // I want to put the calculator screen in MSImage1. It doesn't work.
END>MSButton1_Clicked