Jump to content

OS Open Document event not being called


MartinMcD

Recommended Posts

Hello there,

I've registered my application to open tdms files. The first bit works perfectly - double click on a tdms file and my application is opened. I'm now trying to get the app to open the actual file that was clicked on but I can't get the path passed in:

- In the Advanced section of the build options I have ticked the select box to 'Pass all command line arguments to the application'

- In the open command section of the regedit I've included the %1 as below. In fact, I've tried other combinations of speech marks

[INSTALLDIR]myApp.exe "%1"

- I've enabled EnableSuperSecretStuff in my ini file so that the 'OS Open Document' is now an option in the event structure and I'm capturing this event.

When I run the app, as I say the app opens fine but this event does not trigger. Does anyone know if there is one last step I am missing please?

Thank you,

Martin

Link to comment

Hiya,

I've got it half working my checking the App.Args property node on application start up. If I set it up like this then the file is correctly opened when the application starts. This is not using the OS open Document event though. If I try and open a second file with the application open then the OS Open Document event still doesn't get called.

It seems like the arguements are getting passed over correctly but that the OS Open Document event is never called. Hmm, I'll keep looking.

I did try the double-hyphen but it doesn't seem to make a difference (to the triggering of the event).

Thanks,

Martin

Link to comment

Great, it's working.

I didn't have/any experience or DDE which turns out to be what I needed to know. Chris Davies gives the answer in his post (26) here:

http://lavag.org/topic/4851-associating-my-exe-with-a-specific-file-extension-type/page__st__20

To open a file once the app is open, the Dynamic Data Exchange is used which requires a few more keys to be added to the registry (he lists it). The end result is that the OS Open Document is called and everything works swimmingly :)

Thanks,

Martin

  • Like 1
Link to comment

To open a file once the app is open, the Dynamic Data Exchange is used which requires a few more keys to be added to the registry (he lists it). The end result is that the OS Open Document is called and everything works swimmingly :)

Martin,

could you revise the documentation in the LabVIEW wiki on this topic?

Another note, I've posted an idea on the LabVIEW idea exchange on opening up 'OS open document' to mere mortal. Please vote!

Ton

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.