If your .ino file is source code (which I think it is, but it's been a minute since I've worked with Arduino), and you are trying to open/close it in the Arduino IDE, you will need to change your approach.
The .ino file will not own the window - as swag has said, the executable running the file will. A text file (which is what the source code is) is not 'active' in the same way as a running program.
Are you trying to make a keyboard shortcut to activate the editor tab that contains your code? If so, you might be able to just use
again. In many editors (including Notepad++, which is the most comparable thing I have on hand) trying to open a file that is already open will bring its editor tab to the front.
If you want to force the editor to close the file, you could use the same Run() command again to force the editor tab into focus, then use Send() to send the keyboard shortcut required to close the file.
That shortcut varies between editors, but in Notepad++ it is Ctrl+W.
Forgive me if I'm off base, but it seems this may be what you are trying to accomplish.