Results 1 to 10 of 10

Thread: visual basic 6 taskbar

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2007
    Location
    UK
    Posts
    10

    visual basic 6 taskbar

    I'm planning to make a task bar and really need help on a number of things. I'll ask each thing I need help with instead of asking for how to make the whole thing.

    just found out how to make a clock.

    how can I open image files (jpg, gif, etc) using visual basic? I'm guessing it's sort of the same as opening exe files.
    shell "path and file" is basically how you open exe files. Is opening image files similar to that?
    Last edited by Spectacle; Apr 24th, 2007 at 08:27 PM.

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: visual basic 6 taskbar

    If you use the ShellExecute API, it will launch the file in the windows default viewer.

  3. #3
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    448

    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:
    1. aa = "mypicture.exe"
    2.  
    3. bb = Left(aa, 9)
    4.  
    5. cc = bb & ".jpg"
    6.  
    7. MsgBox cc

    To get it back to a jpeg.. Just an example
    "Remember, remember the 5th of November, the gun powder treason and plot. I know of no reason why the gun powder treason should ever be forgot."

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2007
    Location
    UK
    Posts
    10

    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

  5. #5
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2007
    Location
    UK
    Posts
    10

    Re: visual basic 6 taskbar


  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

  8. #8

    Thread Starter
    New Member
    Join Date
    Mar 2007
    Location
    UK
    Posts
    10

    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.

  9. #9
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    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.

  10. #10

    Thread Starter
    New Member
    Join Date
    Mar 2007
    Location
    UK
    Posts
    10

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width