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. Open a program with a function initiated

Open a program with a function initiated

Scheduled Pinned Locked Moved Visual Basic
questiontutorial
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.
  • S Offline
    S Offline
    szevy_suez
    wrote on last edited by
    #1

    Hi, Thx a lot. Another question. If I want to open the program with a function initiated automatically, is that possible? For example, if start button is clicked, then paint is opened with the save command initiated.

    D 1 Reply Last reply
    0
    • S szevy_suez

      Hi, Thx a lot. Another question. If I want to open the program with a function initiated automatically, is that possible? For example, if start button is clicked, then paint is opened with the save command initiated.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      No, there is no way to do this. If the app you're launching doesn't support opening certain items on launch, then you can't do it, period. This kind of functionality, also, doesn't have any standards defined for it, outside of DDE, so it's implementation would be entirely up to the application your trying to launch, if it supports it at all! The only other method, though unreliable, would be to use SendKeys to try(!!!) to send the appropriate key strokes to the application you launched to get the functionality you want. The problem is that you have to launch the app, then wait, somehow, for the app to finish loading, then send the keystrokes. Also, between the time the app is launched and the keystrokes are sent, pray that the user doesn't hit any keys and doesn't click on anything with the mouse. Oh! Since Windows is a shared system, you also have to hope that no other application running in the system steals the input focus during that time too! Dave Kreskowiak Microsoft MVP - Visual Basic

      S 1 Reply Last reply
      0
      • D Dave Kreskowiak

        No, there is no way to do this. If the app you're launching doesn't support opening certain items on launch, then you can't do it, period. This kind of functionality, also, doesn't have any standards defined for it, outside of DDE, so it's implementation would be entirely up to the application your trying to launch, if it supports it at all! The only other method, though unreliable, would be to use SendKeys to try(!!!) to send the appropriate key strokes to the application you launched to get the functionality you want. The problem is that you have to launch the app, then wait, somehow, for the app to finish loading, then send the keystrokes. Also, between the time the app is launched and the keystrokes are sent, pray that the user doesn't hit any keys and doesn't click on anything with the mouse. Oh! Since Windows is a shared system, you also have to hope that no other application running in the system steals the input focus during that time too! Dave Kreskowiak Microsoft MVP - Visual Basic

        S Offline
        S Offline
        szevy_suez
        wrote on last edited by
        #3

        Thanks

        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