Load an active .GIF image into a form?

John K.
Bacau,

Oct 15, 2011
55 Posts

0  |  0  

Re: Load an active .GIF image into a form?

How can I load a .GIF image into a form created with ATEasy? I've created an APicture object and load a GIF file within, but that GIF is depicted as an image file (.JPG or .BMP, a static image that is...). How can I load that .GIF and make it run its pre-configured schedule? Thank you.

DrATEasy (Ron Y.)
Mission Viejo, CA

Oct 17, 2011
358 Posts

0  |  0  

Re: Load an active .GIF image into a form?

Do mean animated GIF file? If yes, you can use the ATEasy ALog control in HTML mode (PlainText property set to False) and append an image tag with the GIF file. For more information about the image tag see http://www.w3schools.com/tags/tag_img.asp.

John K.
Bacau,

Oct 17, 2011
55 Posts

0  |  0  

Re: Load an active .GIF image into a form?

Hi, Ronnie! Yes, I mean animated GIF file. But not into a log. I mean appending the animated GIF into a form. Let me give some details: I want to create a form that is loaded between two instances of a program, a so called 'waiting form'. Within this waiting form, I want to load an animated GIF that depicts a sand glass simulating the passing time and informing the user that he/she has to wait a bit. I don't know how to load that animated GIF. I've added an APicture control to the form with the animated GIF loaded, but the image isn't animated at all! It is a static image with no change in time.
I hope you got my point. Any help is welcomed. Thank you.

Regards,

Johnnie

DrATEasy (Ron Y.)
Mission Viejo, CA

Oct 18, 2011
358 Posts

0  |  0  

Re: Load an active .GIF image into a form?

APicture does not support animated gif. You will need to place the ALog control on your form and append the image tag as mentioned. The end result  should look the same as APicture.

John K.
Bacau,

Oct 18, 2011
55 Posts

0  |  0  

Re: Load an active .GIF image into a form?

Hi, Ron! First of all, thank you for your replies! Well, the end result doesn't look the same as APicture because the ALog control has a default scroll bar in the right of its screen and I didn't managed to remove it :(. Despite this, the GIF is working as you said. Isn't there another way to load that GIF so the scroll bar doesn't appear in the right (and bottom) of the screen?
Maybe a method or a function from some sort of animation .DLL, but I don't know any.

DrATEasy (Ron Y.)
Mission Viejo, CA

Oct 18, 2011
358 Posts

0  |  0  

Re: Load an active .GIF image into a form?

To hide ALog's scrollbar, which is displayed by default, insert the following codes into ALog's OnDocumentComplete() event:
    log1.Document.body.setAttribute("scroll", "no")

If you like to reduce the border around the image, use the following in the form OnLoad():
The border around the image can be removed by setting the ALog control's margins to 0. For example, insert the following codes into AForm's OnLoad() event to align the image at the TopLeft corner of ALog control :

    log1.Document.Body.LeftMargin=0
    log1.Document.Body.TopMargin=0

Solution Available
John K.
Bacau,

Oct 18, 2011
55 Posts

1  |  0  

Re: Load an active .GIF image into a form?

Thank you, Ron! Only that the statements :
   log1.Document.Body.LeftMargin=0
   log1.Document.Body.TopMargin=0  wouldn't work in AForm's OnLoad()  (error: object is null). I think the form hasn't finished to load (paint) the ALog object and that's why it gave me that error message repeatedly. Anyway, it works fine if I put these two statements in ALog's OnDocumentComplete() event, among with  log1.Document.body.setAttribute("scroll", "no") . Thank you very much for your kindness in helping me. Have a nice day!



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]