[Gambas-user] How to set the icon property of a form from a file in the project

John Rose john.aaron.rose at ...626...
Mon Dec 16 11:52:01 CET 2013


I want to set the FMain form's icon property (in the FMain Form_Open 
sub) to the picture contained in a .png file which I've added to to the 
Data section (of the Gambas IDE). Here is my non-working code, which 
gives 'Null Object' at runtime:
   Dim picIcon As Picture
   picIcon.Load("StreamRecorder.png")
   FMain.Icon = picIcon

What do I change?

PS the app is also called StreamRecorder.

-- 
Regards, John



More information about the User mailing list