Results 1 to 4 of 4

Thread: Command()

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Posts
    135

    Command()

    Hi,

    I have written an application for my pocket pc. I have setup a file associate which is suppose to execute the program when the file is opened.

    This works, but whenever I try to use Command() to get the name of the file that was opened I get a NotSupportedException error.

    Command() works in the standard .net framework 2 but not in .net cf 2.

    What am i doing wrong? is there an alternative method?

    Thanks,
    James

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Command()

    Hi,
    not knowing how to use it, what exactly are you doing?

    Cheers

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Posts
    135

    Re: Command()

    For example, on your computer if your open a word document on you C drive, lets call it test.

    Command() = "C:\test.doc"

    The command() is the path of the file that was opened

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Command()

    Even if that was in the full version, I think it might be archaic. There is an entire class that gets you various parts like that.

    Look at the FileInfo class in System.IO. You might also want to look at the Directory and File classes, though they don't actually have the members you are looking for. I think you want FileInfo.DirectoryName(), but there are lots of things in that class.
    My usual boring signature: Nothing

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