Thanks for your help altef 4.. i have the custom form, an ok and cancel button and a label. The code only ask for next disc, dont have browse dialog, i think the problem is in this part:
IDCANCEL then ISDoneError := True
i dont know how to insert in the custom form code.. the complete code for the custom form is this:
Quote:
///////////////////////////////////////////////////////////CHANGE DISC CUSTOM FORM PROCEDURES
procedure ChangeDiscNoClick(Sender: TObject);
begin
ChangeDiscForm.ModalResult:=mrCancel;
end;
procedure ChangeDiscOkClick(Sender: TObject);
begin
ChangeDiscForm.ModalResult:=mrOk;
end;
procedure ChangeDiscFormOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(ChangeDiscForm.Handle,$0112,$F012,0);
end;
////////////////////////////////////////////////////////////////////////////////////////////////
procedure FormCloseBtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
DirBrowseCancel.onclick(nil);
TaskCancel.onclick(nil);
ChangeDiscCancel.onclick(nil);
end;
procedure FormOkBtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
DirBrowseOk.onclick(nil);
TaskOk.onclick(nil);
ChangeDiscOk.onclick(nil);
end;
////////////////////////////////////////////////////////////////////////////////////////////////
|
and this is the custom form perse:
Quote:
///////////////////////////////////////////////////////////CHANGE DISC CUSTOM FORM
procedure CreateChangeDiscForm;
begin
ChangeDiscForm:= CreateCustomForm();
ChangeDiscForm.BorderStyle:=bsNone;
ChangeDiscForm.ClientWidth := ScaleX(400);
ChangeDiscForm.ClientHeight := ScaleY(300);
ChangeDiscForm.FormStyle:= fsStayOnTop;
ChangeDiscForm.OnMouseDown:=@ChangeDiscFormOnMouse Down;
ChangeDiscForm.Center;
ChangeDiscForm.BringToFront;
ChangeDiscLabel:= TLabel.Create(ChangeDiscForm);
ChangeDiscLabel.Parent:= ChangeDiscForm;
ChangeDiscLabel.SetBounds(40,13,600,30);
ChangeDiscLabel.AutoSize:= False;
ChangeDiscLabel.WordWrap:= True;
ChangeDiscLabel.Transparent:= True;
ChangeDiscLabel.Font.Name := 'Verdana';
ChangeDiscLabel.Font.Color:= clGray;
ChangeDiscLabel.Font.Style:=[fsBold];
ChangeDiscLabel.Font.Size:= 8;
ChangeDiscLabel.Caption:=ExpandConstant('{cm:Chang eDiscLabel}');
ChangeDiscCancel:= TButton.Create(ChangeDiscForm);
ChangeDiscCancel.SetBounds(0,0,0,0);
ChangeDiscCancel.OnClick:=@ChangeDiscNoClick;
ChangeDiscCancel.Cursor := crHand;
ChangeDiscCancel.Parent:=ChangeDiscForm;
ChangeDiscOk:= TButton.Create(ChangeDiscForm);
ChangeDiscOk.Parent:=ChangeDiscForm;
ChangeDiscOk.SetBounds(0,0,0,0);
ChangeDiscOk.OnClick:=@ChangeDiscOkClick;
ChangeDiscOk.Cursor := crHand;
hChangeDiscCancelBtn:=BtnCreate(ChangeDiscForm.Han dle,375,13,15,15,ExpandConstant('{tmp}\ExitBtn.png '), 0, false);
BtnSetEvent(hChangeDiscCancelBtn, BtnClickEventID,WrapBtnCallback(@FormCloseBtnClick ,1));
BtnSetEvent(hChangeDiscCancelBtn,BtnMouseEnterEven tID,WrapBtnCallback(@BtnEnter,1));
BtnSetCursor(hChangeDiscCancelBtn,GetSysCursorHand le(32649));
hChangeDiscOkBtn:=BtnCreate(ChangeDiscForm.Handle, 362,13,15,15,ExpandConstant('{tmp}\OkBtn.png'), 0, false);
BtnSetEvent(hChangeDiscOkBtn, BtnClickEventID,WrapBtnCallback(@FormOkBtnClick,1) );
BtnSetEvent(hChangeDiscOkBtn,BtnMouseEnterEventID, WrapBtnCallback(@BtnEnter,1));
BtnSetCursor(hChangeDiscOkBtn,GetSysCursorHandle(3 2649));
img:=ImgLoad(ChangeDiscForm.Handle,ExpandConstant( '{tmp}\ChangeDisc.png'),0,0,400,300,True,True);
ImgApplyChanges(ChangeDiscForm.Handle);
end;
////////////////////////////////////////////////////////////////////////////////////////////////
|
And thanks for the code of priority Altef,, i have problem with cpu usage even with -m0, cant open a single web page  .
Last edited by Logrim; 17-02-2014 at 08:56.
|