Business Directory
Trade Forum
Vision 2000
Delphi
Domain Rates
Search
Music
Opinion Award
About
FeedBack
Quit


Delphi Tips & Tricks

| Tips & Tricks | Bug List | Cool Delphi Sites |
| Connectivity | Delphi 2.0 Features | Internet |

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 |

For Queries Mail To Webmaster

Copyright © 1996 Asylum Software Pvt. Ltd. This is an ASPL production.
Produced in conjunction with ASPL DELPHI TEAM.
Last revised November 27, 1996.