Atul
Wed Jul 20 02:21:01 CDT 2005
Use the SendMessage method. You will need to do P/Invoke by using the
DLLImport attribute.
-Atul
http://www.ssware.com/
Shell MegaPack - Windows Explorer Shell Controls for ActiveX and .Net
"Sajjad" <sa@nospam.nospam> wrote in message
news:%236bYNGMjFHA.2920@TK2MSFTNGP14.phx.gbl...
> do you have idea how can i do it from within .net
> "Atul Godbole" <atulatsswaredotcom> wrote in message
> news:%23FxrlnAjFHA.3656@TK2MSFTNGP09.phx.gbl...
>> Try sending a WM_PRINT message to the control. If it supports the
>> message, it will print itself to the DC
>>
>> Atul Godbole
>>
http://www.ssware.com/
>> Shell MegaPack - Windows Explorer Shell Controls for ActiveX and .Net
>>
>> "Sajjad" <sa@nospam.nospam> wrote in message
>> news:O%23IfwBAjFHA.3912@TK2MSFTNGP10.phx.gbl...
>>>i have one application running remotly and want to take its window
>>>snapshort at any given time,
>>> Here is a code i wrote
>>>
>>> public Bitmap GetPicture()
>>>
>>> {
>>>
>>> Bitmap sbmp = new Bitmap(1000, 1000);
>>>
>>> Graphics g = Graphics.FromImage( sbmp );
>>>
>>> System.Windows.Forms.PaintEventArgs pe = new PaintEventArgs(g, new
>>> Rectangle(0, 0, 1000, 1000));
>>>
>>> this.InvokePaint(this.picturebox, pe);
>>>
>>> g.Dispose();
>>>
>>> return sbmp;
>>>
>>> }
>>>
>>>
>>>
>>> problem with this code is that it works fine with picture box, but if i
>>> specify this (current form) or any user control or IE webBrowser
>>> control i dont get any thing back its just blank.
>>>
>>> requirment is that it should be able to get snapshot even window is
>>> minimized (or even hidden).
>>>
>>> Thanks,
>>>
>>> Sajjad
>>>
>>>
>>>
>>>
>>
>>
>
>