FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   INNO TROUBLESHOOT - Questions Here (https://fileforums.com/showthread.php?t=93193)

Razor12911 16-02-2014 06:36

set up arc.ini

GloverK1911 16-02-2014 07:32

Quote:

Originally Posted by Razor12911 (Post 429130)
set up arc.ini

I already

GloverK1911 17-02-2014 05:05

I'm Try use BlacBoxScript and it's works fine
But with my Setup it's not working

danswano 17-02-2014 06:21

Hello,
How to execute a command line using ISExec?
for example i want to execute
Quote:

program.exe file.ext
This is the stock code from ISDone.iss
Quote:

if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
can you modify it for me?

Logrim 17-02-2014 07:06

Anyone, can tell me how to establish priority in install?

altef_4 17-02-2014 07:31

Quote:

Originally Posted by Logrim (Post 429162)
Anyone, can tell me how to establish priority in install?

Code:

[Setup]
AppName=MyApp
AppVername=MyApp
DefaultDirName={pf}\MyApp
 
[code]
 
const
  NORMAL_PRIORITY_CLASS          = $00000020;
  IDLE_PRIORITY_CLASS            = $00000040;
  HIGH_PRIORITY_CLASS            = $00000080;
  REALTIME_PRIORITY_CLASS        = $00000100;
  ABOVE_NORMAL_PRIORITY_CLASS    = $00004000;
  BELOW_NORMAL_PRIORITY_CLASS    = $00008000;
 
function SetPriorityClass(hProcess: THandle; dwPriorityClass: DWORD): BOOL;
  external 'SetPriorityClass@kernel32';
 
function GetCurrentProcess: THandle;
  external 'GetCurrentProcess@kernel32';
 
procedure InitializeWizard();
begin
  SetPriorityClass(GetCurrentProcess, IDLE_PRIORITY_CLASS);    //set setup priority
end;

taken from here

altef_4 17-02-2014 07:42

Quote:

Originally Posted by danswano (Post 429161)
Hello,
How to execute a command line using ISExec?
for example i want to execute

This is the stock code from ISDone.iss

can you modify it for me?

Code:

if not ISExec ( 0, 0, 0, 'program.exe', 'file.ext', '', '',false) then break;

danswano 17-02-2014 07:47

Thanks altef_4
I want to run that command in multiple sub directories.
for example {app}\dir\program.exe

how the code will look like?

y_thelastknight 17-02-2014 07:50

Quote:

Originally Posted by GloverK1911 (Post 429157)
I'm Try use BlacBoxScript and it's works fine
But with my Setup it's not working

If you use quick archive packer then copy file from support dir in quick archive packer and paste it in your setup include dir..

Sorry for my bad english

altef_4 17-02-2014 08:10

Quote:

Originally Posted by danswano (Post 429165)
Thanks altef_4
I want to run that command in multiple sub directories.
for example {app}\dir\program.exe

how the code will look like?

Code:

if not ISExec ( 0, 0, 0,ExpandConstant('{app}\dir\program.exe'), 'file.ext', '', '',false) then break;

Logrim 17-02-2014 08:26

I need an expert help here :D.. i know that in msgboxes i cant insert a image, because of that, i make a custom form, and it work well, but i need to know how to to insert the "insert disc" message that i have in the original msgbox, into the custom form.

This is the code:
Quote:

if Arc1[0] <> '' then
begin
if not FileExists(Arc1[0]) then
begin
ChangeDiscForm.ShowModal;
//if MsgBox(ExpandConstant('{cm:ChangeDisk} ') + Arc1[2], mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;
end else begin
if not ISArcExtract( 0, 0, Arc1[0], Arc1[1], '', false, Arc1[3], ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), False) then ISDoneError := True;
i:= i + 1;
end;
end;
The part with // (the msgbox) its the part i need to include inside the custom form.

altef_4 17-02-2014 08:45

Quote:

