Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.jpg image on form
Message
 
 
To
26/08/2002 09:31:57
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00693613
Message ID:
00693621
Views:
17
What VFP version are you usind and do you've the latest VFP SP's installed?
BTW, You can simplify your code.
WITH thisform.Pageframe1.Page1.Pageframe1
  m_look1 = m_dismodpath+'d'+ALLTRIM(Base.lcode)+'.jpg'
  m_look2 = m_disdefpath+'d'+ALLTRIM(Base.lcode)+'.jpg'
  DO CASE
  CASE FILE(m_look1)
    .Page2.Image1.Picture = m_look1
  CASE FILE(m_look2)
    .Page3.Image1.Picture = m_look2
  OTHERWISE
    .Page3.Image1.Picture = m_disdefpath+'nopic.bmp'
  ENDCASE
ENDWITH
>I have an application where I display an image on a form. I search for a specific .jpg image. If it exists, I display it, otherwise I display a default .bmp image that simply says there is no image available.
>
>The code in the pageframe refresh event is as follows:
>
>* Locate the appropriate graphics image for display
>
>m_look = m_dismodpath+'d'+ALLTRIM(Base.lcode)+'.jpg'
>IF FILE('&m_look')
> thisform.Pageframe1.Page1.Pageframe1.Page2.Image1.Picture = m_look
> ELSE
> m_look = m_disdefpath+'d'+ALLTRIM(Base.lcode)+'.jpg'
> IF FILE('&m_look')
> thisform.Pageframe1.Page1.Pageframe1.Page3.Image1.Picture = m_look
> ELSE
> thisform.Pageframe1.Page1.Pageframe1.Page3.Image1.Picture = m_disdefpath+'nopic.bmp'
> ENDIF
> ENDIF
>
>This code works fine running under Windows 2000, but I'm getting mixed results on Windows 98. On occasion it works, but in most instances I am getting the error message:
>
>Fatal error: Exception Code=C0000005
>
>Any thoughts?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform