|
|
Delphi Tips & Tricks | Tips & Tricks | Bug List | Cool Delphi Sites | Creating a new Group using DDE Here is a procedure which will create a Program Group for you. var
Name: string;
Macro: string;
Cmd: array[0..255] of Char;
begin
if GroupName.Text = '' then {an edit field on the form}
MessageDlg('Group name can not be blank.', mtError, [mbOK], 0)
else
begin
Name := GroupName.Text;
Macro := Format('[CreateGroup(%s)]', [Name]) + #13#10;
StrPCopy (Cmd, Macro);
DDEClient.OpenLink;
if not DDEClient.ExecuteMacro(Cmd, False) then
MessageDlg('Unable to create group.', mtInformation, [mbOK], 0);
DDEClient.CloseLink;
GroupName.SelectAll;
end;
end;
| Borland Delphi | About the Authors | Home |
Copyright © 1996 Asylum Software Pvt. Ltd. This is an ASPL production. |