2 questions

Discussion in 'Programming & Scripting' started by Miles 7S, Jun 19, 2009 with 3 replies and 204 views.

  1. Miles 7S

    Miles 7S Enthusiast

    Messages:
    404
    Ratings:
    89
    Question 1
    How can i save text that is in a textbox on visual basic?
    so next time i open the program the text i last had is there. also if i had a 2 textbox with a number and a button, how would i make it so i type in a number and it subtracts it from that textbox when i press the button.




    Question 2
    How can i make it so i have a countdown from 20 minutes and after that 20 minutes; text in a textbox changes.


    Any Ideas?
    hopefully its clear enough...
     
  2. xKNiiVES

    xKNiiVES Enthusiast

    Messages:
    594
    Ratings:
    86
    yes, i am trying to figure this out to. i might aswell use Google.com.
     
  3. OP
    Miles 7S

    Miles 7S Enthusiast

    Messages:
    404
    Ratings:
    89

    OMG! what is this that you call google :tongue:

    lol jk
     
  4. Ibdc

    Ibdc Retired Retired

    Messages:
    5,100
    Ratings:
    2,072
    http://www.se7ensins.com/forums/visual-basic/109889-working-registry-visual-basic.html

    As for the subtraction
    Code:
    If IsNumeric(Textbox1.Text) Then
    Dim number1 As Integer = textbox1.text
    Dim number2 As Integer = textbox2.text
    Dim result As Integer = number1 - number2
    End If
    Question 2
    Add a timer to your form, enable it and set its interval to 1000
    In your general declarations put
    Code:
    Dim x as integer = 1200
    1200 since there's 1200 seconds in 20 minutes.
    Code:
     x = x - 1
    If x = 0 Then
    Textbox1.Text = "whatever you want it to say after 20 min"
    End If
     
    • Like Like x 1

Share This Page