943,742 Members | Top Members by Rank

Ad:
You are currently viewing page 3 of this multi-page discussion thread; Jump to the first page
Nov 23rd, 2008
0

Re: the form that wont die...

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
Reputation Points: 12
Solved Threads: 0
Newbie Poster
BigSeckC is offline Offline
13 posts
since Nov 2008
Nov 23rd, 2008
1

Re: the form that wont die...

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
Reputation Points: 12
Solved Threads: 0
Newbie Poster
BigSeckC is offline Offline
13 posts
since Nov 2008
Nov 23rd, 2008
0

Re: the form that wont die...

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.
Reputation Points: 10
Solved Threads: 2
Junior Poster
squidd is offline Offline
100 posts
since Nov 2007
Nov 24th, 2008
0

Re: the form that wont die...

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
Reputation Points: 10
Solved Threads: 2
Junior Poster
squidd is offline Offline
100 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: using of Crviewer component.......
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: help me to fix my counter





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC