Picture Changed Event

Feature Requests for GdPicture.NET.
fbmachines
Posts: 24
Joined: Tue Nov 27, 2007 2:50 am

Picture Changed Event

Post by fbmachines » Tue Nov 27, 2007 3:54 am

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!

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Wed Nov 28, 2007 12:47 pm

Hi Corey.

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

Best regards,

Loïc

fbmachines
Posts: 24
Joined: Tue Nov 27, 2007 2:50 am

Post by fbmachines » Wed Nov 28, 2007 3:12 pm

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.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Fri Nov 30, 2007 1:47 pm

Thank you very much Corey :wink:



Loïc

fbmachines
Posts: 24
Joined: Tue Nov 27, 2007 2:50 am

Post by fbmachines » Wed Dec 12, 2007 12:18 am

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).

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Wed Dec 12, 2007 12:23 pm

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

fbmachines
Posts: 24
Joined: Tue Nov 27, 2007 2:50 am

Post by fbmachines » Wed Dec 12, 2007 3:24 pm

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.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Wed Dec 12, 2007 4:14 pm

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

fbmachines
Posts: 24
Joined: Tue Nov 27, 2007 2:50 am

Post by fbmachines » Wed Dec 12, 2007 11:40 pm

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

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Thu Dec 13, 2007 11:29 am

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

fbmachines
Posts: 24
Joined: Tue Nov 27, 2007 2:50 am

Post by fbmachines » Thu Dec 13, 2007 2:49 pm

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
Last edited by fbmachines on Fri Dec 14, 2007 9:24 pm, edited 1 time in total.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Fri Dec 14, 2007 3:40 pm

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

cclambie
Posts: 2
Joined: Wed Oct 29, 2008 7:23 am

Re: Picture Changed Event

Post by cclambie » Wed Oct 29, 2008 7:33 am

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?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Picture Changed Event

Post by Loïc » Wed Oct 29, 2008 6:02 pm

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

cclambie
Posts: 2
Joined: Wed Oct 29, 2008 7:23 am

Re: Picture Changed Event

Post by cclambie » Fri Dec 19, 2008 6:33 am

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?)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest