I'm sorry for the pitiful subject for this thread, but I can't think of a better way to word it.
What I have is a simple text editor for wm5 (BareAce). I have written it to accept arguments so that I can open txt files using resco file explorer's "open with" option, which simply launches the program with a file path as an argument. (open with -> BareAce)
The problem is that if I have the program running and try to open a file with it, it will bring the program to the front and since it isn't actually being launched, the Main() function isn't getting fired, and therefore it isn't passing the args to Form1 etc etc. My whole execution path is dead after the first launch.
With this behavior, I have no way of getting a file name/path to use in order to open the desired file.
A quick fix would be to make sure the program actually closes and doesn't minimize but I don't want it to work like that.
I have all the code working so that when I open a file and I already have an unsaved file open in the program, it will ask me if I would like to save or not, or cancel (the standard way to handle it) but again it is broken if I can't get the file name of the new file.
I am the worst at explaining things so, please let me know if I haven't made clear my predicament and I will try to better help you guys to help me .
Thanks,
acecase
What I have is a simple text editor for wm5 (BareAce). I have written it to accept arguments so that I can open txt files using resco file explorer's "open with" option, which simply launches the program with a file path as an argument. (open with -> BareAce)
The problem is that if I have the program running and try to open a file with it, it will bring the program to the front and since it isn't actually being launched, the Main() function isn't getting fired, and therefore it isn't passing the args to Form1 etc etc. My whole execution path is dead after the first launch.
With this behavior, I have no way of getting a file name/path to use in order to open the desired file.
A quick fix would be to make sure the program actually closes and doesn't minimize but I don't want it to work like that.
I have all the code working so that when I open a file and I already have an unsaved file open in the program, it will ask me if I would like to save or not, or cancel (the standard way to handle it) but again it is broken if I can't get the file name of the new file.
I am the worst at explaining things so, please let me know if I haven't made clear my predicament and I will try to better help you guys to help me .
Thanks,
acecase