[VB.NET] Help

Status
Not open for further replies.

123max

Member
Original poster
member
Joined
Jul 12, 2010
Posts
1,454
Reaction score
182
Points
66
hey guys so i want to make a message box where it says like " A new update has been released press Ok to download it or press cancel if you dont' want"

On pressing ok he is sent to a webpage were the download is available (yeah i am adding survey to it). and on cancel the program is resumable

please help
 

PhriXion

Veteran
veteran
senior
member
Joined
Jul 5, 2009
Posts
4,492
Reaction score
3,405
Points
217
Age
32
Location
DJ JIGGLER
Website
www.djjiggler.com

123max

Member
Original poster
member
Joined
Jul 12, 2010
Posts
1,454
Reaction score
182
Points
66

Ace12

Senior
senior
Joined
May 2, 2011
Posts
1,013
Reaction score
369
Points
91
Location
Toronto
So when there is a new update available you want the program to popup a message saying "A new update is available press ok to download it" once they hit ok it takes the user to the survey page?? I'm I correct?
 

PhriXion

Veteran
veteran
senior
member
Joined
Jul 5, 2009
Posts
4,492
Reaction score
3,405
Points
217
Age
32
Location
DJ JIGGLER
Website
www.djjiggler.com
So when there is a new update available you want the program to popup a message saying "A new update is available press ok to download it" once they hit ok it takes the user to the survey page?? I'm I correct?

I was lost too, but wouldn't my example work the same way if he just used his link to his survey?
 

Zeppy

Member
member
Joined
Jul 29, 2011
Posts
85
Reaction score
23
Points
5
Age
27
Location
The Internet
Hope this helps:

Code:
Msgbox1.Show("Your Message here")
 

123max

Member
Original poster
member
Joined
Jul 12, 2010
Posts
1,454
Reaction score
182
Points
66
The example i tried but i can't implement it (Noob in VB) can sm1 else help?
ace12 will help tomm but i want it today
Quote:
123max
so i have this keygen that generates codes
but as soon as the program opens after a short delay like 10secs i want a dialog box to popup were it says a new update is available (normal msgbox i know) but when you press OK it opens up the update webpage (a survey page) . can you teach me how to do that?
 

Zeppy

Member
member
Joined
Jul 29, 2011
Posts
85
Reaction score
23
Points
5
Age
27
Location
The Internet
The example i tried but i can't implement it (Noob in VB) can sm1 else help?
ace12 will help tomm but i want it today
Quote:
123max
so i have this keygen that generates codes
but as soon as the program opens after a short delay like 10secs i want a dialog box to popup were it says a new update is available (normal msgbox i know) but when you press OK it opens up the update webpage (a survey page) . can you teach me how to do that?
Hey, I dont know how much itll help, but I just posted a tutorial on the basics, check it out: http://thebotnet.com/programming/72697-programming-with-visual-basic-down-to/

Im not done yet, Im going through the stages. Advanced is still to come.
 

123max

Member
Original poster
member
Joined
Jul 12, 2010
Posts
1,454
Reaction score
182
Points
66

Zeppy

Member
member
Joined
Jul 29, 2011
Posts
85
Reaction score
23
Points
5
Age
27
Location
The Internet
lol i know those basics + only msgbox dosen't work. must work like when u press ok on the message box it opens a link to a website

K this might be a bit, but I know a way how to do it.

Add another form and put a webbrowser in it.

Now when it says ok on that messagebox. Go to the same coding as that. Insert this code into it:

Code:
FormName.Show()
FormName.Webbrowser1.Navigate("URL HERE")

Hope this helped you out :)
 

123max

Member
Original poster
member
Joined
Jul 12, 2010
Posts
1,454
Reaction score
182
Points
66
Ok so now i have almost finished doing it but i still have a problem how
Code:
 MsgBox("Message", MsgBoxStyle.OkCancel)
        If vbOK Then System.Diagnostics.Process.Start("http://www.website.com")
        If vbNo Then

Do i load the upper code after X seconds? I don't want to add the thread sleep since the user must be able to access the keygen.
 

Ace12

Senior
senior
Joined
May 2, 2011
Posts
1,013
Reaction score
369
Points
91
Location
Toronto
Yah, just add a timer - make interval about 10 seconds or however much you want.

Windows Form Code:

Timer1.Start()


Timer1 Code:

if Timer1.Interval = 10000 Then

MsgBox("Message", MsgBoxStyle.OkCancel) If vbOK Then System.Diagnostics.Process.Start("http://www.website.com") If vbNo Then

End if
Timer1.Stop()
 

123max

Member
Original poster
member
Joined
Jul 12, 2010
Posts
1,454
Reaction score
182
Points
66
Yah, just add a timer - make interval about 10 seconds or however much you want.

Windows Form Code:

Timer1.Start()


Timer1 Code:

if Timer1.Interval = 10000 Then

MsgBox("Message", MsgBoxStyle.OkCancel) If vbOK Then System.Diagnostics.Process.Start("http://www.website.com") If vbNo Then

End if
Timer1.Stop()
should i write the code in the timer or in the form load? and i added a timer from the compenents toolbox is that correct?
+ VB 2010 marked errors on your code so i fixed thim but it seems to appear without any delay:

Code:
Timer1.Start()
        If Timer1.Interval = 1000 Then MsgBox("Message", MsgBoxStyle.OkOnly)
        If vbOK Then System.Diagnostics.Process.Start("http://www.google.com")
        Timer1.Stop()
 

PhriXion

Veteran
veteran
senior
member
Joined
Jul 5, 2009
Posts
4,492
Reaction score
3,405
Points
217
Age
32
Location
DJ JIGGLER
Website
www.djjiggler.com
should i write the code in the timer or in the form load? and i added a timer from the compenents toolbox is that correct?
+ VB 2010 marked errors on your code so i fixed thim but it seems to appear without any delay:

Code:
Timer1.Start()
        If Timer1.Interval = 1000 Then MsgBox("Message", MsgBoxStyle.OkOnly)
        If vbOK Then System.Diagnostics.Process.Start("http://www.google.com")
        Timer1.Stop()

Yes, you would need to put it in the timer.

Here's how a real auto-updater would work:

Code:
Dim client as new webclient
Dim verson as string = client.downloadstring("http://yoursite.com/version.txt")
If version > 2 then
Msgbox("Update found!", msgbox.information, "Update")
System.net.downloadfile("http://yourfile.com/exe", application.startuppath & "\Updated.exe")
Else

Notice for your needs, you'll be pointing to your survey. Hope this helps you get started.
 
Status
Not open for further replies.