|Creating Program Manager groups and icons|
|By: Unknown Date: 24/09/1998|
The first step is to add a label to a form. This example assumes you are using a label named Label1. This label will be used in the DDE conversation between Program Manager and your proram. This example contains two SUBs. Both are placed into a BAS module. The first SUB creates the Program Manager Group, and the second SUB creates an icon within that group.
form, groupname, groupfile
CreateProgManItem form, command, iconcaption
|form: name of the form containing Label1 (label for DDE
groupname: name of the Program Manager group to create
groupfile: complete path and name of the GRP file for the new group
command: path of the program the icon will point to
iconcaption: caption for the new icon
Type of data
Finally, the last thing you need is to call the 2 SUBs and provide the necessary information. In this example, we are creating a group window called VB Library and are placing it into the Windows directory. Then, we are creating an icon called "VB Library" within the group. This example creates an icon for the currently running program which happens to be Library.Exe.
|CreateProgManGroup Me, "VB Library",
CreateProgManItem Me, App.Path + "\Library.Exe", "VB Library"
Running this SUBs under Windows 95 will create a Start menu group under Programs, with the icons in it.
The functions are contained in a module. You can cut and paste them in any program of yours.
|Visual Basic Programming Zone is a website by
Lorenzo Dalla Vecchia.
Webmaster's e-mail: firstname.lastname@example.org
Hosted by InWind: www.inwind.it