Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Exiting and shutting down DBSRVR
Wed, Oct 14 2009 5:25 AMPermanent Link

Edward Jones
I am about to embark on an upgrading process of my customers from DBISAM to ElevateDB but want to automate the closing of DBSRVR. Note
that this is not just a Stop but an actual closing of DBSRVR so it goes from the System Tray. I am not running DBSRVR as a service so I can't use
"net stop" (which would of been handy!).

Is there a way to do this programmatically?

Regards


Edward Jones
Wed, Oct 14 2009 7:36 AMPermanent Link

"John Hay"
Edward

> I am about to embark on an upgrading process of my customers from DBISAM
to ElevateDB but want to automate the closing of DBSRVR. > >Is there a way
to do this programmatically?

The procedure below should do this for you.  You call it like
closeapp('DBISAM Database Server - DBSRVR (Application)');

procedure closeapp(mainformcaption:string);
var
 h: HWND;
begin
 h := FindWindow(nil, pansichar(mainformcaption));
 if h <> 0 then PostMessage(h, WM_CLOSE, 0, 0);
end;


John

Thu, Oct 15 2009 7:02 AMPermanent Link

Edward Jones
"John Hay" wrote:

Edward

> I am about to embark on an upgrading process of my customers from DBISAM
to ElevateDB but want to automate the closing of DBSRVR. > >Is there a way
to do this programmatically?

The procedure below should do this for you.  You call it like
closeapp('DBISAM Database Server - DBSRVR (Application)');

procedure closeapp(mainformcaption:string);
var
 h: HWND;
begin
 h := FindWindow(nil, pansichar(mainformcaption));
 if h <> 0 then PostMessage(h, WM_CLOSE, 0, 0);
end;


John

------------------------

Thanks John, brilliant, that does the trick!


Regards

Edward Jones
Image