Syntax
| DlgSetPicture DlgItem|$, FileName, Type
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Instruction: Set the file name for DlgItem|$.
This instruction/function must be called directly or indirectly from a dialogfunc.
| ||||||||||||||||
See Also
| |||||||||||||||||
Example
| Sub Main
Begin Dialog UserDialog 200,120,.DialogFunc
Picture 10,10,180,75,"",0,.Picture
OKButton 30,90,60,20
PushButton 110,90,60,20,"&View"
End Dialog
Dim dlg As UserDialog
Debug.Print Dialog(dlg)
End Sub
Function DialogFunc%(DlgItem$, Action%, SuppValue%)
Debug.Print "Action=";Action%
Select Case Action%
Case 1 ' Dialog box initialization
Beep
Case 2 ' Value changing or button pressed
Select Case DlgItem$
Case "View"
FileName = GetFilePath("Bitmap","BMP")
DlgSetPicture "Picture",FileName,0
DialogFunc% = True 'do not exit the dialog
End Select
End Select
End Function
|