scobi
scobi

Reputation: 14538

How to programmatically drop a file on a Windows app?

I'm looking to have a particular running instance of Visual Studio open a file. Is there a way I can fake a drag-drop operation via code from my app to Visual Studio? Same as if I were to drag a file from Explorer into VS.

I realize I could probably do this easier as an add-in or macro but I'm looking to make this work purely from a script.

Upvotes: 4

Views: 510

Answers (1)

Steve Wellens
Steve Wellens

Reputation: 20620

You could try sending a WM_DROPFILES message to the Visual Studio window.

Upvotes: 1

Related Questions