Originally Posted by Logrim (Post 429168)
I need an expert help here :D.. i know that in msgboxes i cant insert a image, because of that, i make a custom form, and it work well, but i need to know how to to insert the "insert disc" message that i have in the original msgbox, into the custom form.

This is the code:


The part with // (the msgbox) its the part i need to include inside the custom form.

you must create new label, button for dir browse dialog and edit in your custom form

Logrim 17-02-2014 08:53

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 :D.

altef_4 17-02-2014 09:06

Quote:

Originally Posted by Logrim (Post 429174)
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:



and this is the custom form perse:



And thanks for the code of priority Altef,, i have problem with cpu usage even with -m0, cant open a single web page :D.

here is example of custom form for next disk for ISDone
Code:

[Setup]
AppName=My Program
AppVersion=1.5
;AppVerName=My Program 1.5
AppPublisher=Winst@n, Inc.
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputDir=.
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"


[Files]
Source: {win}\help\*; DestDir: {app}\files1\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files2\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files3\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files4\; Flags: external recursesubdirs;

[code]
var
  TNewDiskForm :TSetupForm;
  DiskBitmapImage: TBitmapImage;
  SelectDiskLabel,PathLabel: TLabel;
  PathEdit: TEdit;
  BrowseButton: TButton;
  OKButton: TButton;
  CancelButton: TButton;
  Filename: String;
  Path: String;
  Dir: String;
  ModalResult: Longint;


//path for searching file
function GetSanitizedPath: String;
begin
 Result := Trim(PathEdit.Text);
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
 Cancel:=True;
 Confirm:=False;
end;

//browse button procedure
procedure BrowseButtonClick(Sender: TObject);
begin
  Dir := GetSanitizedPath;
  if BrowseForFolder(SetupMessage (msgSelectDirectoryLabel), Dir, False) then
  PathEdit.Text := Dir + '\';
  TNewDiskForm.show;
end;

// close form (based on mrOK)
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
Path := PathEdit.Text;
Filename:= ExpandConstant ('data_2.arc');
case TNewDiskForm.ModalResult of mrOK: begin
if (Path = '') or not FileExists(Path + Filename) then begin CanClose := false
MsgBox(FmtMessage(SetupMessage(msgFileNotInDir2), [Filename, Path]), mbError, MB_OK);
end;
end;
mrCancel:
begin
CanClose := True;
end;
end;
end;

