![]() |
|
[.NET] [ Tut ] How To Create A Live News Feed In Your App! - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [ Tut ] How To Create A Live News Feed In Your App! (/showthread.php?tid=4538266) |
[ Tut ] How To Create A Live News Feed In Your App! - Teruz14 - Nov 15, 2014 Hello Hackforums β Today i'll be showing you how to create a live news feed in your program ! Steps : 1. Download DropBox. - https://www.dropbox.com/downloading Picture Below : [img]http://s17.postimg.org/gy50fmmkv/Dropbox.jpg[/img] 2. Install Dropbox I'm sure you all know how to do that. 3. Register For Dropbox ( Unless you already have an account. ) - http://s1.postimg.org/qbsxp5e1r/Drap_Bax.jpg Once you installed it Run it [img]http://s27.postimg.org/scwxo3a27/minidrap.jpg[/img] Click : DropBox Folder Then ... Create a Folder Called anything or just a text document. .. http://s18.postimg.org/x85nf2fhx/uodate.jpg Once In the folder make a text document. Name it anything you want! http://s23.postimg.org/95up973vv/newzz.jpg Double Click Your Text Then write your news/blog Or w/e You'd like the news box to show :) .. http://s7.postimg.org/eopzl7iqz/fsdfsdf.jpg Then Click Save. Once done Right click on your text document and select " Share DropBox link " Then it should be on your clipboard. Now .. Go in VB Requirements : Your app RichTextBox/Label/TextBar, ect.. Now Double click on your form. It should look like this. .. http://s30.postimg.org/jeph3krq9/Form11.jpg That's the coding as well. Code : Dim Web As New WebClient Dim Newz As String = Web.DownloadString ("URL HERE") RichTextBox1.Text = Newz You can change Web as anything as you want Same for Newz. Example Dim Hackforums As New WebClient Dim Ducks As String = Web.DownloadString ("URL HERE") And you don't have to have richtextbox i only put it their since i'll be using it. You may change it if you got a label too like this. Label1.Text = Newz Hope you enjoyed my very firs tutorial π If you got confused somewhere be sure to PM me or leave a comment i'll reply asap :) EDIT : Project Download - https://www.dropbox.com/sh/syu4p2yjx1tly3o/AAA4uuYyHHGv8jFTQ45tLdQea?dl=1 * - Hawk HF - Nov 15, 2014 This is extremely easy to do. All we're really doing is using a webclient to grab a string. Here are a few ideas to improve your application: - Include an image - Give the user a notification when a new story is posted - Allow account creation - Accounts can like or comment on news stories * - DownloaderO - Nov 15, 2014 thank you for that ;) Helped me! Can you create an Example Projekt ;) * - Teruz14 - Nov 15, 2014 (Nov 15, 2014 07:10 AM)Hawk HF Wrote: This is extremely easy to do.Great idea , I'll be adding that right now :P (Nov 15, 2014 07:50 AM)DownloaderO Wrote: thank you for that ;)Sure, I'll pm you the project in a sec.π€ * - AEDEAD - Nov 15, 2014 Top lels, I been doing exactly this since 2013 for "auto updates". Good thread. * - Teruz14 - Nov 15, 2014 (Nov 15, 2014 07:50 AM)DownloaderO Wrote: thank you for that ;) As you requested π€ - http://bitly.com/1xrq3CP Enjoy :) If you need any help on anything lemme know π€ * - AEDEAD - Nov 15, 2014 (Nov 15, 2014 07:50 AM)DownloaderO Wrote: thank you for that ;) Code Imports System.NetThe Link I used is up, it contains 985 i'm actually using it for something else but i dont see the harm in sharing it here for an example. * - Teruz14 - Nov 15, 2014 (Nov 15, 2014 10:52 AM)AEDEAD Wrote:Or you could just use the normal short and easy code. Dim Web As New WebClient Dim Newz As String = Web.DownloadString ("URL HERE") RichTextBox1.Text = Newz π€ * - #Kat - Nov 15, 2014 rather than using Web.Download , alternatively using get as above to get news posting from php setup on free/paid host flows better having an end user downloading text file forcefully just seems unethical but good share this would maybe be useful if you were going for some sort of application update ( With consent of the user of course) * - Xghost7 - Nov 15, 2014 (Nov 15, 2014 02:19 PM)ΰΉΫ£ΫLamb Wrote: rather than using Web.Download , alternatively using get as above to get news posting from php setup on free/paid host flows better having an end user downloading text file forcefully just seems unethical but good share this would maybe be useful if you were going for some sort of application update ( With consent of the user of course) I was wondering tho how would you grab the news from the php via vb.net application? only method i know is echo it at the website and then use web.downloadstring. * - #Kat - Nov 16, 2014 Code dim site as webclient = new webclient()also using regex if you have multiple lines you can get the most recent by timestamp or whatever your mind deems necessary P.S sql entries can also be used for news |