<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Loadbitmapfromresource</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Loadbitmapfromresource]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 13:17:51 +0000</pubDate>
  <lastBuildDate>Sat, 12 Apr 2008 12:19:27 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=9901</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Loadbitmapfromresource : Thanks Guys, I mange to solve...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=33570&amp;title=loadbitmapfromresource#33570</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2890">WaleedSeada</a><br /><strong>Subject:</strong> 9901<br /><strong>Posted:</strong> 12 April 2008 at 12:19pm<br /><br /><P>Thanks Guys, I mange to solve that issue ..</P><P>&nbsp;</P><P>Best regards,</P>]]>
   </description>
   <pubDate>Sat, 12 Apr 2008 12:19:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=33570&amp;title=loadbitmapfromresource#33570</guid>
  </item> 
  <item>
   <title><![CDATA[Loadbitmapfromresource : Hello ijwelch,  Thanks for your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=33558&amp;title=loadbitmapfromresource#33558</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2890">WaleedSeada</a><br /><strong>Subject:</strong> 9901<br /><strong>Posted:</strong> 12 April 2008 at 9:46am<br /><br />Hello <a href="https://forum.codejock.com/member_profile.asp?PF=2113&amp;FID=116" target="_blank"><strong><FONT color=#000000>ijwelch</FONT></strong></A>,<DIV>&nbsp;</DIV><DIV>Thanks for your example, I try to load one bitmap and it shown okay, when I try to load another one&nbsp;the commandbar doesn't show any image;</DIV><DIV>&nbsp;</DIV><DIV>here is the code I have:</DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; Dim MainModulesIDs(), SubModulesIDs() As Long<BR>&nbsp;&nbsp;&nbsp; Dim oRes As CResource</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; </FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; Set oRes = New CResource<BR>&nbsp;&nbsp;&nbsp; oRes.Init App.Path &amp; "\xxxxx.DLL"</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; ReDim MainModulesIDs(16)<BR>&nbsp;&nbsp;&nbsp; MainModulesIDs(0) = ID_1</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; MainModulesIDs(1) = ID_2<BR>&nbsp;&nbsp;&nbsp; MainModulesIDs(2) = ID_3</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; </FONT><FONT size=1>and so on ....</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; CommandBars.Icons.LoadBitmapFromResource oRes.hModule, 1000, MainModulesIDs(), xtpImageNormal</FONT><BR><FONT size=1>(this went fine for the first time)</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; ReDim SubModulesIDs(8)<BR>&nbsp;&nbsp;&nbsp; SubModulesIDs(0) = ID_10<BR>&nbsp;&nbsp;&nbsp; SubModulesIDs(1) = ID_11<BR>&nbsp;&nbsp;&nbsp; SubModulesIDs(2) = ID_12<BR>&nbsp;&nbsp;&nbsp; </FONT><FONT size=1>and so on ...</FONT></DIV><DIV>&nbsp;&nbsp;&nbsp; CommandBars.Icons.LoadBitmapFromResource oRes.hModule, 1001, SubModulesIDs(), xtpImageNormal</DIV><DIV>&nbsp;</DIV><DIV>the only difference is that I added then to the commandbars.icons not to the ImageManager ...</DIV><DIV>&nbsp;</DIV><DIV>any ideas ...</DIV><DIV>&nbsp;</DIV><DIV>Best regards,</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 12 Apr 2008 09:46:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=33558&amp;title=loadbitmapfromresource#33558</guid>
  </item> 
  <item>
   <title><![CDATA[Loadbitmapfromresource : Thanks ijwelch, VB examples can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32347&amp;title=loadbitmapfromresource#32347</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2890">WaleedSeada</a><br /><strong>Subject:</strong> 9901<br /><strong>Posted:</strong> 18 March 2008 at 3:05am<br /><br /><P>Thanks <a href="https://forum.codejock.com/member_profile.asp?PF=2113&amp;FID=24" target="_blank"><strong><FONT color=#000000>ijwelch</FONT></strong></A>, VB examples can always help.</P><DIV>&nbsp;</DIV><DIV>again thanks for your reply.</DIV><DIV>Best,</DIV>]]>
   </description>
   <pubDate>Tue, 18 Mar 2008 03:05:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32347&amp;title=loadbitmapfromresource#32347</guid>
  </item> 
  <item>
   <title><![CDATA[Loadbitmapfromresource : Hi, here&amp;#039;s VB6 code: This...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32301&amp;title=loadbitmapfromresource#32301</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2113">ijwelch</a><br /><strong>Subject:</strong> 9901<br /><strong>Posted:</strong> 16 March 2008 at 11:04pm<br /><br />Hi, here's VB6 code:<br><br>This in new class named CResource:<br><br><font color="#660000"><font color="#003300">Option Explicit<br><br>Private Const ERR_BASE As Long = 3375<br><br>Private Const FORMAT_MESSAGE_FROM_SYSTEM = &amp;H1000<br>Private Const FORMAT_MESSAGE_IGNORE_INSERTS = &amp;H200<br>Private Declare Function FormatMessage _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lib "kernel32" _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alias "FormatMessageA" (ByVal dwFlags As Long, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lpSource As Any, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ByVal dwMessageId As Long, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lib "kernel32" _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alias "LoadLibraryExA" (ByVal lpLibFileName As String, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ByVal hFile As Long, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ByVal dwFlags As Long) As Long<br>Private Declare Function FreeLibrary _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lib "kernel32" (ByVal hLibModule As Long) As Long<br>Private m_sFileName As String<br>Private m_hMod As Long<br><br>Public Property Get Filename() As String<br>&nbsp;&nbsp;&nbsp; Filename = m_sFileName<br>End Property<br><br>Public Property Let Filename(ByVal sFileName As String)<br>&nbsp;&nbsp;&nbsp; Init sFileName<br>End Property<br><br>Public Property Get hModule() As Long<br>&nbsp;&nbsp;&nbsp; hModule = m_hMod<br>End Property<br><br>Public Function Init(ResourceFile As String) As Boolean<br>&nbsp;&nbsp;&nbsp; On Error GoTo ErrHandler<br>&nbsp;&nbsp;&nbsp; pClearUp<br>&nbsp;&nbsp;&nbsp; m_sFileName = ResourceFile<br><br>&nbsp;&nbsp;&nbsp; If Not (m_sFileName = "") Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_hMod = LoadLibraryEx(m_sFileName, 0, 0)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If (m_hMod = 0) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Err.Raise vbObjectError + 1048 + 1, "CResource", pWinError( _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Err.LastDllError)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Init = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Init = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp; Exit Function<br>ErrHandler:<br><br>&nbsp;&nbsp;&nbsp; Err.Raise vbObjectError + ERR_BASE, "CResource.Init", _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "CResource component failure in Function Init"<br>End Function<br><br>Private Sub Class_Terminate()<br>&nbsp;&nbsp;&nbsp; pClearUp<br>End Sub<br><br>Private Sub pClearUp()<br>&nbsp;&nbsp;&nbsp; On Error Resume Next<br><br>&nbsp;&nbsp;&nbsp; If (m_hMod &lt;&gt; 0) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FreeLibrary m_hMod<br>&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp; m_hMod = 0<br>&nbsp;&nbsp;&nbsp; m_sFileName = ""<br>End Sub<br><br>Private Function pWinError(ByVal lLastDLLError As Long) As String<br>&nbsp;&nbsp;&nbsp; On Error Resume Next<br>&nbsp;&nbsp;&nbsp; Dim sBuff As String<br>&nbsp;&nbsp;&nbsp; Dim lCount As Long<br><br>&nbsp;&nbsp;&nbsp; sBuff = String$(256, 0)<br>&nbsp;&nbsp;&nbsp; lCount = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM Or _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FORMAT_MESSAGE_IGNORE_INSERTS, 0, lLastDLLError, 0&amp;, sBuff, Len( _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sBuff), ByVal 0)<br><br>&nbsp;&nbsp;&nbsp; If lCount Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pWinError = Left$(sBuff, lCount)<br>&nbsp;&nbsp;&nbsp; End If<br><br>End Function</font><br><br><br><font color="#000000">Then use it with code like this:<br><br><br></font></font><font color="#006600">Private Sub pLoadResources()<br>&nbsp;&nbsp;&nbsp; Dim IDS() As Long<br>&nbsp;&nbsp;&nbsp; Dim oRes As CResource<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; ReDim IDS(7)<br>&nbsp;&nbsp;&nbsp; IDS(0) = ID_VIEWTHUMBS<br>&nbsp;&nbsp;&nbsp; IDS(1) = ID_VIEWICONS<br>&nbsp;&nbsp;&nbsp; IDS(2) = ID_VIEWSMALLICONS<br>&nbsp;&nbsp;&nbsp; IDS(3) = ID_VIEWLIST<br>&nbsp;&nbsp;&nbsp; IDS(4) = ID_VIEWDETAILS<br>&nbsp;&nbsp;&nbsp; IDS(5) = ID_SHOWGROUPS<br>&nbsp;&nbsp;&nbsp; IDS(6) = ID_ARROWDOWN<br>&nbsp;&nbsp;&nbsp; IDS(7) = ID_ARROWUP<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Set oRes = New CResource<br>&nbsp;&nbsp;&nbsp; oRes.Init "C:\The path to MyResourceDLL.dll"<br>&nbsp;&nbsp;&nbsp; ImageManager1.Icons.LoadBitmapFromResource oRes.hModule, 1000, IDS(), xtpImageNormal<br>&nbsp;&nbsp;&nbsp; Set oRes = Nothing<br>&nbsp;&nbsp;&nbsp; <br>End Sub</font><br>]]>
   </description>
   <pubDate>Sun, 16 Mar 2008 23:04:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32301&amp;title=loadbitmapfromresource#32301</guid>
  </item> 
  <item>
   <title><![CDATA[Loadbitmapfromresource : Hi,  Use ImageMaanger control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32298&amp;title=loadbitmapfromresource#32298</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9901<br /><strong>Posted:</strong> 16 March 2008 at 3:12pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Use ImageMaanger control instead. Add ImageManager to form, show properties and add icons you need.</DIV>]]>
   </description>
   <pubDate>Sun, 16 Mar 2008 15:12:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32298&amp;title=loadbitmapfromresource#32298</guid>
  </item> 
  <item>
   <title><![CDATA[Loadbitmapfromresource : Hello All,  I want to implement...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32291&amp;title=loadbitmapfromresource#32291</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2890">WaleedSeada</a><br /><strong>Subject:</strong> 9901<br /><strong>Posted:</strong> 16 March 2008 at 10:23am<br /><br />Hello All,<DIV>&nbsp;</DIV><DIV>I want to implement the loadbitmapfrom resource, but i can't get it to work.</DIV><DIV>&nbsp;</DIV><DIV>can anyone paste a sample of the script to do that.</DIV><DIV>&nbsp;</DIV><DIV>Best regards</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 16 Mar 2008 10:23:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9901&amp;PID=32291&amp;title=loadbitmapfromresource#32291</guid>
  </item> 
 </channel>
</rss>