// ask for next disk
procedure SelectDisk(const DiskNumber: Integer; const Filename, Path: String);
var ExitFlag:Boolean;
begin
  repeat
    TNewDiskForm:= CreateCustomForm();
    TNewDiskForm.SetBounds(ScaleX(0), ScaleY(0), ScaleX(377), ScaleY(200));
    TNewDiskForm.CenterInsideControl(WizardForm, False);
    TNewDiskForm.Caption:=SetupMessage(msgChangeDiskTitle);
    TNewDiskForm.Font.Color:= clWindowText
    TNewDiskForm.Font.Height:= -11
    TNewDiskForm.Font.Name:= 'MS Sans Serif'
    TNewDiskForm.Font.Style:= []
    TNewDiskForm.OnCloseQuery:=@FormCloseQuery;

    SelectDiskLabel:=TLabel.Create(TNewDiskForm)
    SelectDiskLabel.SetBounds(ScaleX(72),ScaleY(8), ScaleX(297), ScaleY(72));
    SelectDiskLabel.AutoSize:=False
    SelectDiskLabel.WordWrap:=True
    SelectDiskLabel.Transparent:=True
    SelectDiskLabel.Font.Color:=clBlack
    SelectDiskLabel.Font.Size:=8
    SelectDiskLabel.Caption:=FmtMessage(SetupMessage(msgSelectDiskLabel2), [IntToStr(DiskNumber)]);
    SelectDiskLabel.Parent:=TNewDiskForm
    SelectDiskLabel.ShowAccelChar:= False

    PathEdit:=TEdit.Create(TNewDiskForm)
    PathEdit.SetBounds(ScaleX(8), ScaleY(96), ScaleX(281), ScaleY(21));
    PathEdit.TabOrder:=2
    PathEdit.Text := ExpandConstant('{src}\');
    PathEdit.Parent := TNewDiskForm;

    PathLabel:= TLabel.Create(TNewDiskForm);
    PathLabel.SetBounds(ScaleX(8),ScaleY(80), ScaleX(5), ScaleY(14));
    PathLabel.Font.Color:=clBlack
    PathLabel.FocusControl:= PathEdit
    PathLabel.Caption := SetupMessage(msgPathLabel);
    PathLabel.Parent:=TNewDiskForm

    BrowseButton := TNewButton.Create(TNewDiskForm);
    BrowseButton.SetBounds(ScaleX(296), ScaleY(95), ScaleX(73), ScaleY(23));
    BrowseButton.Parent := TNewDiskForm;
    BrowseButton.OnClick:=@BrowseButtonClick;
    BrowseButton.Caption := SetupMessage(msgButtonBrowse);

    CancelButton := TNewButton.Create(TNewDiskForm);
    CancelButton.SetBounds(ScaleX(296), ScaleY(137), ScaleX(73), ScaleY(23));
    CancelButton.ModalResult := mrCancel;
    CancelButton.Parent := TNewDiskForm;
    CancelButton.Caption := SetupMessage (msgButtonCancel);

    OkButton := TNewButton.Create(TNewDiskForm);
    OkButton.SetBounds(ScaleX(216), ScaleY(137), ScaleX(73), ScaleY(23));
    OkButton.ModalResult := mrOk;
    OkButton.Parent := TNewDiskForm;
    OKButton.Caption := SetupMessage(msgButtonOK);

    TNewDiskForm.ShowModal;

//close form (based on mrCancel)
case TNewDiskForm.ModalResult of mrCancel:
begin
MsgBox('file not found or you just want to exit, setup now finished',mbError, MB_OK);
TNewDiskForm.free;
ExitFlag:= ExitSetupMsgBox;
Case ExitFlag of True:WizardForm.Close;
False:SelectDisk (DiskNumber,Filename,Path);
True:TNewDiskForm.free;
end;
end;
end;
until ((TNewDiskForm.ModalResult=mrOk)or(TNewDiskForm.ModalResult=mrCancel));
end;


procedure CurStepChanged(CurStep: TSetupStep);
begin
// Unpacking form start            disk №          search path
                                //      |                |
if CurStep = ssInstall then  SelectDisk (2, 'Filename','{src}');
end;                                //        |
//                                              searching file name

taken from this

GloverK1911 18-02-2014 01:17

1 Attachment(s)
I'm use this script and it's not working when extract with precomp anybody can help me?
http://i1.minus.com/ibb68niSdB5lB9.png

Darkangel5 18-02-2014 02:15

Hello
how to install a skin for the window to Uninstall InnoSetup.

thank you

danswano 18-02-2014 05:37

Hello everyone.
How can i group the tasks so i can check/uncheck them all at once in one click?

y_thelastknight 18-02-2014 06:15

Quote:

Originally Posted by GloverK1911 (Post 429182)
I'm use this script and it's not working when extract with precomp anybody can help me?
http://i1.minus.com/ibb68niSdB5lB9.png

Check post #929
I didnt check your script

Quote:

Originally Posted by Darkangel5 (Post 429183)
Hello
how to install a skin for the window to Uninstall InnoSetup.

thank you

Skin for uninstall wizardform???

Quote:

Originally Posted by danswano (Post 429186)
Hello everyone.
How can i group the tasks so i can check/uncheck them all at once in one click?

Did you create custom checkbox?

Then create a another check box and control them

Else check help file for it

Reply via mobile so cant do example :(

Darkangel5 18-02-2014 06:37

Quote:

Originally Posted by y_thelastknight (Post 429187)

Skin for uninstall wizardform???

yes

GloverK1911 18-02-2014 07:03

Quote:

Originally Posted by y_thelastknight (Post 429187)
Check post #929
I didnt check your script

I have copied but it still does not work

y_thelastknight 18-02-2014 07:05

Quote:

Originally Posted by Darkangel5 (Post 429188)
yes

Check this script
I cant do example dude im in mobile.
http://fileforums.com/showthread.php?t=95588

Darkangel5 18-02-2014 08:33

Quote:

Originally Posted by y_thelastknight (Post 429190)
Check this script
I cant do example dude im in mobile.
http://fileforums.com/showthread.php?t=95588

thank you

Logrim 18-02-2014 08:49

Thank for the change disc code Altef 4, work perfect.. this is how my change disk screen looks now thanks to you:

Nedd more fixers in the desing :D

http://imageshack.com/a/img843/5337/yxac.png

y_thelastknight 18-02-2014 10:46

Quote:

Originally Posted by GloverK1911 (Post 429189)
I have copied but it still does not work

Then i have to check on pc :(
Right now i cant use pc

Logrim 19-02-2014 03:46

One rapid question.. I see in the forum (i dont remember what conversion has that) a custom procedure that add custom exit msgbox with image (that is the importat part) :D, the procedure in cuestion was myexit.. anyone can help me to do a similar procedure? dont imagine how to do it.. thanks,, and sorry for so many questions.. its my first script with inno, and want to make a bit different.. i like to complicate my life, lol :D

P.D. i think, the conversion is made by fabio.. dont remember.

Edit: I found the answer for myself.. Thanks to Razor, y_thelastknight and Altef i'm learning a lot. In two days i post a preview, i hope you like it, thanks all three.

Edit2.. Found a new problem that i dont know how to resolve,, sorry.. the custom exit button work like a charm in normal exit, but in change disk exit, the button appears twice. One normal exit msgbox and one the custom exit. I know whats is the problem, but i dont know how to change things for it works.. I need help,,, again.. sorry..

The problem is here, (ExitFlag:= ExitSetupMsgBox; //this is normal exit message) this is the final part of change disk form:
Quote:

case TNewDiskForm.ModalResult of mrCancel:
begin
TNewDiskForm.free;
ExitFlag:= ExitSetupMsgBox;
Case ExitFlag of True:WizardForm.Close;
False:SelectDisk (DiskNumber,Filename,Path);
True:TNewDiskForm.free;
end;
end;
end;
until ((TNewDiskForm.ModalResult=mrOk)or(TNewDiskForm.Mo dalResult=mrCancel));
end;
this the custo exit button:

Quote:

///////////////////////////////////////////////////////////CUSTOM EXIT
procedure MyExitMessage();
var
Font: TFont;
begin
MyExit := CreateCustomForm();
with MyExit do
begin
Position := poScreenCenter;
ClientWidth := WizardForm.Width;
ClientHeight := WizardForm.Height div 2;
Caption := ExpandConstant(SetupMessage(msgExitSetupTitle));
Color := clBlack;

with TNewStaticText.Create(MyExit) do
begin
Left := ScaleX(110);
Top := ScaleY(20);
Width := MyExit.Width - ScaleX(115);
Height := MyExit.Height div 2;
AutoSize := False;
WordWrap := True;
Caption := ExpandConstant(SetupMessage(msgExitSetupMessage));
Parent := MyExit;
Font.Color := clWhite;
end;
end;

Font := TFont.Create;
Font.Size := WizardForm.CancelButton.Font.Size;

NoBtn := BtnCreate(MyExit.Handle, MyExit.Width - 165,
MyExit.Height - 50 - ScaleY(25), 160, 50,
ExpandConstant('{tmp}\button2.png'), 18, True);
BtnSetEvent(NoBtn, BtnClickEventID, WrapBtnCallback(@ButtonOnClick, 1));
BtnSetText(NoBtn, 'Нет');
BtnSetFontColor(NoBtn, clWhite, clWhite, clWhite, clWhite);
BtnSetFont(NoBtn, Font.Handle);

YesBtn := BtnCreate(MyExit.Handle, MyExit.Width - 323,
MyExit.Height - 50 - ScaleY(25), 160, 50,
ExpandConstant('{tmp}\button2.png'), 18, True);
BtnSetEvent(YesBtn, BtnClickEventID, WrapBtnCallback(@ButtonOnClick, 1));
BtnSetText(YesBtn, 'Да');
BtnSetFontColor(YesBtn, clWhite, clWhite, clWhite, clWhite);
BtnSetFont(YesBtn, Font.Handle);

Font.Free;
end;
////////////////////////////////////////////////////////////////////////////////////////////////
and this the ancel button procedure:
Quote:

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
Confirm:=False;
if CurPageID=wpInstalling then begin;
if Cancel then begin
ISDoneError:=True;
ISDoneCancel:=1;
FileStatusLabel.Font.Color:=clRed;
FileStatusLabel.Caption:=ExpandConstant('{cm:Rolli ngFileStatusLabel}');
DelTree(ExpandConstant('{app}'), True, True, True);
WizardForm.CancelButton.Enabled:=False;

MyExitMessage();

if MyExit.ShowModal() = mrNo then
Cancel := False;
end;
end;
end;

GloverK1911 20-02-2014 02:11

Quote:

Originally Posted by y_thelastknight (Post 429196)
Then i have to check on pc :(
Right now i cant use pc

Can you help me as soon as possible no? I'm very need it

EA-Games 20-02-2014 07:08

the percent ..
i want it 100% normal .
http://s14.postimg.org/ies1w2zhb/231.jpg

this is the script ::
http://www.mediafire.com/download/db...d1y/script.iss

Razor12911 20-02-2014 08:32

http://fileforums.com/showpost.php?p...1&postcount=89

reiji777 21-02-2014 00:51

should I put a different AppId for each conversion? or is it only for the updates?
and what its function and how important this AppId?
for example I had this AppId={{46C93620-0A14-4C5B-B1D5-362233D85F30} for one program can I change it manually?
somehow in yener script I didn't find this entry line.

Razor12911 21-02-2014 04:47

it's up to you but using the same AppId will use previous installation data, better use Different AppID.

AppId is the program uninstall description shard whereby uninstall information is stored. AppId is also optional, you can choose not to use then Inno Setup will use AppName as AppId.

GloverK1911 21-02-2014 06:18

Razor12911 can u help me check the script? I very need it. Plz :(

Logrim 21-02-2014 07:19

Hi,, i need help.. again.. how can i put this code in a custom label?

Quote:

(ExpandConstant('{cm:ChangeDisk} ') + Arc1[2], mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;
Thanks for your help.

altef_4 21-02-2014 07:52

Quote:

Originally Posted by Logrim (Post 429256)
Hi,, i need help.. again.. how can i put this code in a custom label?



Thanks for your help.

YourCustomLabel.Caption := ExpandConstant('{cm:ChangeDisk} ') + Arc1[2];

Logrim 21-02-2014 09:12

Thanks Altef,, but dont work,, is not a label, sorry is a tnewstatictext, i create a form, and i want to skin my "insert disc 1" msgbox like i made with the custom exit, but i have problem inserting that code :D

I'll show you the code of the custom form, and the part where i want to put it,, if you can help me with that i'm very thankful to you.

The change disc custom form:

Quote:

///////////////////////////////////////////////////////////CUSTOM CHANGE DISC FORM
procedure ButtonOnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
case hBtn of
CDYesBtn: begin MyExit.ModalResult:= mrYes; end;
CDNoBtn: begin MyExit.ModalResult:= mrNo; end;
end;
end;

procedure MyChangeDiscMessage();
begin
MyChangeDisc := CreateCustomForm();
with MyChangeDisc do
begin
BorderStyle:= bsNone;
Position := poScreenCenter;
ClientWidth := WizardForm.Width;
ClientHeight := WizardForm.Height div 2;
Color := clBlack;

with TNewStaticText.Create(MyChangeDisc) do
begin
Left := ScaleX(110);
Top := ScaleY(20);
Width := MyChangeDisc .Width - ScaleX(115);
Height := MyChangeDisc .Height div 2;
AutoSize := False;
WordWrap := True;
Caption := ExpandConstant('{cm:ChangeDisk} ') + Arc1[2];
Parent := MyChangeDisc ;
Font.Color := clWhite;
end;
end;

CDYesBtn:=BtnCreate(MyChangeDisc .Handle,572,5,15,15,ExpandConstant('{tmp}\ExitBtn. png'),0,False);
BtnSetEvent(CDYesBtn,BtnClickEventID,WrapBtnCallba ck(@ButtonOnClick,1));
BtnSetEvent(CDYesBtn,BtnMouseEnterEventID,WrapBtnC allback(@BtnEnter,1));
BtnSetCursor(CDYesBtn,GetSysCursorHandle(32649));

CDNoBtn:=BtnCreate(MyChangeDisc .Handle,560,5,15,15,ExpandConstant('{tmp}\OkBtn.pn g'), 0, false);
BtnSetEvent(CDNoBtn,BtnClickEventID,WrapBtnCallbac k(@ButtonOnClick,1));
BtnSetEvent(CDNoBtn,BtnMouseEnterEventID,WrapBtnCa llback(@BtnEnter,1));
BtnSetCursor(CDNoBtn,GetSysCursorHandle(32649));
end;
////////////////////////////////////////////////////////////////////////////////////////////////
And in this part of the code is where i want to skin the msgbox:

Quote:

if Arc1[0] <> '' then
begin
if not FileExists(Arc1[0]) then
begin
if MsgBox(ExpandConstant('{cm:ChangeDisk} ') + Arc1[2], mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;
end else begin
if not ISArcExtract( 0, 0, Arc1[0], Arc1[1], '', false, Arc1[3], ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), False) then ISDoneError := True;
i:= i + 1;
end;
end;

y_thelastknight 21-02-2014 10:33

If im correct delete this line

Code:

if MsgBox(ExpandConstant('{cm:ChangeDisk} ') + Arc1[2], mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;
It would be like this

Code:

MyChangeDiscMessage;
MyChangeDisc.showmodel;
If modelresult=mrno then ISDoneError := True;


Code:

procedure ButtonOnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
case hBtn of
CDYesBtn: begin MyExit.ModalResult:= mrYes; end;
CDNoBtn: begin MyExit.ModalResult:= mrNo; end;
end;
end;

What is that?? Is that fine??

Correct me if im wrong

Logrim 21-02-2014 15:27

Thanks y_thelastnight, work fine, the form show correctly, but there is two little problems :d.. the buttons ok and cancel, not work well, and i cant show one part of the message..
this code part
Quote:

+ Arc1[2]
dont work,, "unknow identifier Arc1[2]" error.

And the buttons how i say dont work :D.. but thanks man, i have problems calling custom forms :D.. Still on vacations, by the way? :P

y_thelastknight 21-02-2014 20:27

Quote:

Originally Posted by Logrim (Post 429266)
the buttons ok and cancel, not work well, and i cant show one part of the message..
this code part dont work,, "unknow identifier Arc1[2]" error.

I know button wont work like this situation.we did with another method create tbutton and made them as mrok and mrno and call them with botva2 button.

Quote:

unknow identifier Arc1[2]
Set the var and try. I guess this is the problem. But im not pro you know :p

Quote:

Still on vacations, by the way? :P
Yup :p

Darkangel5 22-02-2014 01:52

sorry to use google translation to translate

I need your service.
how to scroll a text to a point defined

thank you

Logrim 22-02-2014 02:05

I forget to set the var.. ains.. sorry for the silly cuestion y_thelasknight.. but the buttons still doesnt work,, i test in some ways and nothing work.

y_thelastknight 22-02-2014 02:24

Did you try with only tbutton??did it works??


All times are GMT -7. The time now is 07:38.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com