473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Treeview and other problems

I applogogise... This isn't a VB.NET issue - but my ISP dosnt give's me
tough love when it comes to just VB newsgroups

here goes:

HI guys... I am having a serious bug with my program called Neowin
Messenger which I have only been able to get around with delay hacks,
which seem to cause more problems than fix. I will try and explain the
problem:

Neowin Messenger works on the TCP Client>Server model. The problem is
always the loading of the 'logged in buddies' onto the treeview control
of the person that is logging in... ie loading everyone that is already
logged in.

The server is sending this to the client that has just logged on

----------
Select Case lstUsers.Text
Case Is <> (tempnick & "¤¶£")

For i = -1 To lstUsers.ListCount

Pause (2)
ServiceSocket(ServiceSocket().UBound).SendData
"USER¤¶£" & lstUsers.List(i)

DoEvents%
Next i
End Select
----------

As you can see, it is going through the lastUsers list line by line
(every logged on buddy is loaded onto a seperate line here) and sending
each line of the lstUsers to the newly logged in client.

I had to stick a Pause in there becuase on slower connections, instead
of the client reciveing the "USER¤¶£" & lstUsers.List(i) line by line,
it clumps it all together, so i needed to put 2 second Pause in there.

This is what the client is doing:

----------
Dim IncomingData As String
Winsock1.GetData IncomingData

func = Split(IncomingData, "¤¶£")(0)
dat = Split(IncomingData, "¤¶£")(1)

If Left(IncomingData, 4) = "USER" Then

frmBuddy.BuddyList.Nodes.Add "MAIN", tvwChild, , (dat), 2, 2
Pause 0.08
End If
----------

I really need to know how to stop this data being clumped together on
slower connections.

What would be ideal I guess.. is to send all of the users at once from
the sever in once line, but being seperated by the "¤¶£", and then on
the client, looping around and adding every user in between "¤¶£" on a
different treeview entry. I cant figure out how to do this though

Thanks for your help in advance
Nov 20 '05 #1
1 1005
maybe try the old VBCRLF?

as in
"USER¤¶£" & lstUsers.List(i) & VbCrLf
instead of pauses?

hope this helps

JM
"Dan Watson" <st********@tiscali.co.uk> wrote in message
news:cc**********@news8.svr.pol.co.uk...
I applogogise... This isn't a VB.NET issue - but my ISP dosnt give's me
tough love when it comes to just VB newsgroups

here goes:

HI guys... I am having a serious bug with my program called Neowin
Messenger which I have only been able to get around with delay hacks,
which seem to cause more problems than fix. I will try and explain the
problem:

Neowin Messenger works on the TCP Client>Server model. The problem is
always the loading of the 'logged in buddies' onto the treeview control
of the person that is logging in... ie loading everyone that is already
logged in.

The server is sending this to the client that has just logged on

----------
Select Case lstUsers.Text
Case Is <> (tempnick & "¤¶£")

For i = -1 To lstUsers.ListCount

Pause (2)
ServiceSocket(ServiceSocket().UBound).SendData
"USER¤¶£" & lstUsers.List(i)

DoEvents%
Next i
End Select
----------

As you can see, it is going through the lastUsers list line by line
(every logged on buddy is loaded onto a seperate line here) and sending
each line of the lstUsers to the newly logged in client.

I had to stick a Pause in there becuase on slower connections, instead
of the client reciveing the "USER¤¶£" & lstUsers.List(i) line by line,
it clumps it all together, so i needed to put 2 second Pause in there.

This is what the client is doing:

----------
Dim IncomingData As String
Winsock1.GetData IncomingData

func = Split(IncomingData, "¤¶£")(0)
dat = Split(IncomingData, "¤¶£")(1)

If Left(IncomingData, 4) = "USER" Then

frmBuddy.BuddyList.Nodes.Add "MAIN", tvwChild, , (dat), 2, 2
Pause 0.08
End If
----------

I really need to know how to stop this data being clumped together on
slower connections.

What would be ideal I guess.. is to send all of the users at once from
the sever in once line, but being seperated by the "¤¶£", and then on
the client, looping around and adding every user in between "¤¶£" on a
different treeview entry. I cant figure out how to do this though

Thanks for your help in advance

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Zentner | last post by:
Hi all, if I assign a context menu to a treeview and popup the contextmenu with the APP-key the context menu appears in the center of the treeview control and not at the selected treenode. Is...
10
by: WJA | last post by:
I'm looking at building an application that needs to display 4 levels of hierarchical data. Initially the obvious choice for this would seem to be the treeview control. After searching this...
42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
1
by: Ravi | last post by:
Hi all. Help needed Regarding vb.net. I have the User Interface of my application, Which has a treeview on the left and a set of panels on the right(which have textboxes). When Ever i Click a...
0
by: Treeview Trouble | last post by:
I have an application where there are two radio buttons each of which populates a treeview control with a directory structure. Each radio button corresponds to a different directory which may or...
3
by: juvi | last post by:
Hi, I have got a problem with Treeview.Nodes.Clear() under VB2005. When I have some nodes in my treeview and a force to clear() all nodes then it seems to work, because the nodes are not visible....
2
by: Kristopher Wragg | last post by:
I'm having some serious problems with the TreeView control. I've got a control that inherits TreeView and has some methods that firstly create a TreeNode then does some recursive procedure to add...
3
by: Marcel Brekelmans | last post by:
Hi, When I set the text of a TreeView node to bold (or Italic for that matter) programmatically, it doesn't show up with its length adjusted. Instead, it has the length of the text in normal...
0
by: David | last post by:
Hi, using C# .net 1.1 I am using the treeview control but having problems setting the style. The treeview has a cssClass but when I set it, it is totally ignored (though I can see that in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.