Graphic Control - Load Image from File

Category: Controls - .Techniques

Date: 02-16-2022

Return to Index


'Compilable Example:  (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
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_01461
'Date: 03-10-2012


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