$OPTIMIZE ON
$APPTYPE GUI
$TYPECHECK ON
$INCLUDE "C:\rapidq\incs\rqdialog.inc"
DEFSTR Sfilename
DECLARE SUB OpenSaveDlog
DECLARE SUB OpenSaveNoPrompt
DECLARE SUB OpenOpen
CREATE Bfont AS QFONT
Name= "Arial"
Size= 8
COLOR= 0
Bold= 1
Italic= 0
END CREATE
CREATE Form AS QFORM
CAPTION= "Test RQDialogs"
Font= Bfont
Width= 520
Height= 220
Center
CREATE Edit1 AS QEDIT
Text= "RapidQ"
Top= 25
Left= 100
Width= 340
END CREATE
CREATE Label2 AS QLABEL
CAPTION= "Caption:"
Autosize= 1
Transparent= 1
Top= 10
Left= 100
END CREATE
CREATE Label3 AS QLABEL
CAPTION= "Filter:"
Autosize= 1
Transparent= 1
Top= 65
Left= 100
END CREATE
CREATE Edit2 AS QEDIT
Text= "RapidQ Files (*.rq*,*.bas)|*.rq*;*.bas|Text Files (*.txt)|*.txt"
Top= 80
Left= 100
Width= 340
END CREATE
CREATE Button5 AS QBUTTON
CAPTION= "Save As"
Top= 135
Left= 100
Width= 80
Onclick=opensavedlog
END CREATE
CREATE Button6 AS QBUTTON
CAPTION= "Save No Prompt"
Top= 135
Left= 225
Width= 100
Onclick=OpenSaveNoPrompt
END CREATE
CREATE Button7 AS QBUTTON
CAPTION= "Open"
Top= 135
Left= 370
Width= 80
Onclick=OpenOpen
END CREATE
END CREATE
SUB OpenSaveDlog
Sfilename=RQshowdialog(Edit1.Text,Edit2.Text,1, ,1,0,Form.Handle)
IF Sfilename<>"" THEN
SHOWMESSAGE Sfilename
END IF
END SUB
SUB OpenSaveNoPrompt
Sfilename=RQshowdialog(Edit1.Text,Edit2.Text,1,"C:\",1,1,Form.Handle)
IF Sfilename<>"" THEN
SHOWMESSAGE Sfilename
END IF
END SUB
SUB OpenOpen
Sfilename= RQshowdialog(Edit1.Text,Edit2.Text,1, ,0,0,Form.Handle)
IF Sfilename<>"" THEN
SHOWMESSAGE Sfilename
END IF
END SUB
Form.SHOWMODAL
|