Results 1 to 6 of 6

Thread: form resize [resolved]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Location
    southwest pennsylvania
    Posts
    65

    form resize [resolved]

    i have a picbox that i use to draw a graph. dock is set to fill so it will consume the entire graph. but, the graph is scaled and becomes stretched when the user resizes one border of the form. i want the form to always be a square shape, so the height and width are always the same.

    i use this code right now, but it gives me a nice little infinite loop:
    VB Code:
    1. Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
    2.         If Me.Width > Me.Height Then
    3.             Me.Height = Me.Width
    4.         Else
    5.             Me.Width = Me.Height
    6.         End If
    7.     End Sub

    any suggestions?
    Last edited by joeframbach; May 20th, 2003 at 06:57 PM.
    if you choose not to decide you still have made a choice!

    RUSH rocks!

Posting Permissions

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



Click Here to Expand Forum to Full Width