Article ID: 114774
Article Last Modified on 10/29/2003
'----------------------------------------------------------
' Procedure: CreateProgManItem
'
' Arguments: X The form where Label1 exists
'
' CmdLine$ A string that contains the command
' line for the item/icon.
' ie 'c:\myapp\setup.exe'
'
' IconTitle$ A string that contains the item's
' caption
'----------------------------------------------------------
Sub CreateProgManItem (x As Form, CmdLine$, IconTitle$)
...
' Enter the following two lines as one, single line:
x.Label1.LinkExecute "[AddItem(" + CmdLine$ + Chr$(44) + IconTitle$ +
Chr$(44) + ",,)]"
...
End Sub
'----------------------------------------------------------
' Procedure: CreateProgManItem
'
' Arguments: X The form where Label1 exists
'
' CmdLine$ A string that contains the command
' line for the item/icon.
' ie 'c:\myapp\setup.exe'
'
' IconTitle$ A string that contains the item's
' caption
'
' IconPath$ A string that contains the filename
' for the icon to be displayed in the
' group window
'
' IconIndex Specifies the index of the icon in
' the file indicated by the IconPath$
' parameter
' -1 for default icon
'
' xPos Specifies the horizontal position
' of the icon in the group window
' -1 for next icon in group
'
' yPos Specifies the vertical position
' of the icon in the group window
' -1 for next icon in group
'
' DefDir$ A string that contains the name of
' the default (or working) directory
' Win 3.1
'
' HotKey Identifies a hot (or shortcut) key
' that is specified by the user
' Win 3.1
' NOTE: For the HotKey parameter, specify the ASCII
' value of the desired key. The application can
' create a key combination (for example, ALT+SHIFT+A)
' by adding one or more of the following values to
' the ASCII value for the key:
'
' Decimal
' Key Offset
' --- ------
' SHIFT 256
' CTRL 512
' ALT 1024
'
' For example, ALT+SHIFT+A is signified by 1345
' (1024+256+65).
'
' fMinimize Specifies whether an application
' should be minimized when it is
' first displayed
' Win 3.1
'
'----------------------------------------------------------
' Enter the following two lines as one, single line:
Sub CreateProgManItem (x As Form, CmdLine$, IconTitle$, IconPath$,
IconIndex, xPos, yPos, DefDir$, HotKey, fMinimize)
Dim sParam As String
...
' Add the following lines in place of the single LinkExecute line above
sParam = CmdLine$ + "," + IconTitle$
sParam = sParam + "," + IconPath$ + ","
If IconIndex >= 0 Then sParam = sParam + Format$(IconIndex)
sParam = sParam + "," + Format$(xPos) + "," + Format$(yPos)
If gfWin31% Then ' Win 3.1 - additional parameters allowed
sParam = sParam + "," + DefDir
sParam = sParam + ","
If HotKey Then sParam = sParam + Format$(HotKey)
sParam = sParam + ","
If fMinimize Then sParam = sParam + Format$(fMinimize)
End If
x.Label1.LinkExecute "[AddItem(" + sParam + ")]"
...
End Sub
CreateProgManItem Setup1, destPath$ + "<your>.EXE", "your title"
Change it to read:
' The following installs your program's icon setting it to be used
' from the the destination directory. It also sets the default working
' directory as the windows directory.
' Enter the following two lines as one, single line:
CreateProgManItem Setup1, destPath$ + "<your>.EXE", "your title",
destPath$ + "your.ico", -1, -1, -1, winDir$, 0, 0
CreateProgManItem Setup1, destPath$ + "ODBCADM.EXE", "ODBC Administrator"Change it to read:
' Enter the following three lines as one, single line:
CreateProgManItem Setup1, destPath$ + "ODBCADM.EXE",
"ODBC Administrator", destPath$ + "ODBCADM.EXE", -1, -1, -1,
destPath$, 0, 0
C:\VB\SETUPKIT\KITFILES\COMPRESS -r SETUP1.EXE A:\
Additional query words: 3.00 CustomerContrib
Keywords: kbcode KB114774