Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dockable Launcher

Status
Not open for further replies.

JJ1

Programmer
Apr 19, 2001
104
GB
Hi All,

My boss wants me to create a 'launcher' program, which basically sits in the system tray and allows people to drag and drop icons onto a window, in order to make shortcut's. The user can then click the shortcut to launch the program.

I could really use a few suggestions on the following:

1. How can the program be placed in the system tray - with a menu when you right click it's icon and be dockable?

2. How can I capture the path of the program to launch?(E.g. c:\Program Files\Word.exe). Someone might drag a shortcut (e.g. c:\Documents and settings\word.lnk), which can't be launched by the shell. How can I overcome this?

Any help at all would be very much appreciated.
Thanks in advance,


James.
 
I've had some luck with this task so far!
The following proceedure lets me get the path of an application:

Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)

'if we have a file

If Data.GetFormat(vbCFFiles) Then
me.txtPath.text = Data.Files(1)
End if

End Sub

The the API "ShellExecute" will then execute any .lnk or .exe, given the path of the application.

I have just a few problems now...

Outlook, Internet Explorer and Microsoft word/excel/powerpoint etc are NOT returning suitable paths. These are critcal to the program.

Please...anyone, any ideas?


 
Brad,

Thanks for your advice, but I just can't find the "mb tray control" on that site.

Could you give me an exact URL?

Many thanks,

James.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top