Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake an expandable dialog with More and Less buttons
Keywordsdialog, more, less, expandable, detail
CategoriesSoftware Engineering, Controls
 
When the user clicks the More or Less button, resize the form accordingly. For convenience, use Line controls to mark the dialog's small and large sizes.
 
Private Sub cmdMoreOrLess_Click()
    If cmdMoreOrLess.Caption = "More" Then
        Height = Line2.Y1 + Height - ScaleHeight
        cmdMoreOrLess.Caption = "Less"
    Else
        Height = Line1.Y1 + Height - ScaleHeight
        cmdMoreOrLess.Caption = "More"
    End If
End Sub

Private Sub Form_Load()
    cmdMoreOrLess.Caption = "Less"
    cmdMoreOrLess_Click
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated