Results 1 to 3 of 3

Thread: Ascociate

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I'm writing a text viewer program.
    I need to ascociate my program with the filetype *.log.
    How do I do this, and I how can I make it load the contents of the
    .log file into my RichTextBox (File)
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  2. #2
    Lively Member
    Join Date
    Apr 2000
    Posts
    110

    Cool Right then...

    First of all, do you want to associate the file type through code or through manual means? (I am thinking it is for use on like 1 machine?!?)

    The manual way is easier... Just compile your program (after sorting all the COMMAND() stuff out... refer to bottom or this post for more info), then go to a folder and go to VIEW >> Folder Options then click on the File Types tab.

    Next scroll down until you find the file type .log and click on edit. Next select "open" from the actions list and click edit. Next, use the browse dialogue to select your program, or, type in the exact path to your program.

    Right. This will open your program every time someone opens a log file, but you need to get the command line parameters that are passed to your program when a log file is opened.

    To do this, u need to use COMMAND() to retrieve the command line parameters that were passed to your app. I don't know how to use COMMAND(), but it has been detailed on this board loads, so just do a search for it.

    From the Command() function, you should then be able to get the filename of the file that needs to be opened, and then you can subsequently load it into your text box.

    Hope this helps

    Laterz

    REM

  3. #3

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I want to ascociate through code, and I want my program to open and put the content of the file into a richtextbox whenever i click on a .log file.
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

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