Results 1 to 2 of 2

Thread: Still having problem with Picture Property - Image loaded?

  1. #1

    Thread Starter
    Addicted Member Michel Jr's Avatar
    Join Date
    Jan 2000
    Location
    Brazil
    Posts
    175

    Question

    Hello,

    I'm developing an OCX.
    I created 2 picture properties (PictureLeft and PictureRight).
    If the PictureRight is "empty" then I need to load the
    PictureLeft image on it.
    My question is: How can I verify if a picture property
    is empty (there is no image loaded on it)?

    I already tryed to use
    If Picture1.Picture = LoadPicture("") Then...
    and
    If Picture1.Picture is Nothing Then...
    and
    If Picture1.Picture.Type = 0 Then...
    but they didn't work.


    This is my code:

    Public Property Set PictureRight(ByVal New_PictureRight As
    Picture)
    Set m_PictureRight = New_PictureRight
    PropertyChanged "PictureRight"
    End Property

    Public Property Set PictureLeft(ByVal New_PictureLeft As
    Picture)
    Set m_PictureLeft = New_PictureLeft
    PropertyChanged "PictureLeft"

    If PictureRight() = LoadPicture("") Then '<== HERE is
    ' my problem
    Set PictureRight = PictureLeft
    PropertyChanged "PictureRight"
    End If
    End Property


    Thanks a lot for any help.

    Michel Jr.

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    If Picture1.Picture Then ...

    I'm sure I suggested this before, Maybe I forgot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width