Forum > LCL

Dialogs - QuestionDlg ...

<< < (2/3) > >>

seghele0:
This is my result:

With error:
Compile Project, Target: project1.exe: Exit code 1, Errors: 1
unit1.pas(34,1) Fatal: illegal character "'Â'" ($C2)

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---unit Unit1;{$mode objfpc}{$H+}interfaceuses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;type  { TForm1 }  TForm1 = class(TForm)    Button1: TButton;    procedure Button1Click(Sender: TObject);  private  public  end;var  Form1: TForm1;implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);var  F: TForm;  i: Integer;  C: TComponent;  B: TBitBtn;  Res: TModalResult;begin  F := CreateMessageDialog('Dare to take a choice?', 'Do you want to format your harddrive?', mtConfirmation, [mbYes, mbNo, mbAbort, mbRetry, mbCancel, mbOK]);  for i := 0 to F.ComponentCount-1 do  begin    C := F.Components[i];    if (C is TBitBtn) then    begin      B := TBitBtn(C);      case B.Kind of        bkYes: B.Caption := 'No';        bkNo: B.Caption := 'Yes';        bkAbort: B.Caption := 'Ok';        bkRetry: B.Caption := 'Cancel';        bkCancel: B.Caption := 'Retry';        bkOk: Caption := 'Abort';      end;    end;  end;  Res := F.ShowModal;  F.Free;end; end.                        

ezlage:
Check your file with a Hex Editor, probably you will find a C2 somewhere. If true, you can replace it with 32.

seghele0:
I've installed the application 'HXD Hex Editor'.
Wich file must be changed ?
 :-[

ezlage:

--- Quote from: seghele0 on November 08, 2021, 01:43:30 pm ---I've installed the application 'HXD Hex Editor'.
Wich file must be changed ?
 :-[

--- End quote ---

The file that refers to Unit1, probably Unit1.pas.

seghele0:
Sorry, I see the multiple "c2" in my Unit1.pas, but I can't change them to "32".

Too bad there isn't a simple workable example on Google with your code.
 :(

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version