Results 1 to 4 of 4

Thread: AN Urgent Query

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2001
    Posts
    16

    AN Urgent Query

    Hi,

    Can any of you tell me how an gif file can be called in VB without disturbing its Animation effects.The picture should be embedded in the form and not called in Internet Explore or any application through OLE.

    Thank You!!!!!

  2. #2
    Member SapphireGreen's Avatar
    Join Date
    Sep 2001
    Location
    I do not actually exist
    Posts
    45
    ?? I don't quite understand the question, but if you want to load a picture, you could use the LoadPicture("C:\YourFile.gif"), but that is slow, and could disturb the process.

    You could use DC's, like so:

    DC_Pic = CreateCompatibleDC(Me.hdc)
    SelectObject DC_Pic(LoadPicture("C:\YourFile.gif"))

    Do that in Form_Load, and then when you want the picture, call

    Object.Picture = DC_Pic.

    Note: You will need the correct API's. There are:

    CreateCompatibleDC
    SelectObject
    DeleteObject

    Make sure you delete the DC afterwards, like so:

    DeleteObject DC_Pic

    I hope that answers your question.
    On Error Give Up

    Mind over matter. Then if it doesn't matter, you lose your mind.

  3. #3
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    When loading the file using LoadPicture youll lose the GIF animation and just get the first frame, thats his problem...
    There are controls to open and play GIF animations but im afraid I cant help you in any way ATM - sorry..

  4. #4
    Zaei
    Guest
    Besides, VB uses OLE Automation almost exclusively.

    Z.

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