whosyodaddy Posted August 2, 2003 Posted August 2, 2003 ok, I am making a simple program, which is basically has new info everyday. What I am saying is, everyday when you run it, different stuff will appear. Sort of like a news-tracker. What I want is the user to open it and, lets say, a certain image appears (although the image is not built in the program, so It will have to be updated everyday automatically) and i choose the image. how would i go about doing this? It is quite a large question. I've read some books, and still, have no clue how to do this. Thanks. :D Quote
Moderators Robby Posted August 2, 2003 Moderators Posted August 2, 2003 Where are you getting the info or images from? If you use a database for the info, you can easily randomize which item to display. Quote Visit...Bassic Software
wyrd Posted August 2, 2003 Posted August 2, 2003 Is this info. going to be transmitted over to the web? I assume it is since you mentioned something about a news tracker (or did you mean news ticker?). Try using a database + web services. Quote Gamer extraordinaire. Programmer wannabe.
whosyodaddy Posted August 3, 2003 Author Posted August 3, 2003 (edited) i want it so that i can choose what image they see and what text they see daily. whenever they run the program, yea, transmitted over web... Edited August 3, 2003 by whosyodaddy Quote
Moderators Robby Posted August 3, 2003 Moderators Posted August 3, 2003 Once again, where are the data and images coming from? Quote Visit...Bassic Software
whosyodaddy Posted August 4, 2003 Author Posted August 4, 2003 my website. or my computer. whatever one is easiest. Quote
Leaders dynamic_sysop Posted August 4, 2003 Leaders Posted August 4, 2003 from the net , here's an example of putting >> :D << in to a picturebox. you can specify your url's as you want in there. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim stream As New Net.WebClient() Dim sr As IO.Stream = stream.OpenRead("http://www.xtremedotnettalk.com/images/smilies/biggrin.gif") PictureBox1.Image = Image.FromStream(sr) sr.Close() End Sub Quote
whosyodaddy Posted August 4, 2003 Author Posted August 4, 2003 ok, well, how do i change the image whenever i want when other people have the program too? Quote
*Experts* mutant Posted August 4, 2003 *Experts* Posted August 4, 2003 If you want to change the URL to the image you could make a simple web service to retrieve the URL or path to the file, or have the program setup to download a small text file which will contain the URL to the image. Quote
Diablicolic Posted August 5, 2003 Posted August 5, 2003 Awesome, but how would you check if the person has an open internet connection? Would you use Try and Catch? And then if there is an error, just close the program? Quote "Reality is fake, Dreams are for real"
*Experts* mutant Posted August 5, 2003 *Experts* Posted August 5, 2003 (edited) That would the easiest way, set up a Try...Catch block around the line that download the file and catch the WebException exception. Or, use InternetGetConnectedState API. Edited August 5, 2003 by mutant Quote
whosyodaddy Posted August 5, 2003 Author Posted August 5, 2003 thanks for the info! aLthough i dont know how to create a web service nor try and catch... Quote
*Experts* mutant Posted August 5, 2003 *Experts* Posted August 5, 2003 If you dont want to create a web service then go with the file approach. Try...Catch is an error handling structure. You set it up like this: Try 'code that can cause errors here Catch ex As WebException 'or any other exception you might want 'handle the error or simple do nothing End Try Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.