SmartCode Web Forum

Handling error messages, etc. myself

By CrazyDood - 18 Oct 2011

Hi, I'm finally doing more with your control I purchased, and I like it a lot.  But is there a way to allow me to handle error messages myself?  I looked all around in the manual and in the control itself and couldn't find anything.

The message box, I attached as an image, even has the title of "SmartCode VNC Viewer".  I really need a way to handle this myself, perhaps through an event?  Using v3.4.1.

By Yury Averkiev (s-code) - 18 Oct 2011

This would be one of the most popular request. We are very much keen to implement such feature. The problem is it would require signficant changes to the way ViewerX handles errors and excpetion internally.
But it's a feature we are considering to implement.

Just to let you know, neither RDP ActiveX nor Citrix ICA ActiveX controls do not offer custom error handling features. I'm just curious, if it gets implemented, how would you use custom error handling feature?
By CrazyDood - 19 Oct 2011

I definitely understand why it could be difficult and take a while to implement.  I'm actively developing my software that uses VNC Viewer, so I'd be willing to beta test anything you have available.

I would use it to display errors in my software in a different manner, instead of an intrusive message box.  And no other ActiveX control I use displays its name or company who wrote it.  It's one of the reasons we buy controls, to implement them with our own branding.

As for MS's RDP control, I just took a look at it, because I haven't for a while, and it actually does have custom error handling through events.  I'll be using MS's RDP control as well for users who do use RDP.

Actually, it has four different ones.. Smile

Private Sub MsRdpClient61_OnDisconnected(ByVal discReason As Long)

Private Sub MsRdpClient61_OnLogonError(ByVal lError As Long)

Private Sub MsRdpClient61_OnFatalError(ByVal errorCode As Long)

Private Sub MsRdpClient61_OnWarning(ByVal warningCode As Long)
By Yury Averkiev (s-code) - 19 Oct 2011

Didn't know about those RDP properties. At least we offer AuthenticationFailed event, which is similar to OnLogonError.

With regards of SmartCode text in the caption bar, it will be removed in the next build. I'm not sure, how exactly it's gonna be handled, one way is to use the text from the top level window caption. Another, is to introduce ProductName string property that will be in the captions.
By CrazyDood - 19 Oct 2011

Yeah, I think there are a few different versions of the RDP control.  Older versions may not have had all those events.

I definitely hope you can get events to the VNC control so my users don't have to click "Ok" every time there's a connect error.  You had added the GDI+ scaling, which is great, so I know you can do this.  Smile

Again, I'd be happy to try out any pre-release.
By davidbe - 4 May 2014

i just purchased a new copy of the product.
Is there a way to handle error message myself ?
I have the attached code.

the exception fired only after clicking OK on your message box.

thank you in ADV.
david betzalel.

shlomo transport 2007 ltd

By Yury Averkiev (s-code) - 5 May 2014

current version of ViewerX allows to suspend all error message boxes by setting the MessageBoxes property to False.
By fweingaertner - 23 Jan 2015


I have the same requirement here. Disabling the MessageBox do not fullfill my needs.
In my application I cannot allow message boxes, but I need the information if an error occured and which one it was.

For example: I test my connections with an UVNC server. When I try to connect too often using a wrong password the connection will be refused due to a blacklist feature of the server ("Too many security errors").

Now, I cannot get this information by any of the connect or Authentication events. It is only in the message box.
Is there a way to get to the information of the message box?
Or would you please add an event which allows us to handle the message box on our own (like the Authentication event with an cancel property)? Best would be to get the text and error index as separate parameters to build up a custom filter.

Best regards,