Re: visual basic 6 taskbar
If you use the ShellExecute API, it will launch the file in the windows default viewer.
Re: visual basic 6 taskbar
Well, if you have a specific extension of the file that a certain program of yours you know will open, you could use something like this... given that you got the actual file path of the picture.. For example, if you had the file
mypicture.exe
and wanted to change it from .exe to .jpg, you could write like::
vb Code:
aa = "mypicture.exe"
bb = Left(aa, 9)
cc = bb & ".jpg"
MsgBox cc
To get it back to a jpeg.. Just an example :)
Re: visual basic 6 taskbar
Quote:
Originally Posted by Negative0
If you use the ShellExecute API, it will launch the file in the windows default viewer.
Not sure what you mean. I tried
Code:
ShellExecute "C:\Documents and Settings\Charlie\My Documents\untitled.JPG"
but it didn't work
Re: visual basic 6 taskbar
Quote:
Originally Posted by iPrank
that seems a bit complicated to run. Also I think those are for a different version of visual basic.
Re: visual basic 6 taskbar
Perhaps we are getting stuck on terminology.
What do you mean by "Open"?
If you simply want to display them, then using a Picturebox control or an Image control should do the trick.
Re: visual basic 6 taskbar
Quote:
Originally Posted by Hack
Perhaps we are getting stuck on terminology.
What do you mean by "Open"?
If you simply want to display them, then using a Picturebox control or an Image control should do the trick.
I mean opem them in the windows image viewer.
Re: visual basic 6 taskbar
The links IPrank provided show you how to use the shellexecute function as I stated.
Look at this link in particular, it does exactly what you are trying to do:
http://support.microsoft.com/kb/q170918/
You could easily get by without declaring all of those SE_ERR constants and you don't need the case statement, it just helps you figure out what the error was if you got one.
Re: visual basic 6 taskbar
Quote:
Originally Posted by Negative0
The links IPrank provided show you how to use the shellexecute function as I stated.
Look at this link in particular, it does exactly what you are trying to do:
http://support.microsoft.com/kb/q170918/
You could easily get by without declaring all of those SE_ERR constants and you don't need the case statement, it just helps you figure out what the error was if you got one.
ok I'll take a look at that.
is there a way to close programs? like
close "C:\WINDOWS\calc.exe"
or something.