Jump to content

Recommended Posts

Posted

Hi

 

I write below code,But

const
  magicnumber = 500;

procedure TMainForm.Button2Click(Sender: TObject);
var
  I, J: Integer;
  X, Y: Word;
begin
  I := 0;
  J := 0;

  UniLabel1.Caption:='The Button2Click handler has started';

  while I < magicnumber do
  begin
    Randomize;
    while J < magicnumber do
    begin
      Y := Random(J);
      Inc(J);
      Sleep(10);
    end;
    X := Random(I);
    Inc(I);
  end;
  UniLabel1.Caption:='The Button2Click handler is finished';

end;

This line code ,

  UniLabel1.Caption:='The Button2Click handler has started';

Don't Work.I have unipanel and put unilabel1 on it.and set unipanel   AlignmentControl to uniAlignmentClient.

 

Best Regards.

Posted

Hi,

 

In your case, you should use:

 

1. MainModule -> EnableSynchronousOperations -> True

 

2.

...
I := 0;
J := 0;

UniLabel1.Caption:='The Button2Click handler has started';
UniSession.Synchronize(); //<-----
...

Best regards,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...