1 question about Visual Basic

  • Thread starter Thread starter Michaelas10
  • Start date Start date
M

Michaelas10

How can I make a button that if I click on it, it opens paint with the
image that's in the picturebox?
 
Me.PictureBox1.Image.Save("c:\MyFile.bmp")

Dim ProcID As Integer

ProcID = Shell("mspaint.exe c:\MyFile.bmp", AppWinStyle.NormalFocus)





Michaelas10 said:
How can I make a button that if I click on it, it opens paint with the
image that's in the picturebox?
 
Michaelas10 said:
How can I make a button that if I click on it, it opens paint with the
image that's in the picturebox?

\\\
Private Sub PictureBox1_DoubleClick( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles PictureBox1.DoubleClick
Dim FileName As String = System.IO.Path.GetTempFileName()
Me.PictureBox1.Image.Save(FileName)
Dim p As Process = _
Process.Start("mspaint", """" & FileName & """")
p.WaitForExit()
Me.PictureBox1.Image = Image.FromFile(FileName)
End Sub
///
 

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

Back
Top