Article ID: 142822
Article Last Modified on 7/15/2004
CreateGroup(GroupName,GroupPath) ShowGroup(GroupName,ShowCommand) AddItem(CommandLine,Name,IconPath,IconIndex,XPos,YPos) DeleteGroup(GroupName) ExitProgman(bSaveState)A full explanation of the above commands can be found in Chapter 22 of the "Microsoft Windows Software Development Kit Guide to Programming" version 3.1 manual. The Microsoft Windows Software Development Kit can be found in the MSDN/VB Starter Kit which is distributed with the Professional and Enterprise editions of Visual Basic 4.0.
Object Name Caption
--------------------------------
TextBox Text1
Button Command1 Make
Button Command2 Delete
Button Command3 Request
Private Sub Command1_Click ()
Text1.LinkTopic = "ProgMan|Progman"
Text1.LinkMode = 2 ' Establish manual link.
Text1.LinkExecute "[CreateGroup(Test Group)]"
' Make a group in Windows Program Manager.
Text1.LinkExecute "[AddItem(c:\vb\vb.exe, Visual Basic)]"
' Add an item to that group.
Text1.LinkExecute "[ShowGroup(Test Group, 7)]"
' Iconize the group and focus to VB application.
On Error Resume Next ' Disconnecting link with Windows Program
Text1.LinkMode = 0 ' Manager causes an error in Windows 3.0.
' This is a known problem with Windows Program Manager.
End Sub
Private Sub Command2_Click ()
Text1.LinkTopic = "ProgMan|Progman"
Text1.LinkMode = 2 ' Establish manual link.
Text1.LinkExecute "[DeleteGroup(Test Group)]"
' Delete the group and all items within it.
On Error Resume Next ' Disconnecting link with Windows Program
Text1.LinkMode = 0 ' Manager causes an error in Windows 3.0.
' This is a known problem with Windows Program Manager.
End Sub
Private Sub Command3_Click ()
Text1.LinkTopic = "ProgMan|Progman"
Text1.LinkItem = "PROGMAN"
Text1.LinkMode = 2 ' Establish manual link.
Text1.LinkRequest ' Get a list of the groups.
On Error Resume Next ' Disconnecting link with Windows Program
Text1.LinkMode = 0 ' Manager causes an error in Windows 3.0.
' This is a known problem with Windows Program Manager.
End Sub
DDE and CreateGroup
Keywords: kbhowto KB142822