the form that wont die...

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2008
Posts: 13
Reputation: BigSeckC is an unknown quantity at this point 
Solved Threads: 0
BigSeckC's Avatar
BigSeckC BigSeckC is offline Offline
Newbie Poster

Re: the form that wont die...

 
0
  #21
Nov 23rd, 2008
awwwwwwwwww NUTS... was hoping something may have fixed this... I'm with you right now - possibly the different IF statements in your procedures. Took a small break from coding this weekend to let some things sink in for me before I move on - but I'm definitely watching this thread and *crosses fingers for a fix...

sorry man... i tried
I am who I am...I do what I do
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 13
Reputation: BigSeckC is an unknown quantity at this point 
Solved Threads: 0
BigSeckC's Avatar
BigSeckC BigSeckC is offline Offline
Newbie Poster

Re: the form that wont die...

 
1
  #22
Nov 23rd, 2008
Originally Posted by kain_mcbride View Post
not a command as far as i know, there use to be a sleep command in qbasic (i think)... but writing a pause sub is doable to say the least... assuming one was written for use with this program, how its set up could be part of the problem i guess...

funny, i've never used form.visible = true / false to show or hide forms... always just used .show or .hide... didn't even know it worked until now... well there's my new thing for the day

[edit]ok... so i probably shouldn't be posting at 6:30 am with no sleep... sorry, didn't notice the second page [/edit]

LOL - hear ya... the way the code was written it appeared as though 'Pause' was being called as a Procedure - i haven't run into anything denoting that command

so i was just kinda assuming and hoping that i'm learning something XD
I am who I am...I do what I do
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 100
Reputation: squidd is an unknown quantity at this point 
Solved Threads: 2
squidd squidd is offline Offline
Junior Poster

Re: the form that wont die...

 
0
  #23
Nov 23rd, 2008
The pause is being called. I put the code for it on the previous page. Ill post it again here for you:

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Sub pause(interval)
  2. Current = Timer
  3. Do While Timer - Current < Val(interval)
  4. DoEvents
  5. Loop
  6. End Sub

now in an interesting twist, I move some stuff around in the part of the code i showed at the beginning that was looping for no apparent reason. I am not getting that same thing to happen now. It may happen later, but it hasnt started all day. So very strange indeed. Once im SURE it has fixed that problem, I will post the order I have put the code in that eliminated the code from looping. Until then, im crossing my fingers that it indeed has been corrected.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 100
Reputation: squidd is an unknown quantity at this point 
Solved Threads: 2
squidd squidd is offline Offline
Junior Poster

Re: the form that wont die...

 
0
  #24
Nov 24th, 2008
Well I am going to say for now that the problem has been corrected. I still am not 100% sure that it is, but i havent had it happen for 2 days straight.

What I did was rearrange some of the code in the sub that was looping.

this is how the troubled area was:

Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
Static buf As String
Dim Wdata As String
Winsock2.GetData Wdata, vbString
buf = buf & Wdata
Dim Val As String
pause 1.5
Winsock2.Close
Val = getstring(HKEY_LOCAL_MACHINE, "xxxx\xxxx\xxxx\xxxx", "blah")

Now this is how it looks:

Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
Static buf As String
Dim Wdata As String
Dim Val As String

Winsock2.GetData Wdata, vbString
buf = buf & Wdata
Winsock2.Close
Call CycleText("blah blah blah...", Label1)
pause 1.5
Val = getstring(HKEY_LOCAL_MACHINE, "xxxx\xxxx\xxxx\xxxx", "blah")

When I rearranged the code in this manner, for whatever reason, it stopped looping and the form has stayed hidden for 2 days now. I HOPE this is a done deal. I dont know why this fixed it, but i didnt do anything else but this and now it works, so (shoulder shrug). Beats me.... I am going to add reputation to both of your names BigSeckC and Kane for your help in this matter. I wont called this "solved" per se, because i still dont know for absolute sure that it is.

Thanks again for all the help and effort!

Thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC