Do you want to scroll the Form with C or B4P?
Hello sitajony,
for scrolling with B4P I have extracted some subs from my actual project for Desktop. They need WindowMessage (from Andrew Graham) and Door or DoorEx (From Erel Uziel and Andrew Graham). It's not an executable program, it's only an extract. I hope it's helpful for you.
Sub Globals
WM_HSCROLL = 276
WM_VSCROLL = 277
frm3obj.New1(False)
hscrollobj.New1(False)
vscrollobj.New1(False)
End Sub
Sub FormEx3_Start
frm3obj.FromControl(FormEx3.ControlRef)
frm3obj.SetProperty("AutoScroll", True)
hscrollobj.value = frm3obj.GetProperty("HorizontalScroll") ' returns an HScrollProperties type
hscrollobj.SetProperty("LargeChange", 100)
vscrollobj.value = frm3obj.GetProperty("VerticalScroll") ' returns an VScrollProperties type
vscrollobj.SetProperty("LargeChange", 100)
WinMSg.New1(FormEx3.ControlRef)
WinMsg.Trap(WM_HSCROLL)
WinMsg.Trap(WM_VSCROLL)
WinMsg.Start
End Sub
Sub WinMsg_TrapEvent 'Gets the event
msg1 = WinMsg.wMsg
Select msg1
Case WM_HSCROLL
ScrX = hscrollobj.GetProperty("Value")
IScrolX.Text = ScrX
Case WM_VSCROLL
ScrY = vscrollobj.GetProperty("Value")
IScrolY.Text = ScrY
End Select
End Sub
Sub SetAutoscroll(VX, VY) 'Sets the Autoscrollposition Switch Autoscroll off, set the values and switch Autoscroll on to reset the window
frm3obj.SetProperty("AutoScroll", False)
hscrollobj.SetProperty("Value", VX) 'SetX(VX)
vscrollobj.SetProperty("Value", VY) 'SetY(VY)
frm3obj.SetProperty("AutoScroll", True)
ScrY = vscrollobj.GetProperty("Value")
IScrolY.Text = "y:" & ScrY
ScrX = hscrollobj.GetProperty("Value")
IScrolX.Text = "x:" & ScrX
End Sub
Sub FormEx3_Close
WinMsg.Stop
End Sub
best regards
berndgoedecke