Click here to Skip to main content
15,887,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I can't believe how little there is on the web about saving a form (image) to a file. I don;t care WHAT file format is available...I just wanna save the darn form!!

Does VB6.0 not accomodate a form save??? Seems so basic.

Any help would be appreciated.

Oh....just for clarification...I have a form (a sales quotation) that pulls data from text boxes from another form. Very very basic form. Has ONE logo/image included on the form.
Posted

Well, I think this will do :

<br />
Bitmap MyBitmap = new Bitmap(this.Width, this.Height); <br />
this.DrawToBitmap(MyBitmap, new Rectangle(0,0,this.Width,this.Height)); MyBitmap.Save(@"c:\Test.bmp", ImageFormat.Bmp); <br />


and you can use any format to save it by changing ImageFormat in the last line.

-----------------
Regards

H.Maadani
 
Share this answer
 
And you would put that in a Command_click() statement??
 
Share this answer
 
Of course!

I noticed that you wanted solution in VB.NET , the code I've written above is in C#. you'll need to change some codes to VB (lik this to Me). I'm not that familliar with VB so I cant write it myself. but it is not that complicated.

-------------
Regards

H.Maadani
 
Share this answer
 
wrote:
I can't believe how little there is on the web about


wrote:
Does VB6.0 not


VB6 was developed for people who were not smart enough to learn C++. It was always poorly designed, and a mess, and has been obsolete for a decade, and unsupported for much of that time. Do not be surprised at what it cannot do, and avoid any legacy VB6 projects if you can find any other work at all.

I expect that you could do this by doing a screen capture, probably in a C++ dll, because that's how VB6 ever did anything remotely useful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900