https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/100193&feed=atom&action=history
Microsoft KB Archive/100193 - Revision history
2024-03-28T15:30:21Z
Revision history for this page on the wiki
MediaWiki 1.39.3
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/100193&diff=252973&oldid=prev
X010: Text replacement - """ to """
2020-07-19T11:31:38Z
<p>Text replacement - """ to """</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:31, 19 July 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l60">Line 60:</td>
<td colspan="2" class="diff-lineno">Line 60:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>To work around this problem, force the current system palette to be the palette used by the 3D command button and refresh the 3D command button. For example, make the following changes to the Picture2_Click event procedure listed in step 4 of the More Information section:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>To work around this problem, force the current system palette to be the palette used by the 3D command button and refresh the 3D command button. For example, make the following changes to the Picture2_Click event procedure listed in step 4 of the More Information section:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre class="codesample"> Sub Picture2_Click ()</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre class="codesample"> Sub Picture2_Click ()</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> Picture2.Picture = LoadPicture(<del style="font-weight: bold; text-decoration: none;">&quot;</del>c:\vb3\rainbow.dib<del style="font-weight: bold; text-decoration: none;">&quot;</del>)</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> Picture2.Picture = LoadPicture(<ins style="font-weight: bold; text-decoration: none;">"</ins>c:\vb3\rainbow.dib<ins style="font-weight: bold; text-decoration: none;">"</ins>)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ' Add the following two lines to force the picture that has</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ' Add the following two lines to force the picture that has</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l85">Line 85:</td>
<td colspan="2" class="diff-lineno">Line 85:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><li><p>Add the following code to your program in the appropriate places:</p></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><li><p>Add the following code to your program in the appropriate places:</p></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre class="codesample"> Sub Command3D1_Click ()</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre class="codesample"> Sub Command3D1_Click ()</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> Command3d1.Picture = LoadPicture(<del style="font-weight: bold; text-decoration: none;">&quot;</del>c:\windows\256color.bmp<del style="font-weight: bold; text-decoration: none;">&quot;</del>)</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> Command3d1.Picture = LoadPicture(<ins style="font-weight: bold; text-decoration: none;">"</ins>c:\windows\256color.bmp<ins style="font-weight: bold; text-decoration: none;">"</ins>)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> End Sub</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> End Sub</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Sub Picture1_Click ()</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Sub Picture1_Click ()</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> Picture1.Picture = LoadPicture(<del style="font-weight: bold; text-decoration: none;">&quot;</del>c:\windows\256color.bmp<del style="font-weight: bold; text-decoration: none;">&quot;</del>)</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> Picture1.Picture = LoadPicture(<ins style="font-weight: bold; text-decoration: none;">"</ins>c:\windows\256color.bmp<ins style="font-weight: bold; text-decoration: none;">"</ins>)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> End Sub</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> End Sub</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Sub Picture2_Click ()</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Sub Picture2_Click ()</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> Picture2.Picture = LoadPicture(<del style="font-weight: bold; text-decoration: none;">&quot;</del>c:\vb3\rainbow.dib<del style="font-weight: bold; text-decoration: none;">&quot;</del>)</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> Picture2.Picture = LoadPicture(<ins style="font-weight: bold; text-decoration: none;">"</ins>c:\vb3\rainbow.dib<ins style="font-weight: bold; text-decoration: none;">"</ins>)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> End Sub</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> End Sub</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </pre></li></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </pre></li></div></td></tr>
</table>
X010
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/100193&diff=45887&oldid=prev
3155ffGd: importing KB archive
2020-07-18T15:01:51Z
<p>importing KB archive</p>
<p><b>New page</b></p><div><div id="nsbanner"><br />
<br />
<div id="bannerrow1"><br />
<br />
{|<br />
| Knowledge Base<br />
|<br />
|}<br />
<br />
<br />
</div><br />
<div id="TitleRow"><br />
<br />
= <span id="KB100193"></span>BUG: 3D Button Loses 256-Color Palette When Load 2nd Bitmap =<br />
<br />
<br />
</div><br />
<br />
</div><br />
<div id="nstext" valign="BOTTOM"><br />
<br />
Article ID: 100193<br />
<br />
Article Last Modified on 1/8/2003<br />
<br />
<br />
-----<br />
<br />
APPLIES TO<br /><br />
<br /><br />
<br />
* Microsoft Visual Basic 3.0 Professional Edition<br />
<br />
<br />
-----<br />
<br />
<div class="notice_section"><br />
<br />
This article was previously published under Q100193<br />
<br />
</div><br />
<div class="symptoms_section"><br />
<br />
== SYMPTOMS ==<br />
<br />
If a second 256-color bitmap is loaded in another control after loading a 256-color bitmap in a 3D command button, the palette on the 3D command button is not restored.<br />
<br />
</div><br />
<div class="cause_section"><br />
<br />
== CAUSE ==<br />
<br />
The 3D command button control that is part of THREED.VBX does not restore its own palette. Instead, it uses the current system palette when a new 256-color bitmap is load into another control in the project. In effect this causes the 3D command button to use the palette of the new bitmap.<br />
<br />
</div><br />
<div class="workaround_section"><br />
<br />
== WORKAROUND ==<br />
<br />
To work around this problem, force the current system palette to be the palette used by the 3D command button and refresh the 3D command button. For example, make the following changes to the Picture2_Click event procedure listed in step 4 of the More Information section:<br />
<pre class="codesample"> Sub Picture2_Click ()<br />
Picture2.Picture = LoadPicture(&quot;c:\vb3\rainbow.dib&quot;)<br />
<br />
' Add the following two lines to force the picture that has<br />
' the same palette as Command3d1 to the top of the ZOrder:<br />
Picture1.ZOrder 0<br />
Command3d1.Refresh<br />
<br />
End Sub<br />
</pre><br />
Using the ZOrder method with zero as an argument moves Picture1 to the top of the ZOrder. This makes the palette for Picture1 the current system palette. Because Picture1 and Command3d1 have the same bitmap loaded, you can clear up the problem by forcing the palette of Picture1 to be the system palette and refreshing the Command3d1 control.<br />
<br />
</div><br />
<div class="status_section"><br />
<br />
== STATUS ==<br />
<br />
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.<br />
=== Steps to Reproduce Problem ===<br />
<br />
<ol><br />
<li>Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default.</li><br />
<li>From the File menu, choose Add File (ALT F, A) and add THREED.VBX to your project.</li><br />
<li>Add two picture boxes (Picture1 and Picture2) and one 3D command button (Command3d1) to the project.</li><br />
<li><p>Add the following code to your program in the appropriate places:</p><br />
<pre class="codesample"> Sub Command3D1_Click ()<br />
Command3d1.Picture = LoadPicture(&quot;c:\windows\256color.bmp&quot;)<br />
End Sub<br />
<br />
Sub Picture1_Click ()<br />
Picture1.Picture = LoadPicture(&quot;c:\windows\256color.bmp&quot;)<br />
End Sub<br />
<br />
Sub Picture2_Click ()<br />
Picture2.Picture = LoadPicture(&quot;c:\vb3\rainbow.dib&quot;)<br />
End Sub<br />
</pre></li><br />
<li>From the Run menu, choose start (ALT, R, S), or press F5.</li><br />
<li>Click Picture1.</li><br />
<li>Click Command3d1. Picture1 and Command3d1 should now contain the same bitmap image.</li><br />
<li>Click Picture2. Notice that the bitmap in Picture1 has maintained its palette and the bitmap in Command3d1 has lost its original colors.</li></ol><br />
<br />
<br />
</div><br />
<br /><br />
<br />
Additional query words: buglist3.00 3.00<br />
<br />
Keywords: kbbug KB100193<br />
<br />
<div class="footer"><br />
<br />
<br /><br />
<br />
<br />
-----<br />
<br />
[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]<br />
<br />
<span>© Microsoft Corporation. All rights reserved.</span><br />
<br />
<br />
</div><br />
<br />
</div></div>
3155ffGd