Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No title bar on 'regular' forms

Status
Not open for further replies.

TonyMcGuire

Programmer
Aug 17, 2004
692
US
We can simply uncheck 'title bar' for dialog forms. But how about 'normal' forms in Paradox?

A script that does this, and resizes the form to account for loss of the form's Title Bar.

Code:
Uses USER32
  GetDesktopWindow() CLONG
  LockWindowUpdate(windowHandle CLONG) CLONG
  SetWindowLong(hwnd cLong,nIndex cLong,dwNewLong cLong)cLong [stdcall "SetWindowLongA"]
  GetWindowLong(hwnd clong,nIndex clong)clong [stdcall "GetWindowLongA"]
enduses
method run(var eventInfo Event)
Var
f           form
res         longint
x,y,w,h     longint
endvar

LockWindowUpdate(GetDesktopWindow())
f.open("myTest.fsl",winstyledefault)

f.getposition(x,y,w,h)

res = GetWindowLong(f.windowhandle(),-16)

res = SetWindowLong(f.windowhandle(),-16,res-fromhex("0xC00000"))
f.setposition(x,y,w-50,h-500)

lockWindowUpdate(0)
f.wait()
try
  f.close()
onFail
  errorclear()
endTry
endMethod

Tony McGuire
"It's not about having enough time. It's about priorities.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top