ComponentOne VSView 8.0
Step 6: Final touches

Our sample project is almost done. We will finish it with a little more code to make the vp control resize when the form is resized. Here is the code:

Example Title
Copy Code
Private Sub Form_Resize()

 

  On Error Resume Next

  With vp

    .Move .Left, .Top,

    ScaleWidth - 2 * .Left, _

    ScaleHeight - .Top - .Left

  End With

 

End Sub

This is the resizing code. Note the error handling to prevent errors in case the user makes the form extremely small and some of the calculated dimensions become negative.

That's it. The VSPrinterCalendar application is done. Here's a snapshot of the final application in action:

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback