Visual Basic 2008 - Reloading/Refreshing Same form - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Visual Basic 2008 - Reloading/Refreshing Same form (/showthread.php?tid=87746) Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-14-2008 at 06:31 PM
Ok so i have 1 form called Form1. RE: Visual Basic 2008 - Reloading/Refreshing Same form by Stigmata on 12-14-2008 at 07:33 PM
reload? like start afresh? RE: Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-14-2008 at 08:27 PM
Ok, i did me.refresh but it's no reloading all the things in the form. RE: Visual Basic 2008 - Reloading/Refreshing Same form by vaccination on 12-14-2008 at 08:44 PM
I believe this will be due to Refresh() only refreshing the graphical elements of the form. If you want to rerun code you'll want to make the button perform a Call function. RE: Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-14-2008 at 08:50 PM Can you give me an example? RE: Visual Basic 2008 - Reloading/Refreshing Same form by Stigmata on 12-14-2008 at 08:54 PM
put the ping'ing stuff, loading list box etc in a procedure. RE: Visual Basic 2008 - Reloading/Refreshing Same form by vaccination on 12-14-2008 at 09:06 PM
Yeah, basically. code: That's very basic, but something like that. RE: Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-14-2008 at 09:59 PM
Ok well the code for that form starts like code: Then my code: (there more than one) It ends with the usual code: How do i add it in? I can't seem to do it without errors RE: Visual Basic 2008 - Reloading/Refreshing Same form by Stigmata on 12-14-2008 at 10:01 PM
are you learning vb atm? RE: Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-14-2008 at 10:17 PM
Ok, i've got it partly working. code: And when the button is pressed that does the same command. The code inside Ping() pings a server and makes a image visible if it gets a response or else makes an image next to it visible if there no response. But if all servers are online there will be a list of images visable. Fair enough untill i refresh that list by pressing the button with Call Ping() in it and if a server is offline it will make the offline and online image active. Do you get me. So when the form loads there is 1 IMAGE 2 IMAGE 3 IMAGE 4 IMAGE 5 IMAGE And if i refresh and one goes offline its like 1 IMAGE 2 IMAGE IMAGE 3 IMAGE 4 IMAGE 5 IMAGE When i need it to be 1 IMAGE 2 IMAGE 3 IMAGE 4 IMAGE 5 IMAGE RE: Visual Basic 2008 - Reloading/Refreshing Same form by Stigmata on 12-14-2008 at 10:20 PM
then hide the images you don't want to show? code: RE: Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-14-2008 at 10:21 PM
What like RE: Visual Basic 2008 - Reloading/Refreshing Same form by Stigmata on 12-14-2008 at 10:26 PM nope, like what I showed you RE: Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-14-2008 at 10:30 PM I did that but if one is online then offline then online, 2 images are shown.. RE: Visual Basic 2008 - Reloading/Refreshing Same form by vaccination on 12-15-2008 at 10:06 AM
Just completely clear all the images inside your ping Sub. That way when you call it they'll all be generated right. RE: Visual Basic 2008 - Reloading/Refreshing Same form by Quantum on 12-15-2008 at 05:56 PM
Thanks RE: Visual Basic 2008 - Reloading/Refreshing Same form by Ezra on 12-15-2008 at 07:14 PM
quote: check if the service that it is providing is working, so a http server, try to download the index page, or just a HEAD request (will save bandwidth), ftp try to connect, etc... RE: Visual Basic 2008 - Reloading/Refreshing Same form by pillowmurder on 01-10-2009 at 03:43 AM
very simple to reload a form. RE: RE: Visual Basic 2008 - Reloading/Refreshing Same form by andrewdodd13 on 01-10-2009 at 11:48 AM
quote:This shouldn't work in VB 2008, because forms are now stored as classes rather than objects, so form1 is the class. What you would be better off doing, is making a module, and using Sub Main and having a global in the module called form1Instance, code like this: Visual Basic code:To Reset the form, call Module1.Reset. At least... it should work. RE: Visual Basic 2008 - Reloading/Refreshing Same form by BV on 02-08-2013 at 08:59 AM
Hi in case your still interested in finding the solution for this. |