I use the APi calls StretchBlt, GetDc, to grab a desktop screen and put it into a picturebox. but i want to save it directly to BMP. not first copyig it into the picturebox and then use SavePicture but just by using api calls.
You have to save it into a container type object because you only have the image in memory which only has the result of directions.
To recreate it must be in a recognizable format and that info is stored in the container object as a header I think.
To work around it with the API doesn't sound too practical 'cause in the end your going to be creating a window object with a dc anyway. Take what VB has for free or learn C++ out of spite - it's your choice, but I don't think you'll see any performance difference on this using the API or C++ anyway.
You can always make the picBox invisible with resize + redraw = true behind the sceens if you want.
If you want you can use this class I made that handles offscreen DCs it has a save method on it aswell.
To do what you were saying you'll need to Create a DC using the class and BitBlt to the class's DC property then run the Save method.
When your thread has been resolved please edit the original post in the thread ()
and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.
When your thread has been resolved please edit the original post in the thread ()
and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.