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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrollable Form / Control instead of Reporting Tools

Status
Not open for further replies.

carlosweiss

Programmer
Sep 15, 2005
15
AR
Hi,

Does anybody know of a way to make a MDI Child form scrollable? That is, putting some text in a position that exceeds the dimension of the form but still be able to see it if I move with the scroll bars.

I just want to put some arranged text into the canvas, to display some results. We are in an early stage in the project, and we still don't want to set about to work with reporting. The results exceed the size of the form. Another possibility could be a scrollabe control (like a text box) that allows to put text in a specified position.

Thanks!
 
Option Explicit

Private Sub Command1_Click()
CurrentX = 400
CurrentY = 400

Print "Hello"
End Sub

Private Sub Form_Load()
Me.BorderStyle = 0
Me.Top = 0
Me.Left = 0
Me.Width = MDIForm1.Width * 2
Me.Height = MDIForm1.Height * 2
Me.AutoRedraw = True
Me.ScaleMode = vbPixels
End Sub
 
Oops - that's cryptic. That code needs to go in an MDI child form ...
 
On your MDI Child draw a picture box. This needs to be resized to however big you want it. Place horiz and vert scrollbar controls on the form.

Dump some controls in your picturebox that are positioned inside the pb but outside the form original size...

Change the position of the picturebox.left when you move the horizontal scrollbar and the top when you move the vert.

Should work fine!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top