Generate Keys VB.NET
2013-10-29, 06:24 PM,
#1
Hello, this is my code:
Code:
If ProgressBar1.Value < 100 Then
            ProgressBar1.Value = ProgressBar1.Value + 1
            Label3.Text = ProgressBar1.Value & (" %")
        Else
            Timer1.Stop()
            TextBox1.Text = GenerateKey()
        End If
    End Sub
Now my problem, im trying to show only one generated key, but my program generates unlimited keys and never stop. Can anybody help me?
Thanks in advance!
Reply
2013-10-29, 06:37 PM,
#2
Never stop? Even after the progressbar is at 100?
Reply
2013-10-29, 06:41 PM,
#3
it is wierd, timer should stop when reaching 100. maybe there is something in the rest of the code that makes the timer run again?

[Image: 8vu5.png]
"You don't get another chance, Life is not a nintedo game" -
-Eminem-

Still Paying For Google +1's?
Why Not Delivering Them Yourself?
Start Now!


Reply
2013-10-29, 07:53 PM,
#4
(2013-10-29, 06:24 PM)n00b Wrote: Hello, this is my code:
Code:
If ProgressBar1.Value < 100 Then
            ProgressBar1.Value = ProgressBar1.Value + 1
            Label3.Text = ProgressBar1.Value & (" %")
        Else
            Timer1.Stop()
            TextBox1.Text = GenerateKey()
        End If
    End Sub
Now my problem, im trying to show only one generated key, but my program generates unlimited keys and never stop. Can anybody help me?
Thanks in advance!
No problem. Contact me on skype : Ganjaboylt

Please quote me if you are replying to me so I would get a notification.
Reply
2013-10-30, 04:40 AM,
#5
You haven't done anything here. As I see keys are not generated on Timer but on GenerateKey() Function.

I guess that you're showing your code on Textbox1, so if you're doing this - you shoud share also GenerateKey() (you are getting key from there and even if Progress bar is 100% another key will be generated ).

Edit: If you want to get key after progress bar is 100% do this:
Code:
If ProgressBar1.Value = 100 Then
TextBox1.Text = GenerateKey()
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Aeonsofts VB.NET Theme Manager v2.1 lanzye 32 10,319 2017-10-28, 04:51 PM
Last Post: waiphyoe
  [GET] How To Generate Web Design Assets In Photoshop With Just One Click cindy2145 0 464 2017-04-30, 03:06 AM
Last Post: cindy2145
  .Net Expert Required insomniac 6 1,608 2016-09-08, 08:38 PM
Last Post: styx
  VB NET FORM APPLICATION QwertySon 12 1,824 2016-04-27, 08:00 PM
Last Post: Harrington
  HttpWebRequest POST Method Visual Basic . net QwertySon 5 1,492 2016-03-17, 02:59 PM
Last Post: QwertySon





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top