Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Animated GIFS in VB 5.0?

Posted on 1998-09-21
6
230 Views
Last Modified: 2010-04-30
Is it possible to place an animated GIF on a vb form and have it play, as if it was in a browser? And after making it an .EXE file will it still be animated?

Thank you much,
StupidStudent
0
Comment
Question by:stupidstudent
  • 4
  • 2
6 Comments
 
LVL 8

Expert Comment

by:Answers2000
ID: 1435774
The easiest way to do this is to place a IE web browser control on your form (SHDOCVW.DLL).

1. Bring up your form
2. Make sure WebBrowser is visible on the toolbar (it's a kinda world icon).  If not right click on the toolbar and make sure "Microsoft Internet Controls" is checked
3. In your code navigate to the GIF (it can be your local disk or the internet).  example:
Private Sub Command1_Click()
WebBrowser1.Navigate "c:\myimage.gif"
End Sub

It will animate.
It will also allow browsing to internet based graphics, jpgs and html etc.
0
 

Author Comment

by:stupidstudent
ID: 1435775
Hello Answers2000,

I still don't understand how to do it.  I am new to VB 5.0
I am currently running VB 5.0 Professional Edition.   Please help me further, and I apologize for any inconveniences...

Thank you kindly,
StupidStudent
0
 

Author Comment

by:stupidstudent
ID: 1435776
Adjusted points to 20
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:stupidstudent
ID: 1435777
Please clarify Answers2000.  I know that you can have a third party software (http://www.jcomsoft.com/) to do this but are there codes to do this?

Thanx.
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 20 total points
ID: 1435778
1. You must have Internet Explorer 3 or 4 installed.

2. Right click on the toolbar which has all the controls (edit, text boxes, picture boxes etc)

It'll bring up a dialog box on this dialog will be a long list of items with check boxes to the left of each.  Make sure "Microsoft Internet Controls" check box is ticked, and press OK.

3. You tool bar should now contain an icon which looks like a globe of earth.  Move the mouse over, and the tool tip should say "WebBrowser"

4. Click on WebBrowser icon

5. Drag out an area on your VB form.  It will appear gray like a "hole" in your form.

6. Add a push button to your form

7. Double click on the button, you should see code like

Private Sub Command1_Click()
End Sub

8. Edit this code to look like

Private Sub Command1_Click()
WebBrowser1.Navigate "c:\myimage.gif"
End Sub

9. This assumes your GIF file is called "C:\MYIMAGE.GIF"

I don't know what else to explain, you'll have to explain what your having difficulties with if this don't make sense.
0
 

Author Comment

by:stupidstudent
ID: 1435779
Thank you Answer2000, you have make it very clear for me.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
using Access 8 75
How to debug this code 7 64
Modifying Conditional Format from VBA code 3 59
Collapse and expand table in Word 2010 2 29
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question