Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRun time specification of arguments to method Pin
cmpipey6-Jun-05 2:01
cmpipey6-Jun-05 2:01 
GeneralRe: Run time specification of arguments to method Pin
Robert Rohde6-Jun-05 3:34
Robert Rohde6-Jun-05 3:34 
GeneralpInvoke problem Pin
ppp0016-Jun-05 1:15
ppp0016-Jun-05 1:15 
GeneralRe: pInvoke problem Pin
Carsten Zeumer6-Jun-05 1:49
Carsten Zeumer6-Jun-05 1:49 
Generalsave a windows form object inside a SCII text file Pin
Anonymous6-Jun-05 1:12
Anonymous6-Jun-05 1:12 
GeneralRe: save a windows form object inside a SCII text file Pin
Robert Rohde6-Jun-05 3:37
Robert Rohde6-Jun-05 3:37 
GeneralSaving windows form's screen Pin
angeltsoi6-Jun-05 0:28
angeltsoi6-Jun-05 0:28 
GeneralRe: Saving windows form's screen Pin
Corinna John6-Jun-05 1:12
Corinna John6-Jun-05 1:12 
You could get the DC of the form and do a bit block transfer:

<br />
//get window handle<br />
IntPtr hwndDesktop = GetDesktopWindow(); //function from user32.dll<br />
<br />
//get size of the form to copy<br />
Size s = form.DesktopBounds.Size;<br />
<br />
//get the form's graphics<br />
Graphics graphicsForm = Graphics.FromHwnd(hwndDesktop);<br />
<br />
//creaste bitmap from form's graphics<br />
Bitmap bitmap = new Bitmap(s.Width, s.Height, graphicsForm);<br />
<br />
//get graphics of the new image<br />
Graphics graphicsBitmap = Graphics.FromImage(bitmap);<br />
<br />
//get hDC of form and bitmap<br />
IntPtr dcForm = graphicsForm.GetHdc();<br />
IntPtr dcBitmap = graphicsBitmap.GetHdc();<br />
<br />
bool result = BitBlt( //function from gdi32.dll<br />
dcBitmap,<br />
0, 0,<br />
form.DesktopBounds.Width, form.DesktopBounds.Height,<br />
dcForm,<br />
form.DesktopBounds.Left, form.DesktopBounds.Top,<br />
SRCCOPY);<br />
<br />
//dispose all object ...<br />


_________________________________
Please inform me about my English mistakes, I still try to learn your language!

QuestionHow to Replicate 2 Databases using C#? Pin
pubududilena5-Jun-05 23:04
pubududilena5-Jun-05 23:04 
AnswerRe: How to Replicate 2 Databases using C#? Pin
oykica6-Jun-05 6:38
oykica6-Jun-05 6:38 
GeneralRe: How to Replicate 2 Databases using C#? Pin
pubududilena6-Jun-05 17:37
pubududilena6-Jun-05 17:37 
GeneralRe: How to Replicate 2 Databases using C#? Pin
oykica7-Jun-05 6:27
oykica7-Jun-05 6:27 
GeneralMDI Behaviour Pin
Maqsood Ahmed5-Jun-05 22:03
Maqsood Ahmed5-Jun-05 22:03 
GeneralRe: MDI Behaviour Pin
Ashok Dhamija5-Jun-05 22:24
Ashok Dhamija5-Jun-05 22:24 
GeneralRe: MDI Behaviour Pin
Maqsood Ahmed5-Jun-05 22:31
Maqsood Ahmed5-Jun-05 22:31 
GeneralRe: MDI Behaviour Pin
Ashok Dhamija5-Jun-05 23:18
Ashok Dhamija5-Jun-05 23:18 
GeneralRe: MDI Behaviour Pin
Rizwan Bashir6-Jun-05 3:40
Rizwan Bashir6-Jun-05 3:40 
GeneralStupid WinForms Pin
Christian Graus5-Jun-05 21:32
protectorChristian Graus5-Jun-05 21:32 
GeneralRe: Stupid WinForms Pin
Ashok Dhamija5-Jun-05 22:13
Ashok Dhamija5-Jun-05 22:13 
GeneralRe: Stupid WinForms Pin
Christian Graus6-Jun-05 12:20
protectorChristian Graus6-Jun-05 12:20 
GeneralRe: Stupid WinForms Pin
Ashok Dhamija6-Jun-05 18:54
Ashok Dhamija6-Jun-05 18:54 
GeneralRe: Stupid WinForms Pin
Christian Graus6-Jun-05 18:58
protectorChristian Graus6-Jun-05 18:58 
GeneralRe: Stupid WinForms Pin
Maqsood Ahmed5-Jun-05 22:16
Maqsood Ahmed5-Jun-05 22:16 
GeneralRe: Stupid WinForms Pin
Christian Graus6-Jun-05 12:20
protectorChristian Graus6-Jun-05 12:20 
GeneralRe: Stupid WinForms Pin
S. Senthil Kumar6-Jun-05 0:42
S. Senthil Kumar6-Jun-05 0:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.