21-08-2006, 03:46 PM
Okay, this is a simple tut. Very simple actually. First off..
Open up your client source. Add the component..
Now, place that component (INet) on frmMainMenu..
Name it..
Now, if you wish to use colors, images, and such in your news box, add a rich text box (I won't go into explanation for adding images/color), otherwise, add a normal text box.
Name it..
Add this sub, if you don't already have it, if you do, just add the code inside this sub..
I left my test url in there, just replace it with the url you will use.
And that's it. It will now pull the text from the text file in the url.
Enjoy!
Later, I will write one to pull the news from the game's server, which also, isn't hard.
Hope this helps someone.
Open up your client source. Add the component..
Code:
Microsoft Internet Transfer Control 6.0
Now, place that component (INet) on frmMainMenu..
Name it..
Code:
InetNews
Now, if you wish to use colors, images, and such in your news box, add a rich text box (I won't go into explanation for adding images/color), otherwise, add a normal text box.
Name it..
Code:
txtNews
Add this sub, if you don't already have it, if you do, just add the code inside this sub..
Code:
Private Sub Form_Load()
Dim TmpStr As String
TmpStr = InetNews.OpenURL("http://tpo.phpnet.us/News.txt")
txtNews.Text = TmpStr
End Sub
I left my test url in there, just replace it with the url you will use.
And that's it. It will now pull the text from the text file in the url.
Enjoy!
Later, I will write one to pull the news from the game's server, which also, isn't hard.
Hope this helps someone.