CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13
  1. #1
    Join Date
    Mar 2008
    Posts
    10

    Folder containing our application created file popping up when opening the file

    Our application has its own file type and when we double click on it the application opens the file. The problem is when the file is in a folder and when i double click on our file the application is working fine but the folder in which the file is present is popping up in front of the application. we want to disable this. Look forward for some replies

  2. #2
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: Folder containing our application created file popping up when opening the file

    How are you opening the file ? please show the code.

  3. #3
    Join Date
    Mar 2008
    Posts
    10

    Re: Folder containing our application created file popping up when opening the file

    by double clicking on the file

  4. #4
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: Folder containing our application created file popping up when opening the file

    :-) I mean how are you reading the file ? show the code where you pass the file path as arguments and the way you read it in your application.

  5. #5
    Join Date
    Mar 2008
    Posts
    72

    Re: Folder containing our application created file popping up when opening the file

    Check your registry entries (HKEY_CLASSES_ROOT/.yourextension) to see what else is associated with that file type besides your application.

  6. #6
    Join Date
    Mar 2008
    Posts
    10

    Re: Folder containing our application created file popping up when opening the file

    @Mike

    Can you please tell me how to look for other application associated with the file type. This is what i found in my file extension in the data

    "C:\Program Files\RIBA Enterprises\DefinIT\DefinIT.exe" "%L"

    and the following in the command

    K3pN36]FK97u?ar!9Jgs>REnF!Ee4m8+u%]59OR9+ "%L"
    K3pN36]FK97u?ar!9Jgs>REnF!Ee4m8+u%]59OR9+


    I am having the same problem when i click on the exe of our application.

  7. #7
    Join Date
    Mar 2008
    Posts
    10

    Re: Folder containing our application created file popping up when opening the file

    @MMH

    The following is the code sample

    This is how i am getting the file name from the zeroth argument

    static void Main(string [] args)
    {

    openFileName = args[0];

    }



    and this is how i am passing it in the formloading event

    OpenProject(openFileName);

    where openproject takes the filename and establishes a connection to the database at that location.

    PS: I am having the same problem when i click on the exe of the application.

  8. #8
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Thumbs up Re: Folder containing our application created file popping up when opening the file

    Quote Originally Posted by devarakondark
    @Mike

    Can you please tell me how to look for other application associated with the file type. This is what i found in my file extension in the data

    "C:\Program Files\RIBA Enterprises\DefinIT\DefinIT.exe" "%L"

    and the following in the command

    K3pN36]FK97u?ar!9Jgs>REnF!Ee4m8+u%]59OR9+ "%L"
    K3pN36]FK97u?ar!9Jgs>REnF!Ee4m8+u%]59OR9+


    I am having the same problem when i click on the exe of our application.
    replace %L with %1...
    Code:
    "C:\Program Files\RIBA Enterprises\DefinIT\DefinIT.exe" "%1"
    try this, i guess this will solve your problem

    And as you mentioned, that you are having the same problem with the exe of your application, i would say this is the only problem. Because, when you click on the file which is associated with your application, it will run your application and this is where you face this problem. Also check the way you are associating the application with its file. Try the above change as i mentioned. See if it solves your problem.

  9. #9
    Join Date
    Mar 2008
    Posts
    10

    Re: Folder containing our application created file popping up when opening the file

    @MMH

    I tried it, but its not working...........

  10. #10
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: Folder containing our application created file popping up when opening the file

    Quote Originally Posted by devarakondark
    @MMH

    I tried it, but its not working...........
    Can u attach ur code ? I Think there is some another problem with it that can be resolved by looking into the code n running ur app.

  11. #11
    Join Date
    Mar 2008
    Posts
    10

    Re: Folder containing our application created file popping up when opening the file

    @MMH

    Can you be specific about the part of the code you want

  12. #12
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: Folder containing our application created file popping up when opening the file

    Yes. it will be nice if we get to see why is ur apllication behaving like this. so if u can attach files such as ur program.cs (the file having main function) and other file where u are having open/read file methods. Also attach ur exe file if possible along with ur custom file which u open it from ur application.

    I remember i had also made one application which used to open and read my custom made file when double clicked. and it worked as expected.

  13. #13
    Join Date
    Mar 2008
    Posts
    10

    Re: Folder containing our application created file popping up when opening the file

    @MMH

    We are showing a splash screen before launching our application and today i found out that this was the problem. I commented the splash screen code and the application is working fine. Can you post a sample code for splash screen which will not cause a problem like what we are having.

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

Featured