From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Flicker in CNiGraph

I've got a form with 4 CNiGraphs displayed (a 4 channel oscilloscope). The graphs all display fine at first. But if the user clicks on one of the graphs, then that graph starts to flicker.

The other 3 graphs still display correctly. This still happens at a low acquisition rate: 4 times a second / 200 samples per graph. Any ideas how I can prevent the graph from flickering?

Billy H.
0 Kudos
Message 1 of 4
(3,088 Views)
Hello

This is a strange problem. Similar to another question posted here.
Although it talks about Visual Basic, the UI are essentially the same in both the enviornments.
I hope it helps.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,088 Views)
This problem is still outstanding and I'm looking for any new ideas.
I looked at similar questions posted (mostly VB related) and most of the answers say that the machine/graphics card may be overloaded. But I see the problem on a number of "fast" PCs (various configs) with no other apps running.

My own PC: Win2000,Dell P3 866MHz, 256 ram. The graphics card is an ATI Radeon Mobility 16MB with latest drivers.

If I display a graph, its ok at first. If I click on the graph it starts to flicker. If I turn off the graph and turn it back on, using ShowWindow(), then the graph is ok again.

To the end-user this looks really bad, so any help would be greatly appreciated.

Billy.
0 Kudos
Message 3 of 4
(3,088 Views)
Resolved! ... the problem seems to be the graph dimensions which I was setting in code. I reduced the height by one pixel and it flickers no more - on any of the test PCs.

So, if anybody sees similar sypmtoms - check that the graph fits fully inside the viewable area. A single pixel outside is practically unnoticeable, but the graph can be prone to flickering as described above.

Billy H.
0 Kudos
Message 4 of 4
(3,088 Views)