I need to open a WMF file from VB.NET

  • Thread starter Thread starter Yelena Ekshtat
  • Start date Start date
Hello,

Yelena Ekshtat said:
How do I open an wmf file from vb.net?
Where do I start?

Open where? Display the image or opening it with the associated
application or manipulate it?

HTH,
Herfried K. Wagner
 
Hello,

Yelena Ekshtat said:
It will be a windows application.
I need to be able to display the wmf file on the screen.

\\\
Me.PictureBox1.Image = Image.FromFile("C:\test.wmf")
///

HTH,
Herfried K. Wagner
 
Hello,

Is it possible to display a wmf file stored in the DB as
image(datatype). This is a windows form.
If 'yes', could you give me an example please.

Thank you,

Yelena
 
Hello,

Yelena Ekshtat said:
Is it possible to display a wmf file stored in the DB as
image(datatype). This is a windows form.
If 'yes', could you give me an example please.

If the WMF is stored as a byte array in the database, you can use this
code:

\\\
Imports System.Drawing
Imports System.IO
..
..
..
Dim arrByte() As Byte = ... ' Get data.
Dim imgStream As MemoryStream(arrByte)
Dim theimage As Image = Image.FromStream(imgStream)
///

HTH,
Herfried K. Wagner
 
Back
Top