Results 1 to 2 of 2

Thread: forms

  1. #1

    Thread Starter
    Lively Member flog3941's Avatar
    Join Date
    Nov 2002
    Posts
    123

    forms

    I have two forms

    form1 has a textbox and a button
    when i click that button i show form2

    and in form2 i wan tto read whats in the textbox on form1
    and write an if statement based on whats in the text box

    ex..If textbox1.text ="1979" then
    blah blah blah
    Else if textbox1.text="1980" then
    blah blah blah
    Else
    Blah
    end if


    How do i do this?

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    change Form2's new constructor:
    Public sub New(byval txt as string)
    'OR
    Public sub New(byval txtBox as TextBox)
    'now you can read the stuff in the textbox....


    when the button is clicked:

    dim frm as new form2( textbox1.text)
    frm.show
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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