PC Review


Reply
Thread Tools Rate Thread

1 question about Visual Basic

 
 
Michaelas10
Guest
Posts: n/a
 
      9th Mar 2005
How can I make a button that if I click on it, it opens paint with the
image that's in the picturebox?


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
 
Reply With Quote
 
 
 
 
JohnFol
Guest
Posts: n/a
 
      9th Mar 2005
Me.PictureBox1.Image.Save("c:\MyFile.bmp")

Dim ProcID As Integer

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





"Michaelas10" <(E-Mail Removed)> wrote in message
news:422efbec$1_5@127.0.0.1...
> How can I make a button that if I click on it, it opens paint with the
> image that's in the picturebox?
>
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
> http://www.usenet.com



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      9th Mar 2005
"Michaelas10" <(E-Mail Removed)> schrieb:
> 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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning curve for Visual Basic 6 programmers moving to Visual Basic.net Chris Asaipillai Microsoft Dot NET 8 20th May 2007 06:24 PM
Visual Basic Question Peter W Soady \(UK\) Microsoft Excel Misc 1 25th Oct 2006 06:26 PM
Beginner Question: Visual Studio 2005 - Visual Basic - Charts or Graphs William Foster Microsoft Dot NET Framework Forms 2 25th Jan 2006 10:10 AM
Visual Basic Question lj Microsoft Excel Discussion 2 22nd Nov 2005 04:25 AM
Visual Basic Question =?Utf-8?B?TWF0dA==?= Windows XP General 4 19th Jun 2004 09:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:17 AM.