Public oForm oForm = Createobject('myForm') oForm.Show() Define Class myForm As Form oWaitWindow = .Null. AutoCenter = .T. Add Object cmdWait As CommandButton ; With Caption ="WaitWindow",Left = 5, Top = 5, AutoSize = .T. Procedure Init This.oWaitWindow=Createobject('myWaitWindow') Endproc Procedure WaitWindow Lparameters tcMessage This.oWaitWindow.SetText(m.tcMessage,This) Endproc Procedure cmdWait.Click Thisform.WaitWindow("Data is searched! Be patient!") * My long process ltStart = Datetime() Do While Datetime()<m.ltStart + 5 Enddo * Yet another wait state TEXT to thankyou noshow Done searching. Thank you for your patience. Foxpro is fast and I'll be checking if this might be faster. ENDTEXT Thisform.WaitWindow(m.thankyou) ltStart = Datetime() Do While Datetime()<m.ltStart + 5 Enddo Thisform.oWaitWindow.Hide() Endproc Enddefine Define Class myWaitWindow As Form AlwaysOnTop=.T. BackColor=0xE0FFFF BorderStyle=1 ShowWindow=1 TitleBar=0 Visible = .F. Add Object edtMessage As EditBox ; with BackStyle=0,BorderStyle=0,DisabledForeColor=0,; enabled=.F.,ScrollBars=0,SpecialEffect=0,IntegralHeight=.T. Procedure SetText Lparameters tcMessage,toForm,tnPos Local Array aMsgLines[1] Local lnLines,lnMax,ix tnPos = Iif(Empty(m.tnPos),0,m.tnPos) && default 0 autocenter,1-TL,2-TR,3-BL,4-BR lnLines = Alines(aMsgLines,m.tcMessage,.T.) lnMax = 0 For ix=1 To m.lnLines lnMax = Max(m.lnMax,This.TextWidth(aMsgLines[m.ix])) Endfor With This .LockScreen = .T. .edtMessage.Value = m.tcMessage Store m.lnLines*.TextHeight('X')+5 To .Height,.edtMessage.Height Store m.lnMax+Sysmetric(10)*2+5 To .Width, .edtMessage.Width If Type('toForm')='O' And !Isnull(toForm) Do Case Case m.tnPos=0 && center .Move(toForm.Left+(toForm.Width-.Width)/2,; toForm.Top+(toForm.Height-.Height)/2) Case m.tnPos=1 && TopLeft .Move(toForm.Left,; toForm.Top) Case m.tnPos=2 && TopRight .Move(toForm.Left+toForm.Width-.Width,; toForm.Top) Case m.tnPos=3 && BottomLeft .Move(toForm.Left,; toForm.Top+toForm.Height-.Height) Case m.tnPos=4 && BottomRight .Move(toForm.Left,; toForm.Top+toForm.Height-.Height) Endcase Endif .Show() .LockScreen = .F. Endwith Endproc EnddefineCetin