Thread: Little Help

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired

    Little Help

    Hi, i'm a begginer, anyways, i need some help!

    What i need to do is to set a timer interval to the incoming text from a textbox.
    Does someone know how to do that?

    I'd appreciate your help,
    Thanks,
    Manuel

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Learn the basics on how to use properties properly.

    Timer1.Interval = Val(Textbox1.text)



  3. The Following User Says Thank You to Blubb1337 For This Useful Post:

    omanel (06-27-2010)

  4. #3
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    I Will, thank you, but for this to work i've got to leave the timer interval value in the properties "window" empty, am I right?

  5. #4
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    No you don't. It will just overwrite your previously set value.



  6. #5
    Golden.'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    156
    Reputation
    10
    Thanks
    3
    My Mood
    Amazed
    put the timer value to anything you like

    then double click the tetbox
    Timer1.interval = (textbox1.text)

    Then double click timer
    Sendkeys.send (textbox2.text)
    Sendkeys.send ("{Enter}")

  7. #6
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by Golden. View Post
    put the timer value to anything you like

    then double click the tetbox
    Timer1.interval = (textbox1.text)

    Then double click timer
    Sendkeys.send (textbox2.text)
    Sendkeys.send ("{Enter}")
    This may encounter errors if you have a space or any letter in the textbox. Therefore Val(Textbox1.Text) is better I guess.



  8. #7
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Quote Originally Posted by Blubb1337 View Post

    Timer1.Interval = Val(Textbox1.text)
    I dont know why, it only worked when i deleted the "Val".
    I'm guessing a textbox isn't the better option, i'll try a checkedlistbox with fixed values in order to keep the program from crashing and because it seems simpler and safer to the type of application i'm working on, thanks anyway!
    Last edited by omanel; 06-27-2010 at 05:17 AM.

  9. #8
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Try using a numericupdown.



  10. The Following User Says Thank You to Blubb1337 For This Useful Post:

    omanel (06-27-2010)

  11. #9
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Quote Originally Posted by Blubb1337 View Post
    Try using a numericupdown.
    Ok, i'll try to use one.
    Hope it works, btw, what code should i use to set the timer interval to the selected numericupdown value/number?

  12. #10
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Quote Originally Posted by omanel View Post
    Ok, i'll try to use one.
    Hope it works, btw, what code should i use to set the timer interval to the selected numericupdown value/number?
    Timer1.Interval = NumericUpDown1.Value

  13. The Following User Says Thank You to MugNuf For This Useful Post:

    omanel (06-27-2010)

  14. #11
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Quote Originally Posted by MugNuf View Post
    Timer1.Interval = NumericUpDown1.Value
    I've just remembered it while writting the code, thanks anyway

    My application is almost ready, now all i've left to do is to get it to minimize in system tray and i guess it's easy, problem is solved!

    Thanks to everyone who helped me once again!

  15. #12
    MJLover's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Neverland
    Posts
    759
    Reputation
    33
    Thanks
    110
    My Mood
    Cheerful
    If you need to use textbox or anything loosely bound, then you can check for errors:

    Code:
    If Microsoft.VisualBasic.IsNumeric(Textbox1.Text) Then
    Timer1.Interval = Cint(Textbox1.Text.Trim)
    End If
    Cint converts any object to Integer.
    IsNumeric function checks whether the input contains only integers.

    Hope this helps !!

  16. #13
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Quote Originally Posted by omanel View Post
    I've just remembered it while writting the code, thanks anyway

    My application is almost ready, now all i've left to do is to get it to minimize in system tray and i guess it's easy, problem is solved!

    Thanks to everyone who helped me once again!
    Minimize to tray

    Form Load (Set Icon)
    Code:

    Code:
     Me.NotifyIcon1.Icon = Me.Icon

    Form Load, Set it true

    Code:

    Code:
    Me.NotifyIcon1.Visible = true

    VB Syntax for Minimizing to System Tray

    Code:

    Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            NotifyIcon1.Visible = False
        End Sub
     
        Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
            Try
                Me.Show()
                Me.WindowState = FormWindowState.Normal
                NotifyIcon1.Visible = False
     
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub
     
        Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
            Try
                If Me.WindowState = FormWindowState.Minimized Then
                    Me.WindowState = FormWindowState.Minimized
                    NotifyIcon1.Visible = True
                    Me.Hide()
                End If
     
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub

    Show Balloon Tip
    (use on minimize, but can be adjusted for anything

    Code:
    Code:
    notifyIcon1.ShowBalloonTip(3000, "Your App", ("Application has not closed" & DirectCast((1
    Credits: VB Snippets Vault You can always check stickies and ask for help if your stuck.

  17. #14
    omanel's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Portugal
    Posts
    93
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Quote Originally Posted by MJLover View Post
    If you need to use textbox or anything loosely bound, then you can check for errors:

    Code:
    If Microsoft.VisualBasic.IsNumeric(Textbox1.Text) Then
    Timer1.Interval = Cint(Textbox1.Text.Trim)
    End If
    Cint converts any object to Integer.
    IsNumeric function checks whether the input contains only integers.

    Hope this helps !!
    not going to use it but thanks, i'll save the code for future programs!

  18. #15
    MJLover's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Neverland
    Posts
    759
    Reputation
    33
    Thanks
    110
    My Mood
    Cheerful
    Quote Originally Posted by omanel View Post
    not going to use it but thanks, i'll save the code for future programs!
    Yup, I know...I posted it so you can use it in future with out posting a new thread.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help Request] Little Help with KAVA
    By 24s25 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 9
    Last Post: 07-11-2011, 01:16 PM
  2. [Help Request] A little help..
    By AlphaTeam in forum CrossFire Help
    Replies: 2
    Last Post: 07-08-2011, 09:16 AM
  3. a little help
    By chaos morbid in forum General
    Replies: 3
    Last Post: 05-03-2007, 03:10 PM
  4. [B]Little help please?[/B]
    By oumeen in forum WarRock - International Hacks
    Replies: 6
    Last Post: 05-02-2007, 01:22 PM
  5. a little help.
    By -[standoff]- in forum General Game Hacking
    Replies: 1
    Last Post: 12-16-2006, 09:11 PM