![]() |
|
[.NET] [TUT] VB.NET How To Make A Simple Global Message [TUT] [Explained] - 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] VB.NET How To Make A Simple Global Message [TUT] [Explained] (/showthread.php?tid=1393043) |
[TUT] VB.NET How To Make A Simple Global Message [TUT] [Explained] - Megan Foxxx - Jun 18, 2011 There are 2 ways you can display a custom global message when your application loads. I shall post the snippet's then explain what it does below PHP Code PHP Code PHP Code This tells VB that it is going to contact the internet PHP Code Puts Temp path as a string, inside APPdata PHP Code Checks if the file already exists, if it does it will delete it PHP Code Downloads the file, your txt file, to temppath (Application Data) as "globmsg.txt" PHP Code The part that reads the txt file, in this case "globmsg.txt" PHP Code If the file is empty it skips this part, if it contains text it will display it as a message box PHP Code And then deletes the file for next time PHP Code The catch happens if it cannot download or read the txt file, if that is the case this will display Here is the second method PHP Code PHP Code PHP Code This tells VB that it is going to contact the internet PHP Code Sets strin as anything and sets WebC as a WebClient PHP Code Downloads your TXT file as a string PHP Code If the TXT file contains "message" then it will carry on If the TXT file contains "message|Global message", it will split it after the "|" A message box will then appear with the message displaying what is after the "|" An example txt file to this would be Code message|Welcome to London Worm V2.1Hope You enjoyed this tutorial and i also hope it benefited you all Thank you Megan * - ShadowHelper - Jun 18, 2011 Why even save it to the computer? You can do something as simple as: Code Try* - Megan Foxxx - Jun 18, 2011 (Jun 18, 2011 09:57 AM)ShadowHelper Wrote: Why even save it to the computer? Its just a method of doing it Its easier to understand * - Conch - Jun 18, 2011 Nice, never knew what Google Global was. Is this like a news downloader? Thanks! * - Megan Foxxx - Jun 18, 2011 The links i put in arent real :P It could be used for it, I t just there to be shows as a global message on a form loading Giving news to someone about a product or something * - pr3fix - Jun 18, 2011 Why not just use Webclient.DownloadString to download string-data from the server? |