HOME
TOPICS
ABOUT ME
MAIL

 
OK, enough of the easy stuff. Half the crowd here would have earned an "A" if I'd given a test on this. It's time for the secret ingredient.
  technofile
Al Fasoldt's reviews and commentaries, continuously available online since 1983

Tips and tricks for drag-and-drop in Windows


March 18, 2001


By Al Fasoldt
Copyright © 2001, The Syracuse Newspapers

   Little things mean a lot, especially in Windows. This week I'll share some of the little tips and secrets I've stored away in my mind's attic in the 12 or 13 years I've been using Windows.
   One of my favorites is a variation of the standard drag-and-drop technique many Windows users already know. If you don't know what drag-and-drop is, here's a short explanation: You click on the icon (or file listing) for a file and hold your mouse button down while dragging your pointer (and the file icon) across the screen. You let go, or drop, the file icon on top of another window.
   Drag-and-drop is a great way to move or copy a file or a folder, as you probably already know. It would be hard to use Windows for long without knowing that you can drag stuff to the Recycle Bin, for example.
   But it's also a wonderful way to open a file with a program of your choice. You drag the file to the icon of a program and drop it on the icon. Whoosh! The program opens up with the file. To me, that's the best reason to have a lot of program icons on your desktop. You can drag stuff to them.
   (What could be easier than this? You have an icon for Irfan View, that great freeware image viewer, on your desktop, and someone sends you some sort of image in the mail. You can't figure out what it is. So you just let Irfan View do it for you by dragging the attached image out of the e-mail attachment pane and drop it on the Irfan View icon.)
   Now for the secret part. Maybe it's not really such a big secret, but I don't think I've come across more than three people in the last dozen years who already knew this trick.
   Drag and drop works with program windows that are already open, too. (That's not the trick part, but I'll bet it's something a lot of you haven't ever used. So hang on and read through this little explanation.) Let's say you have your Web browser running, with a page open on your screen. Off to the side of your desktop, where you can reach it easily, is a shortcut to a Web page. (They're easy to identify. They usually have a big blue "e" on them.)
   Want to find out what Web site that shortcut leads to? Just drag it over and drop it inside the Web browser window. Whoosh (or double whoosh, maybe - I'm losing count), that page is up on your screen. Your browser knew exactly what you meant when you dropped a shortcut on it. (It even knows what to do if you drop a shortcut to an image file or a text file on it. Cool!)
   OK, enough of the easy stuff. Half the crowd here would have earned an "A" if I'd given a test on this. It's time for the secret ingredient.
   Some programs do not let you drop a file into their open windows and get away with it. WordPad, the crazy little word processor that comes free with Windows, is just such a beast. Microsoft Word is another. Start writing something in WordPad and then drop the icon for a text file into the middle of the window and WordPad does a very peculiar thing. It EMBEDS the file into the document that's already open. Microsoft Word does the same screwball thing.
   Microsoft and a few hundred thousands old-school programmers who made a living off Microsoft's code would tell you this is the way WordPad and Word (and a zillion other like-minded programs) are supposed to operate. But that, as my friend Vlad from Vladivostok would tell you, is just propaganda. Programs should never surprise you with unwanted behavior.
   But we're not stuck with this oddity. There's an easy way to make sure drag-and-drop works with such programs as WordPad and Word. In fact, it's the only guaranteed way to make drag-and-drop work all the time, with all programs, no matter what.
   Ready? To keep the program from embedding the file you are dragging and dropping, drop it on the shoulder of the program - on the area to the right of the menu bar, above the document window. There's usually a blank space there, and it's probably gray if you've never changed your Windows color scheme.
   Files that are dropped on the shoulder of a program window always signal the program to act on the file in a standard way - by showing it, playing it, editing it or doing some other regular function. The program can be a word processor such as Microsoft Word or WordPad or it can be an image viewer, an audio player or something fancy such as Microsoft Excel. Whatever the program is, if it's been written in the proper way, you can drag a file to the shoulder of the program window to force the program to open the file.
   I tell people to do this often when they are having a problem getting Microsoft Word to open a file that might (or might not) be a Word file. If they drop it on the shoulder, Word gets the message right away: Open the file!
   And now for a bonus: Current versions of Microsoft Word and all versions of WordPad also provide drag-and-drop text movment. Select some text and click inside the selected area and hold the button down. Now drag the mouse pointer out of the window and let go of the button on your desktop (or in a folder window). The text you had selected will drop there.
   To open the scrap item later, just double click it.
   What a wonderful little feature. How come it's been kept so secret for so long?