Dec 052017
 
Like the application bar on a Next machine, drag application icons onto desktop and drop files onto them to execute the programs.
File DROP03.ZIP from The Programmer’s Corner in
Category Windows 3.X Files
Like the application bar on a Next machine, drag application icons onto desktop and drop files onto them to execute the programs.
File Name File Size Zip Size Zip Type
DROPPER.EXE 24064 9286 deflated
DROPPER.WRI 12800 4739 deflated

Download File DROP03.ZIP Here

Contents of the DROPPER.WRI file


1l(TaabccdDropper: Drag and drop to the Windows desktop
by Paul Butcher
Version 0.3

Introduction

Dropper is a small program which allows you to perform drag and drop to the Windows desktop. It is similar in many ways to the NeXT style "icon dock" programs around at the moment. Rather than requiring that drag and drop is performed to a strip along one side of the screen however, Dropper allows any part of the desktop to be used as a target. Dropper requires Windows 3.1.

Dropper is free to all "personal" users. It may be distributed to anyone that takes your fancy, as long as only reasonable distribution costs are charged. Commercial, governmental or other institutions who wish to make use of Dropper should contact the author (see below) for licensing details. Source code is also available from the author on request.

Dropper is supplied "as is" with no warranty of any kind. The author has done his best to make sure the program is bug free and works as intended, but if it trashes your hard disc, that's your problem (it is free after all).

Installation

To install Dropper, simply copy the "dropper.exe" file to your hard disc. You may, if you wish, install it in Program Manager in the usual way. You will probably want to place the program in either the "Load=" or "Run=" lines in win.ini or in Program Manager's startup group.

Using Dropper

When Dropper starts up, nothing apparently happens. Dropper does not display an icon on the desktop and as a result does not appear in the Windows task list. Go into File Manager, select an executable (e.g. notepad.exe) and drag it onto the desktop. You should get a small window containing the Notepad icon with a raised border. This window may be moved by dragging it using the left mouse button. Double clicking on it will result in Notepad executing in the usual way.

Now select a text file (e.g. c:\autoexec.bat) and drop it onto the newly created window. You should get a copy of Notepad running with autoexec.bat loaded. Notice that you need not drop files onto the programs they are associated with you may, for instance, drop a Windows Write (.wri) file onto a Word for Windows icon.

To kill Dropper, run the program for a second time and click on the "Kill Dropper" button.

As well as programs, you can also drop files onto the desktop. The icon displayed will be the icon of the program associated with that file (with a slightly different border to show that it won't accept dropped files). Double clicking on the icon results in the relevant program starting with that file loaded.

Dropper can also print files - double clicking on an icon with the control key held down will print the file. Note that to do this, the file must be registered in the Windows registration database and must have a print command defined.

The Properties Dialog Box

Clicking on a Dropper window with the right mouse button will bring up the properties dialog box.

Checking "Caption" allows an optional caption to be displayed below the icon. In addition, if the icon represents a non-Windows program, this caption will be displayed under the icon representing the running program.
The "Program" field shows the pathname of the executable or data file associated with the icon.
The "Arguments" field allows you to optionally enter arguments for the program when it runs. A "%s" may be placed anywhere in this field to show where the pathnames of any dropped files should appear.
Checking "Accept Dropped Files" to allow this icon to accept dropped files.
The "Working Directory" field allows you to set the directory in which the program will be run.
Checking "From dropped file (if any)" will result in the working directory being set to the directory from which any file dropped onto the icon originates.
The "Icon From" field specifies the file from which the icon is to be extracted. Clicking on the "Previous" and "Next" buttons moves through the icons in this file.
Checking "Run Minimized" results in the program being minimized when it is executed.
Checking "Locked" prevents the icon from being moved or closed.
Clicking on "OK" saves any changes made to the icon's properties and clicking on "Cancel" discards any changes. Clicking on "Close" deletes the icon from the screen.

The Global Properties Dialog Box

Running Dropper for a second time will bring up the global properties dialog box. If you find yourself using this dialog box often, you might find it useful to drag the dropper.exe file itself onto the desktop.

Checking "Snap to Grid" forces Dropper's icons to be aligned to a grid, the size of which may be entered into the edit field.

Checking "Snap to Edge" forces Dropper's icons to be aligned to the edge of the screen if they are within a certain number of pixels from the edge. This "hot zone" may be set from the control panel as well.

Checking "Stay in Background" prevents Dropper from coming to the front when switched to or when a Dropper icon is clicked upon.

Checking "Single Click to Launch" allows a single click on a Dropper icon to launch a program, rather than a double click.

Checking "Save Settings on Exit" instructs Dropper to save it's state when it exits. Clicking on "Save Now" forces Dropper to save it's state immediately.

Clicking on "OK" saves any changes, as does pressing Enter. Pressing Escape will close the dialog box without saving changes.

Clicking on "Save Now" forces Dropper to save it's current settings immediately.

Clicking on "Arrange Now" arranges all icons that aren't locked according to the parameters given in the "Arrange Icons" group. Icons may be arranged relative to any corner on the screen, either vertically or horizontally. They may be arranged in any number of rows. The distance between icons (delta) may also be adjusted.

Clicking on "Run Program" allows a command line to be entered, which is then executed.

Clicking on "Kill Dropper" kills the current instance of Dropper.

Using Dropper as the Shell

Dropper now includes limited support for being used as the Windows shell. To install Dropper as the shell, edit the "shell=" line in system.ini. If Dropper detects that it is running as the shell, it will parse the "run=" and "load=" lines in win.ini, running the files there in the same manner as the Program Manager. The only other difference is that killing Dropper will result in Windows exiting (the "Kill Dropper" button in the global dialog box is renamed "Exit Windows" to reflect this).

Horrible Hack Alert!

Early versions of Dropper didn't set the icon for DOS programs. This was because the API for this requires the data in one format, and the function for extracting icons from executables provides the data in another. Needless to say, there is no function to translate from one to the other. I have (I think) got the translation worked out, but as it involves messing around with internal Windows data structures, there's no guarantee that it will work for future versions of Windows (or even on some current versions for that matter).

If you come across any problems with this feature, I'd be very grateful if you could let me know about them, and give me as much information as you can about the circumstances under which they occur. In addition, you may switch off the feature by placing the line;

HorribleHack=0

in the "dropper.ini" file. Alternatively, if you know of a better way of doing this, I'd be most grateful to hear from you!

Known Problems and Limitations

As Dropper subclasses the desktop window, it may conflict with other programs which do the same. For example, Dropper is known to work with BackMenu, however depending on the order in which the programs are started, shutting down Dropper may disable BackMenu and vice-versa.

Another disadvantage with subclassing the desktop is that this is incompatible with Window/NT (which won't allow you to subclass a window you don't own). A future version of Dropper may therefore overlay a transparent window on top of the desktop instead.

Dropper does not store icons from invocation to invocation. Therefore, if the file from which the icon is extracted is deleted, Dropper will not be able to find the icon next time it starts.

There is a problem if you're using Dropper as the shell - it's possible to get yourself into a situation where you can't call up Dropper's control panel (e.g. closing all programs and Dropper icons) and therefore you can't exit Windows, nor can you run any other program. I'm not sure what to do about this, or even whether I should do anything about this. Suggestions, as always, are most welcome.

Planned Improvements

I've (finally!) got Windows/NT going, so the next project is porting Dropper across.

Ability to move icons "en masse".

Icon movement with cursor keys.

Support for Program Manager Startup group.

Revison History

0.1First released version

0.2The following new features were added;
Option to lock icons.
Differentiation between "executables" and "files".
Optional captions.
Setting the caption and working directory for non-Windows programs.
Working directory from dropped file.
Display of the hourglass cursor while a program is starting up.
Misc. bug fixes.

0.3The following new features were added;
Default captions.
Explicit "accepts dropped files" option.
Slight changes to the icon borders to make them more visible on high-resolution screens.
Faster handling of Windows exit.
Better shell support including parsing of "run=" and "load=" lines in win.ini and "Exit Windows" button.
Support for printing files.
Snap to grid option.
Stay in background option.
Snap to edge option.
Save settings on exit option and save now button.
Single click launching.
Icon arrangement.
Setting of icon for DOS apps.
Misc. bug fixes.

Contacting the Author

The author may be contacted at:

Harlequin Ltd.
Barrington Hall
Barrington
Cambridge
CB2 5RG

Telephone number: (0223) 872522 or +44 223 872522 (international)
Fax: (0223) 872519 or +44 223 872519

E-mail: [email protected]
ell, it will parse twsokgc_[WSOQKr^j$Qsws*ok3gc_"["Wr#S#O^'Kr^j^'s'ww'sX(oj(kl(gc_"["Wr#S#O^'Kr^j\\\\==Z=\===\\\\\\\\\\\\Z\\\
\
\\\\\\\=F
==a\\c\\c\\O\Q=s=u=uI\K\====&=(===F\H\\\\!\i\k\\\\\hRelated
 December 5, 2017  Add comments

Leave a Reply