[Solved] Why my Thread run after Form creation?

unit AniThread; interface uses Classes, Windows, Controls, Graphics; type TAnimationThread = class(TThread) private { private declarations } FWnd: HWND; FPaintRect: TRect; FbkColor, FfgColor: TColor; FInterval: integer; protected procedure Execute; override; public constructor Create(paintsurface : TWinControl; {Control to paint on } paintrect : TRect; { area for animation bar } bkColor, barcolor : TColor; { colors … Read more

[Solved] How to delay seconds in android?

Try Handler public void showToast(final String message, int timeInMilliSeconds, final Context context) { Runnable runnable = new Runnable() { @Override public void run() { Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); } }; Handler handler = new Handler(); handler.postDelayed(runnable, timeInMilliSeconds); } Usage: showToast(“1s, 1000, this); showToast(“5s, 5000, this); showToast(“10s, 10000, this); 0 solved How to delay seconds in android?

[Solved] how to call a method after a delay? [closed]

you can try: having a bool property called completed. perform selector after delay //(some selector showBusy, some delay) completed = NO; dispatch_queue_t myqueue = dispatch_queue_create(“queue”, NULL); dispatch_async(myqueue, ^{ //your long time operation (must not do any UI changes here) dispatch_async(dispatch_get_main_queue(), ^{ //UI here completed = YES; hideBusy; }); }); -(void)showBusy{ if(!completed)….. } 2 solved how … Read more