AnsweredAssumed Answered

capture scope screen shot remotely

Question asked by josephchoi001 on Oct 15, 2014
Hi all

I'm using C# to control agilent oscope now.

the problem is i stuck in screen capture remotely.
just want screen capture and transfer to my control PC but still have problem.

below code is what i did thesedays,

////// start C# code ///////

scope.WriteString("hcop:sdump:data?", true); /////// ==> request gif format data,
string image_format = scope.ReadString(); ////// ==> i received gif format data and put into string variable.

//////////////////// from now how do i handle this received data?
/////////////////// what i did is convet this sting variable to byte array,,, then convert to image but error.... like below

System.Text.UnicodeEncoding encode = new System.Text.UnicodeEncoding();
byte[] byte_array22 = encode.GetBytes(gif_format);

MemoryStream ms4 = new MemoryStream(byte_array22);
Image image = Image.FromStream(ms4);
image.Save(@"C:\Users\Administrator\Desktop\imageTest.png");

does anyone know easy way to capture this image?
please advice,
joseph Choi  

Outcomes