From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ghosts when a movable panel is dragged

I have a dll application that displays a panel of outputs. For some reason, when instantiated for the first time from a C# driver, this panel leaves a trace of ghost windows on the display (much worse on XP as compared to Server 2008). This effect is repeatable everytime. When I change the setting of the panel to not-movable, then the panel is stuck whenever an event is detected (say when the Minimize button is clicked) until the mouse leaves the panel and does something to its icon in the task bar.

The way to workaround that issue is to exit the panel (which doesn't do anything except calling QuitUserInterface() followed by a DiscardPanel()) and restart it from the driver, then in the new instances everything will work as designed. That tells me that in short of exiting the window the first time, the panel appl is trapped in a state that is different than all succeeding instances.

 

Can anyone help?

0 Kudos
Message 1 of 7
(4,814 Views)

Could you provide a screenshot or a short video of the effect you're seeing?

 

Do you have access to the source code of this DLL? I would be curious to see how the code is initialized when it first runs.

0 Kudos
Message 2 of 7
(4,791 Views)

Thanks Riccardo. I'll try to get a screen capture and an excerpt of the code to you next week.

0 Kudos
Message 3 of 7
(4,788 Views)

Ricardo, attached is the screen capture when it runs the first time from the driver (a C# app). I have also included the uir file. Please send me your email address if you'd like to see a part of the source code.

 

Thank you so much! Wai

Download All
0 Kudos
Message 4 of 7
(4,751 Views)

Wai Chan, 

 

If you create a simple UI application that has only a movable panel, do you see the same behavior when you drag the image? 

 

0 Kudos
Message 5 of 7
(4,726 Views)

Sorry for taking so far to respond...

No, if the app is run as a standalone, this doesn't happen. This only happens when I call the CVI function via a dll (that creates the panel) made with a C# GUI app. Then, as I indicated, if I call the same function again from the same C# app (same instance), everything works fine.

0 Kudos
Message 6 of 7
(4,592 Views)

Just to confirm, the C# app running without CVI does not cause this issue? Have you tried creating a simple C UI in CIV without making DLL calls? Does this produce the same behavior?

0 Kudos
Message 7 of 7
(4,572 Views)