473,800 Members | 2,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ListCo unt

Pause (2)
ServiceSocket(S erviceSocket(). UBound).SendDat a
"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.GetDat a IncomingData

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

If Left(IncomingDa ta, 4) = "USER" Then

frmBuddy.BuddyL ist.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 1022
maybe try the old VBCRLF?

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

hope this helps

JM
"Dan Watson" <st********@tis cali.co.uk> wrote in message
news:cc******** **@news8.svr.po l.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.ListCo unt

Pause (2)
ServiceSocket(S erviceSocket(). UBound).SendDat a
"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.GetDat a IncomingData

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

If Left(IncomingDa ta, 4) = "USER" Then

frmBuddy.BuddyL ist.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
5796
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 there a chance to change this behaviour? Regards Peter
10
15461
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 newsgroup I've found that there is a lot of opinion that says to stay away from the treeview if at all possible due to lack of documentation and distribution problems. Added to this, I've never used it before and don't need a new learning curve at the...
42
11559
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
1195
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 node on the treeview the corresponding panel appears in the right. with the respective details. When I add new nodes in the treeview using MenuItems in the fileMenu on the top, a new node is created and then I get empty-fields on the
0
1782
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 may not have some subdirectories with the same name. I am not having any problems populating the treeview with the corresponding directory structure when switching between radio buttons. In the treeview's AfterSelect event, I take the path from...
3
12148
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. But when I add new nodes and I want to look for a specific item then I only get the Items from the beginning --> something is not working with the clear() method. Please help me!?! juvi
2
2261
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 all the children from a database of a sort. Then once this is complete I clear the nodes, then add the TreeNode so it should be the only root node. The only problem is that for some very VERY strange reason there are two root nodes, with...
3
7648
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 font, so it is clipped at the end. Does anyone know of a workaround? Thanks
0
1120
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 the XML for the treeview). The nodes themselves don't have a cssClass, but they do have a DefaultStyle.
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9092
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.