Microsoft KB Archive/172690: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 12: Line 12:
<div id="TitleRow">
<div id="TitleRow">


= <span id="KB172690"></span>PRB: LoadPicture() Causes &quot;File Access is Denied&quot; Error =
= <span id="KB172690"></span>PRB: LoadPicture() Causes "File Access is Denied" Error =




Line 81: Line 81:
<br />
<br />
NOTE: The upper-level directory may be different, depending upon the directory name in which Visual FoxPro 5.0a was installed.</li>
NOTE: The upper-level directory may be different, depending upon the directory name in which Visual FoxPro 5.0a was installed.</li>
<li>In Visual FoxPro, create a new form named &quot;MyTest.&quot;</li>
<li>In Visual FoxPro, create a new form named "MyTest."</li>
<li>Add an Microsoft Tabbed Dialog ActiveX control to the form and change the Name property to &quot;tabdc1.&quot;</li>
<li>Add an Microsoft Tabbed Dialog ActiveX control to the form and change the Name property to "tabdc1."</li>
<li><p>In the INIT event of the form, put in the following code:</p>
<li><p>In the INIT event of the form, put in the following code:</p>
<pre class="codesample">      Thisform.tabdc1.Object.Picture= ;
<pre class="codesample">      Thisform.tabdc1.Object.Picture= ;
       LoadPicture(Home()+&quot;Samples\graphics\bmps\assorted\balloon.bmp&quot;)</pre></li>
       LoadPicture(Home()+"Samples\graphics\bmps\assorted\balloon.bmp")</pre></li>
<li>Save and Run the form.<br />
<li>Save and Run the form.<br />
The error &quot;File Access is Denied&quot; appears.</li></ol>
The error "File Access is Denied" appears.</li></ol>





Latest revision as of 11:06, 21 July 2020

Article ID: 172690

Article Last Modified on 12/11/1999



APPLIES TO

  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 5.0a



This article was previously published under Q172690

SYMPTOMS

In Visual FoxPro 5.x, using the LoadPicture function to create an object reference for a read-only bitmap or icon generates the following error message:

File Access is Denied.

RESOLUTION

Remove the read-only attribute from the bitmap or icon file.

-OR-

Assign the read-only bitmap or icon to the control at design time.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. In Windows Explorer, go to VFP5.0a\Samples\Graphics\Bmps\Assorted and change the Balloon.bmp file attribute to Read-only.

    NOTE: The upper-level directory may be different, depending upon the directory name in which Visual FoxPro 5.0a was installed.
  2. In Visual FoxPro, create a new form named "MyTest."
  3. Add an Microsoft Tabbed Dialog ActiveX control to the form and change the Name property to "tabdc1."
  4. In the INIT event of the form, put in the following code:

          Thisform.tabdc1.Object.Picture= ;
          LoadPicture(Home()+"Samples\graphics\bmps\assorted\balloon.bmp")
  5. Save and Run the form.
    The error "File Access is Denied" appears.



Additional query words: foxwin loadpicture activex tabbed dialog control readonly

Keywords: kberrmsg kbprb KB172690