Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Look At This!!

Status
Not open for further replies.

MrVB50au

Programmer
Mar 16, 2003
326
0
0
AU
If any of you wish to know how to access an external app' from within your vb app', here's an idea that could help.

Shell "C:\Program Files\Accessories\MSPAINT.EXE ", vbMaximizedFocus

I know that not all users may use drive C or even the path for some reason or another, so if anyone could help in expanding the above code... it would help, not only me but others.

Also, let's say that a user has a bitmap *.bmp picture in their own vb app' and wish to edit it. Is there a way to do so?
 
yes you can expand this code and locating paint.exe wherever it had been installed.
get program files dir from windows registry using any registry access tools(the key for program files dir is:

"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion"
and the value is "programfilespath"

to access registry you can use regtools.dll

regarding editing Bitmap from within vb
if this bitmab is integrated in you application I don't think there is away to edit it,but if it is stored in external file you can edit it using paint.exe

Private Sub EditImage()
Shell programfilespath & "\Accessories\MSPAINT.EXE" & Chr(34) & "Image Path", vbMaximizedFocus
End Sub

Hope I did help you
 
yes fadloun,

This really did help and to answer the integrated section, no, the bitmap file is stored in a folder (eg: bitmaps) that the user can edit to own desired look. then use it in crystal for printing.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top