Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 4 Jahren, 2 Monaten
Letzter Beitrag:
vor 4 Jahren, 2 Monaten
Beteiligte Autoren:
JP, Fabrice Harari, Tor-Bjarne

Window display problem with ActiveX Control

Startbeitrag von JP am 09.05.2014 07:35

Hi All,

I have a problem with a window which contains an ActiveX control which draws a chart inside my window. When I run this on my own development machine it displays fine. When I open a dialog window over the top of it and then close the dialog window the underlying chart is properly restored / displayed. All fine.

But on some computers I get a "ghosting" effect where when I close the dialog window, that portion of it that covered the ActiveX control/chart does not disappear i.e. the chart is now obscured with a partial ghost image of the dialog window. Resizing the window obviously automatically causes the ActiveX to redraw the chart and the ghosting is gone. But how to avoid this ghosting effect in the first place?

This happens only on some computers which I guess have perhaps less powerful graphics cards but I cannot say so for sure.

I have tried issuing a MultiTaskRedraw() and a MultiTask() after closing the dialog window but to no effect.

I have tried issuing MyWindow..DisplayEnabled = False followed by DisplayEnabled = True but to not effect.

Is there some other options?

Thanks

Antworten:

Hi,

Are you shure you ActiveX component do not have a Redraw / Refresh method?

Cheers
Tor-Bjarne

von Tor-Bjarne - am 09.05.2014 09:18
Hi JP

several ideas :
- change the settings of hardware acceleration in the graphic card properties (often cause of trouble)
- update the graphic card drivers
- automatically resize the window (+1 pixel then -1 pixel) with or without the displayenabled on

Best regards

von Fabrice Harari - am 09.05.2014 10:31
Hi Tor-Bjarne

Yes, the control does have an update() function which will refresh the control contents but the downside is that I need to cycle through all the open windows and execute this function which works but is wasteful imho ... I was hoping for a single command that one could issue to force the screen to update properly.

Thanks

von JP - am 09.05.2014 11:05
Hi Fabrice,

Yes, funnily while waiting for suggestions I have programmed a +1 pixel change followed by a -1 pixel restore and enclosed in a DisplayEnabled = False / True block. This does work :)

The control also has an update() function which does the trick too but the downside to both these options is that the user can have many of these windows open and I need to cycle through all of them and do this "refresh" to make sure they display properly.

I shall investigate the other options you mention rgearding the graphics card.

Thanks,

von JP - am 09.05.2014 11:08
HI Fabrice and All,

So I found the fastest way to do this is as follows. In pseudo code:

1) ParentWindow.DisplayEnabled = False

2) Cycle thorugh each window
If it contains the ActiveX control then
Set Visible = False
Set Visible = True

3) ParentWindow.DisplayEnabled = True

Hope this helps another.

von JP - am 09.05.2014 15:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.