Hi,

I've been using ShellExecute to launch a PIC programmer application.  The
method below show how I run it and then launch a dialog to hold off my
application till the programmer has finished programming the PIC.  I've used
this to program more than 4000 processors already.

John Dammeyer


Wireless CAN with the CANRF module now available.
http://www.autoartisans.com/products
Automation Artisans Inc.
Ph. 1 250 544 4950



procedure TPackForm.ProgramButtonClick(Sender: TObject);
var res : integer;
    idValue : BYTE;
begin
    //
    res := ShellExecute(Self.Handle, nil, 'EPICWin.exe', '/P /X /DPIC12F675
LandMine',
    'C:\Program Files\Epic Programmer', SW_SHOWNORMAL);
    idValue := StrToInt( '$'+IDField.text );
    MessageDlg(
        'Programming Node # '+ IntToHex(idValue,2),
        mtInformation,
        [mbOK],
        0);

    inc(idValue);
    idValue := idValue and $ff;
    IDField.text := IntToHex(idValue,2);
    IDField.Font.Color := clGREEN;
    ProgramButton.Enabled := FALSE;
    CalculateButton.Default := TRUE;
    ProgramButton.Default := FALSE;
    TestButton.Enabled := TRUE;
end;

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to