
I'm now simply trying to convert the code above (as well as the code in the various source-code files) into a single .vb file (through notepad and the command prompt compiler) that can accept a filename/location as a command-line argument (once compiled obviously) to provide a location to save the image. However, I'm currently going nowhere fast and I am looking for some guidance (specifically towards what I should cut out since I don't need any forms or picture boxes, and then how to accept the command-line argument). Thank you.
-Meskibob
-- modified at 1:02 Friday 21st July, 2006
Hi,
if I copy and paste the function
Function copyRect and build
it breaks at the line
BitBlt(HDC2, 0, 0, rect.Width, _
rect.Height, HDC1, rect.X, rect.Y, 13369376)
with the error message
Value of type 'System.IntPtr' cannot be converted to 'Integer'.
Is it because my vb.net version is 2002?
Anyone have any ways around it?
Bill
This example project is great if I want to copy images a small number of times. If it is used repeatedly though I start to have problems with lack of memory and my whole system slows. e.g. if the second button is amended to copy the image 1000 times. Windows task manager shows large amounts of memory used that isnt released until the form is closed and the gdi objects count goes up to 2000+. I'm using Win 2000.
Does anyone know the reason for this?
(note: fixing the typo identified earlier has no effect on this)
Mike
This code helped me a lot solving a problem, creating a graphic and storing it in a bitmap.
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-31928-4.html
然后可以直接干过去