home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09964.iso / program / ITv251.zip / readme.txt < prev    next >
Text File  |  1996-09-15  |  5KB  |  94 lines

  1. IconTray v2.5.1 Readme File
  2.  
  3. Both IconTray251.dll and the example program were written by me, Scott Adkins (sadkins@freenet.columbus.oh.us).  I apologize if this document does not explain everything you need to know about IconTray.
  4.  
  5. Unfortunately, because of the time and effort I have had to put into this program, I have had to raise the registering cost to $20 (Sorry, the source code is no longer available).  I do hope I don't have to go over these amounts. If you wish to register please send a check (no cash or credit cards, please) made out to Scott Adkins to the address below.  Please include your email address, so I can send you future updated versions.
  6.  
  7.     Scott Adkins
  8.     3053 Bretton Woods Dr.
  9.     Columbus, OH 43231
  10.  
  11. ****************************************************************************
  12.  
  13.     I suggest you go completely through the included source code (which is documented) and get aqainted with it first, this way you'll understand the methods and properties better.  Below is a listing of the methods and properties used in IconTray and their syntax.
  14.  
  15. Methods            
  16.  
  17. Add 'This will add the specified icon to the Icon Tray
  18.  
  19. Remove 'This will delete the icon in the icon tray
  20.  
  21. Update 'Use this to update the icon, after changing its properties
  22.  
  23. Status  'This tell you which mouse button was clicked (See below for 'property values), best used in a Timer control with an interval of 1. See 'the included source code for an example.
  24. 'Values = RightClickEvent, LeftClickEvent, RightDoubleClickEvent, 'LeftDoubleClickEvent, and MouseMoveEvent
  25.  
  26. StatusOut  'This MUIconTray be used AFTER entering the source code for mouse 'clicks.  See included source code Timer1.Timer.
  27.  
  28.  
  29. Properties
  30.  
  31. ToolTip = "Enter the text you want to be the icons ToolTip here"  'Pretty self-explainatory, don't you think?
  32.  
  33. Icon = PictureSource 'Example IconTray.Icon = Image1.Picture.  You cannot enter a filename here!  You must have an object holding the icon.
  34.  
  35.  
  36.  
  37.     Before you can use IconTray, you need to register it with your computer.  To do this, use the included file "Regsvr32.exe".  Type at your command prompt "regsvr32 c:\windows\system\IconTray2.dll" and hit enter.
  38.  
  39.     To use IconTray v2.0 in a VB4 project, you must first move file "IconTray2.dll" to your Windows\System directory, then open Visual Basic 4.0, select the "Tools" menu, select the "References" submenu, and select the box "IconTray v2.0" (if it does not appear among the selections, use browse to select it).  Then, enter this code in your "General" and "Declarations" section of your form:
  40.  
  41. Option Explicit
  42. Public IconTray As New Icon  'You can replace the IconTray variable with any 'other variable you wish
  43.  
  44. To detect mouse events, create a timer control and put this code in Timer1.Timer
  45.  
  46.  
  47. Private Sub Timer1_Timer()
  48.  
  49.    'set the most recent event
  50.    If IconTray.Status <> "Nothing" Then
  51.        If IconTray.Status = "LeftClickEvent" Then lblRecent.Caption = "Left Click"
  52.        If IconTray.Status = "LeftDoubleClickEvent" Then lblRecent.Caption = "Double-Left Click"
  53.        If IconTray.Status = "RightClickEvent" Then lblRecent.Caption = "Right Click"
  54.        If IconTray.Status = "RightDoubleClickEvent" Then lblRecent.Caption = "Double-Right Click"
  55.        If IconTray.Status = "MouseMoveEvent" Then lblRecent.Caption = "Mouse Moved Over"
  56.    End If
  57.    
  58.    ' The below If/Then/Else statement controls code if the mouse moves over    'icon
  59.    If IconTray.Status = "MouseMoveEvent" Then
  60.         
  61.         IconTray.StatusOut
  62.     End If
  63.  
  64.    ' The below If/Then/Else statement controls code for Right Clicking On    'the Icon
  65.    If IconTray.Status = "RightClickEvent" Then
  66.             
  67.             IconTray.StatusOut 'NEVER delete this line!  It is essential to         'the any program using IconTray.dll
  68.    End If
  69.    
  70.    ' The below If/Then/Else statement controls code for Left Clicking On the       'Icon
  71.    If IconTray.Status = "LeftClickEvent" Then
  72.    
  73.             IconTray.StatusOut 'NEVER delete this line!  It is essential to         'the any program using IconTray.dll
  74.    End If
  75.    
  76.    ' The below If/Then/Else statement controls code for Left-Double Clicking    'On the Icon
  77.    If IconTray.Status = "LeftDoubleClickEvent" Then
  78.    
  79.             IconTray.StatusOut 'NEVER delete this line!  It is essential to            'the any program using IconTray.dll
  80.    End If
  81.    
  82.    ' The below If/Then/Else statement controls code for Right-Double    'Clicking On the Icon
  83.    If IconTray.Status = "RightDoubleClickEvent" Then
  84.    
  85.             IconTray.StatusOut 'NEVER delete this line!  It is essential to         'the any program using IconTray.dll
  86.    End If
  87.  
  88. End Sub
  89.  
  90.  
  91. I think the above code is pretty self-explanatory too.
  92.  
  93. And of course, you will also need to put some kind of control to put the icon up there, delete it, modify it, etc.
  94.