Best way to redraw/refresh activex control?

Hello!

I have an activex control in a window. It works fine, but when I minimize the window and then restore it, the control is blank (white). I have tried calling the Refresh and the RefreshRect methods, but to no avail. In fact, when I call Refresh/RefreshRect when the control does not need refreshing, the control goes blank/white. So this does not seem to work at all, or I’m doing something wrong. I have tried with EraseBackground set to both true and false, but no difference.

The only way I have been able to successfully redraw the control is by adjusting the width or the height of the control by a pixel, and then set it back to original size. This works, but it feels like a workaround. Does anyone know the best way to redraw/refresh the control, without manipulating its size?

I’m running Xojo 2013r4.1 on a x64 Windows 8.1.

Hi Henrik

Good to see you mention activex, its not easy!
I need someone to help this issue, I trying used a video acticvex in a XOJO project like you, I can load the activex in, I saw it in a class, but I have no idea how to drag in to the form, any idea?

Thank you so much!

Drag it from the navigator to the layout editor.

Thanks Greg.

It does not work! I drag it from the navigator, a stop sign show up!
This activex can use it in vb.net and c# quite normally.

I have no idea how I can attach a screen capture in here!?

Thank you so much!

[quote=401832:@MK Siu]Thanks Greg.

It does not work! I drag it from the navigator, a stop sign show up!
This activex can use it in vb.net and c# quite normally.

I have no idea how I can attach a screen capture in here!?

Thank you so much![/quote]
Does this activex control present a UI or is it purely functionality?

Thanks Greg for reply!

I saw the object added into the class, and Ctrl(Event handler, Method, Propertier and so on…), event the IID etc. I drag the Ctrl to the form, It was added as generic object under this form and Windows1 added some obj as control in navigator, but I have no idea afterward!?
I added some init steps for the object when window open, like: ctrl.serverip = “912.168…”, some error showed when executed the project:
Window1.Name
‘ctrl1’ needs to have a constructor with the signature Constructor() to be placed on a window Window1

I have no idea how to solve it!
Any idea thank you so much!

We will need to know which activex control this is to do diagnostics. Please file a bug report in Feedback which specifies this information so we can have a look at it.