Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
save bitmap from stream problem
void CaptureTimer_Tick(object sender, EventArgs e) { CaptureTimer.Stop(); Bitmap bitmapImage = new Bitmap((int)this.ActualWidth, (int)this.ActualHeight); Graphics gr1 = Graphics.FromImage(bitmapImage); IntPtr dc1 = gr1.GetHdc(); IntPtr dc2 = NativeMethods.GetWindowDC(NativeMethods.GetForegroundWindow()); NativeMethods.BitBlt(dc1, (int)20, (int)20, (int)this.ActualWidth, (int)this.ActualHeight, dc2, 20, 20, 13369376); gr1.ReleaseHdc(dc1); Random rnd = new Random(); bitmapImage.Save(string.Format(".\\Captures\\Capture{0}.jpg", rnd.Next().ToString()), ImageFormat.Jpeg); PlaySoundOnButton(ButtonTypes.CaptureBtn); CommandManager.InvalidateRequerySuggested(); }
run
|
edit
|
history
|
help
0
Test
countvowels
Overloading
Carnival 1.0
Strings: Padding Integers and Handling Decimal Float Numbers
add two number
Šovljanski - beskonačna petlja bez goto-a
scasdxcd
izem
Single Line Date in Months