![]()  | 
 
SOLVED - Loading a graphic from a resource file | 
 
    Post Reply  
   | 
  
| Author | |
   
   DaveB  
   
   Groupie  
   Joined: 13 March 2009 Status: Offline Points: 52  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: SOLVED - Loading a graphic from a resource filePosted: 07 April 2009 at 4:14pm  | 
 
| 
   
    
   I want to load pgn's from a .rc file to use on the toolbar buttons of a ribbon.  If I have a resource of: 
 
   
        ID_FILE_EXIT     PNG     Exit.png 
in my .rc file (compiled to Legacy.res)  how do I load it?  (I am using VB6) 
Normally I use LoadResPicture(ID_FILE_EXIT, vbResBitmap). 
In the ribbon control I assume I should use .LoadBitmapFromResource but I can't figure out what the first couple parameters should be. 
Can anyone tell me what I should use? 
DaveB 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 08 April 2009 at 12:51am | 
 
| 
   
    
   Hi,
 
   
  Yes, LoadBitmapFromResource  will work. Use App.Instance as parameter.  But problem of such method that only compiled exe will have this resource - you won't see bitmap inside IDE. so guess its easy use ImageManager to load png in designtime. 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |