I am trying to convert a VB6 file into FnxBasic, eventually allowing me to view PDF files in a forms "window".
I am having trouble with "GetClientRect" Of "User32"
Here is my code so far:
Declare FormRectangle As "GetClientRect" Of "User32"
hWnd As Long
rc As Rectangle
End Declare
With FormRectangle
hWnd = MainForm.hWnd
` rc
` Execute
End with
Does anybody know if I can actually use "GetClientRect" Of "User32" in FnxBasic, and if I can does anybody know the correct code to create a window on a form using it
Many thanks in advance!!!!
Regards
Darren
"GetClientRect" Of "User32"
"GetClientRect" Of "User32"
Can you do something with this?
``getrect example
record RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End record
Declare FormRectangle As "GetClientRect" Of "User32"
hWnd As Long
rc As Rect
End Declare
object exampleform as form
object b as button
left=200
caption="get values"
onclick=getrect
end object
object output as richedit
scrollbars=ssboth
end object
showmodal
end object
sub getrect
dim x as string,y as string
dim x1 as string,y1 as string
formrectangle.hwnd=exampleform.hwnd
formrectangle.execute
x=str$(formrectangle.rc.left)
y=str$(formrectangle.rc.top)
x1=str$(formrectangle.rc.right)
y1=str$(formrectangle.rc.bottom)
output.addtext("==new values==")
output.addtext("left :"+x)
output.addtext("top :"+y)
output.addtext("right :"+x1)
output.addtext("bottom :"+y1)
end sub
``getrect example
record RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End record
Declare FormRectangle As "GetClientRect" Of "User32"
hWnd As Long
rc As Rect
End Declare
object exampleform as form
object b as button
left=200
caption="get values"
onclick=getrect
end object
object output as richedit
scrollbars=ssboth
end object
showmodal
end object
sub getrect
dim x as string,y as string
dim x1 as string,y1 as string
formrectangle.hwnd=exampleform.hwnd
formrectangle.execute
x=str$(formrectangle.rc.left)
y=str$(formrectangle.rc.top)
x1=str$(formrectangle.rc.right)
y1=str$(formrectangle.rc.bottom)
output.addtext("==new values==")
output.addtext("left :"+x)
output.addtext("top :"+y)
output.addtext("right :"+x1)
output.addtext("bottom :"+y1)
end sub