send file location to a textbox while user clicks on file then application runs [duplicate] - visual-studio

This question already has an answer here:
Associating file extensions with a program
(1 answer)
Closed 8 years ago.
My application saves a file with *.SAH type (it is a custom file type). Then i can open it with a file open dialog.
Im wondering how i can send the file location to a textbox when user directly clicks on that file. in other words, the user clicks on the file and then my application runs and on form load, my textbox.text will be the path of file .

In the MSDN are good information with examples.
Try editing the registry using RegCreateKey() and RegCloseKey() apis.

Related

Win CLI open file with "How to open"?

I need to open the file using Windows 10 cmd. But when the file opens, I need Windows to show me a modal window "How do you want to open this file?". The system should do this even if it already has a program selected by default to open a certain type of file. Is it possible to do this?
To clarify my problem:
I need the console to run for example ".py" not through the standard Python.File="C:\Windows\py.exe " "%L" %*, and for example via VS Code. You might tell me about the VS Code CLI. But how to handle an event where the user will not have VS Code, but for example Pycharm, and the user will want to open it through it? That is why the question was posed in such a way that the user could choose through what to open the file already through the built-in modal window in Windows. In any case, I will be glad of any suggestion to solve my problem.
I tried to find something similar, but apart from the standard start something.som I didn't find it. And this is not a solution to the problem, because start starts the file in the program that is specified by default in the system. This program may not even be the one that the user ever chose later. I came across a similar question in Stackoverflow, where a person wanted to see which program was responsible for opening a file with a certain extension, where assoc and ftype were used, but they did not give the desired result.

Remove a file shared with me using Google Drive SDK [duplicate]

This question already has an answer here:
How to programmatically remove a file from "share with me" in Google drive
(1 answer)
Closed 3 years ago.
When right click a file under the "Shared with me" node on Google Drive a context menu item called "Remove" is available to remove the selected item that is shared with me.
Is there a way to achieve the same using Google Drive SDK? Thanks a lot.
Drive V3 - With shared with me the user has a permissions record for the file. If you remove that then the file will no longer be shared with the user.
Unfortunately the API currently doesn't support this operation. Please file a feature request here: https://code.google.com/a/google.com/p/apps-api-issues/issues/entry?template=Feature%20request&labels=Type-Enhancement,API-Drive

i am trying to make my .exe application run as administrator on any users computer [duplicate]

This question already has answers here:
Set app to require elevation?
(2 answers)
Closed 7 years ago.
I have made an .exe windows Application which needs to run with Administration rights. When i open my app it does not prompt me the user account control in which one has to put his password.
so my app does not work.
my windows users don't know that it will only work by right clicking and choosing run as administrator.
i need want that when clicked it should prompt the user to enter their password.
i am little frustrated because i have searched google whole day but found nothing.
i am not using Visual Studio
One possible way is right click your .exe file then choose compatibility tab and check the option “Run this program as an administrator” in Privilege Level section.

Have Windows add the current date to a filename during the save process [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Is it possible to pass a variable in along with a Windows input box for filename? I'd like the variable to be the current date. The best way I can describe this is..think of the window that comes up whenever you choose "SAVE AS" in Windows. In addition to typing out the name of the file that I want, I also want the current date with the filename; I don't neeed it formatted in any an exact way. I just need the current date as part of the filename.
You may not need to do anything. After the file-save-as dialog box returns, it returns the file name selected by the user. You can do whatever you want with that file name before actually saving it to disk.
But if you need to do a customization in place while the dialog is visible, I think you want a Windows common dialog box extension. This is a code hook that allows you to customize the standard Windows file open (or file save) dialog within your own code.
The most obvious example of a file open dialog extension is the one written for Notepad. From the File menu in Windows Notepad, select, "Open... or "Save...". You can see the "Encoding" combobox at the bottom of this dialog.
Your dialog extension can basically hook most of the events while the file-open dialog box is open. You can add additional control, get notified of when buttons are getting pressed, open/close notifications, and I think you can override the filename selected as well.

How to catch file download event in Firefox Extension? [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
How to hook the download dialog in a Firefox extension?
I have developed a Download Accelerator and now want to create a Firefox Extension for it. What I need to know is when a file download is requested. I have read about the 'observer-service' events such as 'dl-start'. However, these events are fired after the default download dialog is displayed, I need to catch the download before the default.
Any suggestions?
I believe the answer to this question is what you are also looking for:
How to hook the download dialog in a Firefox extension?

Resources