|
-
Sep 24th, 2001, 03:42 AM
#1
Thread Starter
Junior Member
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!!!!!
-
Sep 24th, 2001, 04:34 AM
#2
Member
?? 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.
-
Sep 24th, 2001, 06:30 AM
#3
PowerPoster
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..
-
Sep 24th, 2001, 06:41 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|