Graphic Control - Load Image from File

Category: Controls - .Techniques

Date: 03-28-2012

Return to Index


'Compilable Example:
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
Global hDlg As Dword
%IDC_GraphicA = 500
%IDC_GraphicB = 501
 
Function PBMain() As Long
   Dialog New Pixels, 0, "Show Image",500,400,250,150, %WS_OverlappedWindow To hDlg
   'load from file
   Control Add Graphic, hDlg, %IDC_GraphicA, "", 10,10,100,100
   Graphic Attach hDlg, %IDC_GraphicA
   Graphic Render "face.bmp", (0,0)-(99,99)
   Dialog Show Modal hDlg
End Function
 
'gbs_01143
'Date: 03-10-2012


created by gbSnippets
http://www.garybeene.com/sw/gbsnippets.htm