Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Working Directory

Working Directory

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Galloway
    wrote on last edited by
    #1

    In a windows icon properties there is a field called "start in". You can point your app to a different directory using this field. Does anyone know how I can access this field from inside my VB app? Thanks

    C 1 Reply Last reply
    0
    • D David Galloway

      In a windows icon properties there is a field called "start in". You can point your app to a different directory using this field. Does anyone know how I can access this field from inside my VB app? Thanks

      C Offline
      C Offline
      chris foote
      wrote on last edited by
      #2

      You have to make a call to a windows API, see the code below. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Const SW_SHOWMAXIMIZED = 3 ShellExecute Form1.hwnd, "open", ProgramStart, programoption, ProgramPath, SW_SHOWMAXIMIZED

      D 1 Reply Last reply
      0
      • C chris foote

        You have to make a call to a windows API, see the code below. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Const SW_SHOWMAXIMIZED = 3 ShellExecute Form1.hwnd, "open", ProgramStart, programoption, ProgramPath, SW_SHOWMAXIMIZED

        D Offline
        D Offline
        David Galloway
        wrote on last edited by
        #3

        Thanks for the info. I'll give it a try.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups