Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

SAve Graph control as bitmap image

Hello,
 
    Is it possible to save Graph control images as bitmap, jpeg files? Thank you.
 
Cem
0 Kudos
Message 1 of 13
(11,579 Views)
Hi Cem,

Take a look the example found here. That should get you started.

Thanks Cem, have a  good one!
Dan Weiland
0 Kudos
Message 2 of 13
(11,564 Views)

Dan,

     Thank you for the answer,but I use Version 6. I've seen this KB article before I post this message. So any solutions for V6? Thank you.

Cem

 

0 Kudos
Message 3 of 13
(11,563 Views)
You can use the SavePicture method to save the result of GetControlImage to a bmp. See the Help for the VB 6.0 function SavePicture for more info.
Bilal Durrani
NI
0 Kudos
Message 4 of 13
(11,552 Views)

Bilal,

              Thank you. I know what savepicture does but I am not sure about GetControlImage. There is no such thing in Version 6. The only property/method get close to it is cwgraph1.images.picture  But this does not return an image, it loads an image to the control. Please be more specific. Thank you.

Cem

0 Kudos
Message 5 of 13
(11,541 Views)
Whoops. You're correct. The function you're interested in is called ControlImageEx

Sorry about that. The following line will save the image of the entire graph to a bitmap

SavePicture CWGraph1.ControlImageEx(96, 96), "c:\graph.bmp"

Bilal Durrani
NI
0 Kudos
Message 6 of 13
(11,532 Views)
Bilal,
 
    
0 Kudos
Message 7 of 13
(11,524 Views)
Hello Bilal,
 
      Now, you are talking. Thank you. This hint helped. But I am still puzzled. You are using CWGraph1.ControlImageEx(96, 96) I do not have this. I have CWGraph1.ControlImage without I guess (width, height) arguments for saving the image to a given size. As I said my version of Measurement Studio for VB is 6. Is there an upgrade that gives me this function? Thank you.
 
Cem
 
PS. Sorry for the previous empty message.
0 Kudos
Message 8 of 13
(11,520 Views)
Hi Girit,

It sounds like you have an old version of the control. Download the Measurement Studio Update from the following link:

http://digital.ni.com/softlib.nsf/websearch/2aac97491d073a6c86256eef005374ce

To get the latest version of your VB 6.0 controls.
Dan Weiland
0 Kudos
Message 9 of 13
(11,497 Views)

Thank you Dan. I did.

Cem

0 Kudos
Message 10 of 13
(11,494 Views)