dcsimg
Results 1 to 3 of 3

Thread: [RESOLVED] Resize windows form based on option

  1. #1

    Thread Starter
    Addicted Member cellus205's Avatar
    Join Date
    Dec 2010
    Location
    San Antonio, TX
    Posts
    237

    Resolved [RESOLVED] Resize windows form based on option

    Hey guys, how could I resize a window based on option? Its a pretty simple dialog box that I only want to display additional controls if an option is selected, and resize the window.

    Any suggestions?

    Thanks

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Resize windows form based on option

    The window has a Size property which you can modify. For example, if I have a menu item, that when checked makes the form larger, I can do it like this:

    Code:
        Private Sub AdvancedToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdvancedToolStripMenuItem.Click
            AdvancedToolStripMenuItem.Checked = Not AdvancedToolStripMenuItem.Checked
            If AdvancedToolStripMenuItem.Checked Then
                Me.Size = Size.Add(Me.Size, New Size(200, 0))
            Else
                Me.Size = Size.Subtract(Me.Size, New Size(200, 0))
            End If
        End Sub

  3. #3

    Thread Starter
    Addicted Member cellus205's Avatar
    Join Date
    Dec 2010
    Location
    San Antonio, TX
    Posts
    237

    Re: Resize windows form based on option

    Thanks a lot, I think that will do it for me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width