Image View (MS PAINT)

Surjer

Registered User.
Local time
Today, 13:08
Joined
Sep 17, 2001
Messages
232
Hello All, I just posted this under tables on accident - I then realized that this was not a tables question so Sorry about the double post!


I am trying to figure out how to start MS Paint with code and have it open a picture that is defined by a variable name..

Private Sub Text1_Change()
FNAME = "G:\SV\Survey\KUTTRUS\sagis\ms11\source\valve\"
FNAME = FNAME & Text1.Text & ".JPG"
End Sub

Private Sub Command1_Click()


'Start Paint and view fname <<---What should I do here??????


__________________
Jerry
 
Getting Closer

Little Closer just can't get the file to open - Paint does though!

FNAME = Shell("c:\winnt\System32\mspaint.exe", 1) ' Run Paint.
 
Re: Getting Closer

Surjer said:
Little Closer just can't get the file to open - Paint does though!

FNAME = Shell("c:\winnt\System32\mspaint.exe", 1) ' Run Paint.

You dont need FNAME

use the application plus the name of the file you are trying to open:

Shell("c:\winnt\yadayad myFile.bmp", 1)

Jon
 
Final resolution

Dim strAppName As String
strAppName = "C:\WINNT\System32\mspaint.exe " & Chr(34) & FNAME & Chr(34)
Call Shell(strAppName, vbMaximizedFocus)


Thanks for all your help.......
 

Users who are viewing this thread

Back
Top Bottom