save window form as file on local C drive

M

martin1

All,

I present some data on the window form, then I try to save window form as
file on the local C drive, like save word file, can anyone know how?

Thanks,
Martin
 
Z

zacks

All,

I present some data on the window form, then I try to save window form as
file on the local C drive, like save word file, can anyone know how?

Thanks,
Martin

"Save the window form as a file"? Not sure what you mean by that. Do
you mean a visual representation of the form along with all of the
control's current contents? Or save the contents of all of the
controls?
 
M

martin1

save a visual representation of the form along with all of the control's
current contents.

Thanks
 
A

Armin Zingler

martin1 said:
save a visual representation of the form along with all of the
control's current contents.

Framework 2.0 and above: use the control's (Form's) DrawToBitmap methood:

Dim bmp As New Bitmap(Me.Width, Me.Height)

Me.DrawToBitmap(bmp, New Rectangle(Point.Empty, bmp.Size))

bmp.Save(...)


Armin
 
M

martin1

Thank you so much.

Martin

Armin Zingler said:
Framework 2.0 and above: use the control's (Form's) DrawToBitmap methood:

Dim bmp As New Bitmap(Me.Width, Me.Height)

Me.DrawToBitmap(bmp, New Rectangle(Point.Empty, bmp.Size))

bmp.Save(...)


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top