Page 1 of 2

Picture Changed Event

Posted: Tue Nov 27, 2007 3:54 am
by fbmachines
Hey Loïc,
Earlier this year, at my request, you added a picture change event. I am now pleading with you to reconsider adding a picture changed event that is triggered after the picture has changed (not before) and only when the image is different than the image already loaded in the viewer. You supplied a workaround at the end of the previous post listed above. This feature would make my life and coding experience so much easier, so please I am begging you (Sorry to sound so pathetic). I've been away for several months and didn't realize version 4 came out. WOW, nice work!

Posted: Wed Nov 28, 2007 12:47 pm
by Loïc
Hi Corey.

You won !
I will add a PictureChanged event within the next release.

Best regards,

Loïc

Posted: Wed Nov 28, 2007 3:12 pm
by fbmachines
Loïc,
LOL! Thank you so very much. This is one of the many reasons that your product, in my opinion, stands out from the rest. I really appreciate it.

Posted: Fri Nov 30, 2007 1:47 pm
by Loïc
Thank you very much Corey :wink:



Loïc

Posted: Wed Dec 12, 2007 12:18 am
by fbmachines
Hey Loïc,
Sorry to be a pest but I can't get the PictureChanged event to trigger. Also, the PictureChange event now triggers like the diplayed event. It triggers everytime an image is loaded into the viewer even if it is the same that is currently in the viewer (or sometimes not at all).

Posted: Wed Dec 12, 2007 12:23 pm
by Loïc
Hi Corey,

You are not a pest at all :lol:


I've uploaded a fixed edition. Please download the last update and try again...

Best regards,

Loïc

Posted: Wed Dec 12, 2007 3:24 pm
by fbmachines
Loïc,
4.5.1 fixed the "picture changed" event not triggering at all but now both are triggered even when the image currently loaded is the same as the image you are loading.

Posted: Wed Dec 12, 2007 4:14 pm
by Loïc
I am terribly sorry for this problem Corey but this task is not as simple as it sounds.

I've made another fix and I think that all is working now.

Please download again from the GdPicture website.

Regards,

Loïc

Posted: Wed Dec 12, 2007 11:40 pm
by fbmachines
No problem Loic. I can't find the latest fixed version. I have re-download the package but it is the same as the non working 4.5.1. I have also checked...

https://www.gdpicture.com/ressources/ocx/
https://www.gdpicture.com/ressources/betas/

...and can't find it.
Thanks

Posted: Thu Dec 13, 2007 11:29 am
by Loïc
Hi,

I think that your browser didn't refresh the content of the website.

I can find the 4.5.2 release in both https://www.gdpicture.com/softwares.php folder and https://www.gdpicture.com/ressources/ocx/

Regards,

Loïc

Posted: Thu Dec 13, 2007 2:49 pm
by fbmachines
Hey Loic,
That must have been it. I downloaded the latest version (5.4.2) and tested it but no luck. How are you testing it? I just created a button and put a "DisplayFromFile" to load a "hard coded" image in the click event. When I click the button for a second time (the same picture loads) both the change and changed events trigger when they shouldn't (because the picture didn't change).


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
oGdViewer.DisplayFromFile("path")
End Sub

Private Sub oGdViewer_PictureChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles oGdViewer.PictureChange
MsgBox("Change")
End Sub

Private Sub oGdViewer_PictureChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles oGdViewer.PictureChanged
MsgBox("Changed")
End Sub


I am using VS.net 2008

Posted: Fri Dec 14, 2007 3:40 pm
by Loïc
Corey,

For the component a new picture is a new "picture object" which get a different handle than all the other objects.

In this case if you open two identical images in two distinct processes the GdViewer object will consider them as two different pictures.


Best regards,

Loïc

Re: Picture Changed Event

Posted: Wed Oct 29, 2008 7:33 am
by cclambie
Hi,

I am trying to use the picturechanged event to display a AJAX style loader, however I am getting an error:
Expected ')' on the first line of
Private Sub oGdViewer_PictureChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles oGdViewer.PictureChange
MsgBox("Change")
End Sub

Any ideas?

Re: Picture Changed Event

Posted: Wed Oct 29, 2008 6:02 pm
by Loïc
Hi,

I have never programmed with Ajax.
However I suppose that the syntax should be quite different ?



maybe this link could help you: http://weblogs.asp.net/bleroy/archive/2 ... asses.aspx


Best regards,

Loïc

Re: Picture Changed Event

Posted: Fri Dec 19, 2008 6:33 am
by cclambie
Hi Loic,

It is not Ajax as such, more Client Side appearance.

I want to use the local event _PictureChange and _PictureChanged to show an img instead of "nothing" while the picture/PDF loads into a hidden DIV then reappears.
This is done with this code here, it the _PictureChange event / routine worked.

Is there something else I would need to do, to make this work? I am operating in ASP classic environment, using VBScript as client side Scripting tool, on IE 6.

Private Sub MyGdViewer_PictureChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyGdViewer.PictureChange
MsgBox("Change")
document.getElementById("loader").style.display = ""
document.getElementById("picture").style.display = "none"

End Sub

Private Sub MyGdViewer_PictureChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyGdViewer.PictureChanged
MsgBox("Changed")
document.getElementById("picture").style.display = ""
document.getElementById("loader").style.display = "none"

End Sub

(Only just revisting this now, although I did not receive email notification of your reply?)