Zyloch
asked on
VB Form Freezes
I'm a beginner at VB and I was making a program and pushing through it with unfamiliar code (although I can understand it once I read it -- I'm not totally hopeless at computers ;) and suddenly, everytime I press F5, I can't press any of the controls on my form -- I can't even press the X at the top right -- it just seems frozen.
I rebooted and Ctrl-Xed away ALL the code and even tried to make it an exe file but it still is frozen no matter what I do. Any suggestions or hints?
I rebooted and Ctrl-Xed away ALL the code and even tried to make it an exe file but it still is frozen no matter what I do. Any suggestions or hints?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Unfortunately, while those are good thoughts, I deleted my entire code, and it still seems to malfunction. I'm beginning to think it's my computer but making a new form works... any other thoughts?
What start-up object did you have ?
And what do you mean you deleted you entirew code ? Sounds scary ?
What controls are on the form ? Are they data-bound ? If you copy your controls to the new form that works does it still run ?
And what do you mean you deleted you entirew code ? Sounds scary ?
What controls are on the form ? Are they data-bound ? If you copy your controls to the new form that works does it still run ?
ASKER
Lol, I just Ctrl-Xed all my code into Notepad to make sure it wasn't the code taht was doing it. I have a Winsock control, two text boxes, two lists, a bunch of labels, a timer, a menu, and some command buttons. It's not much so I can just redo it on another form, but I just want to know what's wrong.
I'm not too sure what you mean by data-bound, and if I copy the controls to another form, they work absolutely fine.
I'm not too sure what you mean by data-bound, and if I copy the controls to another form, they work absolutely fine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok. This is supposed to connect to an online xml file and get it then I can use regular expressions to tear it apart and extract what I need. I'm not great at VB and I specifically look up stuff I need -- for instance, say I need to know how to use regular expressions in VB, I'd just search on EE -- so pardon me for any beginnerness (is that a word?)
I tried first connecting with Inet, but apparently, I had to add multiple GetChunk or something like that to get all of the XML and then the states were a bit touchy feely and I couldn't find a comprehensive list of them.
I ended up using a winsock control and some code I got from another site. It seemed to work after the first time I press OK, then I went in and I think I set a value to a textfield and it just froze. I seriously doubt setting the textfield value was the cause of this, but it could be.
It could be the timer -- I'll check it out. Thank you for your suggestions! If this doesn't work, I'll probably just accept one of your answers. Computers are strange sometimes amen :)
I tried first connecting with Inet, but apparently, I had to add multiple GetChunk or something like that to get all of the XML and then the states were a bit touchy feely and I couldn't find a comprehensive list of them.
I ended up using a winsock control and some code I got from another site. It seemed to work after the first time I press OK, then I went in and I think I set a value to a textfield and it just froze. I seriously doubt setting the textfield value was the cause of this, but it could be.
It could be the timer -- I'll check it out. Thank you for your suggestions! If this doesn't work, I'll probably just accept one of your answers. Computers are strange sometimes amen :)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
pps; for downloading something with inet, dont use getchunk if youre a newbie. use OpenURL in string mode instead:
' A TextBox control named Text1 contains the
' result of the method. The Internet Transfer
' control is named Inet1.
Text1.Text = Inet1.OpenURL("http://www.microsoft.com")
read this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusinginternettransfercontrol.asp
' A TextBox control named Text1 contains the
' result of the method. The Internet Transfer
' control is named Inet1.
Text1.Text = Inet1.OpenURL("http://www.microsoft.com")
read this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusinginternettransfercontrol.asp
ASKER
Yes, except OpenURL always cut it off :(
If openurl cuts off, i would look at the file you are downloading, there is no reason it should cut off - internet explorer never cuts off. the only cutr of is if too much time passes without any traffic (as with any internet explorer download)
what is the size of this xml file you are terying to grab - and at what point in your app do you attempt to grab it ?
what is the size of this xml file you are terying to grab - and at what point in your app do you attempt to grab it ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
On the same form try removing the controls (especially winsock) one by one and see what happens (copy the controls to another form so you need not recreate them)
But agree with crew - you should put you code back in and F8 your way through it line by line to see where you hang
But agree with crew - you should put you code back in and F8 your way through it line by line to see where you hang
ASKER
Well thanks everyone. I'll just give up on this and copied the form to another one and it's working fine. Thanks for the time though :)
break on the ZForm_Load and single step through your code to see the last line before it hangs - it will propbably point to something