Results 1 to 3 of 3

Thread: how to?... get size of form in runtime

  1. #1

    Thread Starter
    Junior Member Novice's Avatar
    Join Date
    Nov 2003
    Location
    Stuttgart
    Posts
    19

    Question how to?... get size of form in runtime

    Hello again,

    Is there a way to get the Size(Height; Width) of a form, so I can give it to a RichTextBox on the same form in runtime?

    [The RichTextBox then should resize the entered text according to the current size of the form. But that's another problem.]

    I just need a suggestion on my first question.

    Thanks
    I know that I know nothing, therefore I know something.

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    look at the size property, eg:
    VB Code:
    1. [color=blue]Dim[/color] sz As Size = [color=blue]MyBase[/color].Size
    2.         MessageBox.Show("i'm : " & sz.Width & " Wide and i'm : " & sz.Height & " High")
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Junior Member Novice's Avatar
    Join Date
    Nov 2003
    Location
    Stuttgart
    Posts
    19
    That'll do, thank you

    but there's another thing I want to know:

    How do I copy the values of sz.width and sz.height to the clipboard?

    It's just because I want to give the size-values to a RichTextBox, so that the text in this box can rezise to the current size of the form.

    Thanks
    I know that I know nothing, therefore I know something.

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