DECLARE FUNCTION ShowWindow LIB "user32" ALIAS "ShowWindow" (BYVAL hwnd AS LONG, BYVAL nCmdShow AS LONG) AS LONG
DECLARE FUNCTION FindWindow LIB "user32" ALIAS "FindWindowA" (BYVAL lpClassName AS LONG, BYVAL lpWindowName AS STRING) AS LONG
DECLARE SUB OvalBtn1Click (Sender AS QOVALBTN)
DECLARE SUB OvalBtn2Click (Sender AS QOVALBTN)
DECLARE SUB OvalBtn3Click (Sender AS QOVALBTN)
CREATE Form AS QFORM
CAPTION = "ShowHide"
Width = 413
Height = 103
COLOR=RGB(100,100,255)
Center
CREATE Label1 AS QLABEL
CAPTION = "Window Caption :"
Left = 3
Top = 6
Width = 88
Transparent = 1
END CREATE
CREATE OvalBtn1 AS QOVALBTN
CAPTION = "&Hide"
Left = 12
Top = 36
Width = 100
Height = 34
OnClick = OvalBtn1Click
END CREATE
CREATE OvalBtn2 AS QOVALBTN
CAPTION = "&Show"
Left = 156
Top = 36
Width = 100
Height = 34
OnClick = OvalBtn2Click
END CREATE
CREATE OvalBtn3 AS QOVALBTN
CAPTION = "&Close"
Left = 292
Top = 36
Width = 100
Height = 34
OnClick = OvalBtn3Click
END CREATE
CREATE Edit1 AS QEDIT
Text = "Calculator"
Left = 95
Top = 4
Width = 297
COLOR=RGB(200,255,200)
END CREATE
END CREATE
Form.SHOWMODAL
SUB OvalBtn1Click (Sender AS QOVALBTN)
showwindow(findwindow(null,edit1.text),0)
END SUB
SUB OvalBtn2Click (Sender AS QOVALBTN)
showwindow(findwindow(null,edit1.text),1)
END SUB
SUB OvalBtn3Click (Sender AS QOVALBTN)
application.terminate
END SUB
|