Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Drawing on a cwgraph3d possibilities.

Is there anyway to maybe to unenable a cwgraph3d and then draw on the from ABOVE the graph. I want to either draw a "rubber band" (a.k.a. dancing ants) box or perhaps even draw a colored shape on top of the graph temporarily. I have not been able to figure out anyway of doing this. The data does not neet to be changed, just be able to draw on top.

One other possibility I thought of but have been unable to figure out is placing a cwgraph3d inside a picturebox (using the picturebox as the container), then i can unenable the cwgraph3d and maybe draw in the picturebox?.. I thought this might work but was unable to do it.

Any ideas I can attempt to try, or that anybody has got to work are greatly appreciated.
0 Kudos
Message 1 of 6
(7,251 Views)
Hey Billy Bob,

What about placing a picture box on top of the 3d graph. You change the visible property to make it show up or not.

Here's a picture of this in vb6.

I hope this helps!

Regards,

Sarah Miracle
National Instruments
0 Kudos
Message 2 of 6
(7,237 Views)
So what we are doing now is this. Create a picture box the same size as the CWgraph3d. This picture box is set to invisible. Then when I want to be able to draw on the image, I load the picture cwgraph3d.controllimage into the picture property of the pictue box and then make the picturebox visible. Now the picture box is on top of the cwgraph3d, and contains the same image... allowing me to draw on the image. Good right..... Wrong.

The problem is this. The image looks messed up. I am pretty sure it has something to do with the dpi of the controlimage. I read that the controlimage property grabs the image at a dpi of 96 (screen dpi) but that using the controlimageex property will alow me to set the dpi.

How do I correctly make the image look the same in the picture box as it does in the cwgraph3d. Attached is a picture of what I am talking about.
0 Kudos
Message 3 of 6
(7,212 Views)
heres the image
0 Kudos
Message 4 of 6
(7,211 Views)
Billy Bob,

You could try to use a higher dpi. Set the dpi with by using the ControlImageEx(1200,1200). Let me know how this goes. Have a great day!

Allan S.
National Instruments
0 Kudos
Message 5 of 6
(7,161 Views)
Sorry for the delay but I have been busy with the end of the semester and finals.

I figured out how to do this. I set the picture1.picture = cwgraph3d.controlimageEX(0,0)

for some reason this makes the image look fine. Maybe passing 0,0 to the function makes it take the dpi of the image it is capturing or something. I don't know. Just thought I'd close this thread down.

Thanks,

Kevin
0 Kudos
Message 6 of 6
(7,115 Views)