Author | Message | Time |
---|---|---|
Lenny | One of my first programs was a chat bot for networks.... It had a timer that would open a text file once every 100 ms and a send box that would save to this text file.....This text file would be shared on the network so the text file thus would act like a Channel ........it still is a project I am working on..... Can anyone tell me how to fix one big problem....The picture box that displays the text doesnt scroll down when it becomes full, any ideas on how to fix this?.... | July 2, 2003, 4:24 AM |
Noodlez | Yes. Don't use a picturebox to display text. | July 2, 2003, 7:33 AM |
Grok | 1. Instead of just writing the person's name and the text to a file, write a timestamp (sequential number), the person's name, and the text in a delimited file. When reading back the file, you only need read what was added since the last timestamp you remember. 52348, TinyTim, my stupid dog ate my homework 52349, MorChiken, hahaha you'll get detention 52350, TinyTim, shutup and let me copy yours 52351, Bubbles, is Sarah in here? Have each client remember the timestamp of the data it last displayed. When it goes back to read the file again, read up to the previous timestamp, then start displaying new lines. 2. Display all your lines in a control like a textbox, listbox, or much easier is to use a RichTextBox control. Set ScrollBars to Vertical in the properties box. Turn on Text Wrapping, and set a reasonable margin. This should be enough info to get your started. After you get more experience, the people on these boards can help you make the chat program even more interactive. But not yet. Go ahead and continue on your current approach. You'll really enjoy the advanced methods later! | July 2, 2003, 10:52 AM |
DarkMinion | [quote]Yes. Don't use a picturebox to display text. [/quote] Blizzard does in Starcraft/War2/Diablo :P | July 2, 2003, 12:39 PM |
Skywing | [quote author=DarkMinion link=board=5;threadid=1773;start=0#msg13581 date=1057149564] [quote]Yes. Don't use a picturebox to display text. [/quote] Blizzard does in Starcraft/War2/Diablo :P [/quote]Ehh.. last time I checked, Blizzard didn't write Starcraft/War2/Diablo in VB. | July 2, 2003, 8:17 PM |
DarkMinion | Shhh They still use a picturebox :P | July 2, 2003, 8:50 PM |
Camel | [quote author=Skywing link=board=5;threadid=1773;start=0#msg13650 date=1057177060] [quote author=DarkMinion link=board=5;threadid=1773;start=0#msg13581 date=1057149564] [quote]Yes. Don't use a picturebox to display text. [/quote] Blizzard does in Starcraft/War2/Diablo :P [/quote]Ehh.. last time I checked, Blizzard didn't write Starcraft/War2/Diablo in VB. [/quote] You never know, terms are subject to change without notification! | July 3, 2003, 2:50 AM |
j0k3r | Wouldn't that require a huge patch though? Back to the post subject... Lenny I have/had a book that dealt this, there is something you need to enable or add. If I find it I will post as soon as I can. | July 3, 2003, 3:18 AM |
Lenny | thx I dont want to add a RCT box because I want all the code to be written by me... | July 3, 2003, 4:22 AM |