Hi :)
Here is a function to center a window under another one.
Use as you want :)
Here is a function to center a window under another one.
Use as you want :)
Usage : Center_window(AddnewpasswordWin,KmpWin) ' ----------------------------------------- ' Function to center a window under another ' ----------------------------------------- Function Center_window(Source:TGadget,Parent:TGadget) Local w:Int=GadgetWidth(Parent) Local h:Int=GadgetHeight(Parent) Local x:Int=(GadgetX(Parent)+w/2)-(GadgetWidth(Source)/2) Local y:Int=(GadgetY(Parent)+h/2)-(GadgetHeight(Source)/2) SetGadgetShape(Source,x,y,GadgetWidth(Source),GadgetHeight(Source)) End Function