473,513 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Chat Window Challenges

Greetings, All... I'm writing an internet enabled game and I'm working on
the chat engine. I'm using a RichTextBox as the chat message display window
so I can easily display text in several colors. One of the problems is: in
order to scroll the text box to ensure that the most recently posted message
is visible, I have to give the RichTextBox focus. Even though I can switch
focus back to whatever control had it before the update, it is really
annoying to anyone using the other parts of the game interface.

Can anyone give me some advice as to the best way to handle continuous chat
in an environment like this? Is there a better way than the RichTextBox?
Any thoughts are greatly appreciated. Thanks.

Jerry
Nov 20 '05 #1
3 1191
How are you setting the text?

"Rlrcstr" <rl*****@msn.com> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
Greetings, All... I'm writing an internet enabled game and I'm working on
the chat engine. I'm using a RichTextBox as the chat message display window so I can easily display text in several colors. One of the problems is: in order to scroll the text box to ensure that the most recently posted message is visible, I have to give the RichTextBox focus. Even though I can switch focus back to whatever control had it before the update, it is really
annoying to anyone using the other parts of the game interface.

Can anyone give me some advice as to the best way to handle continuous chat in an environment like this? Is there a better way than the RichTextBox?
Any thoughts are greatly appreciated. Thanks.

Jerry

Nov 20 '05 #2
I'm setting the insertion point and color and using the AppenText method.
Then I'm calling the ScrollToCaret method, but that only works if the
control has the focus.

I know there's got to be a way to do this, I see it all the time, but for
some reason I just can't figure it out...

Jerry

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:vs***********@corp.supernews.com...
How are you setting the text?

"Rlrcstr" <rl*****@msn.com> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
Greetings, All... I'm writing an internet enabled game and I'm working on the chat engine. I'm using a RichTextBox as the chat message display

window
so I can easily display text in several colors. One of the problems is:

in
order to scroll the text box to ensure that the most recently posted

message
is visible, I have to give the RichTextBox focus. Even though I can

switch
focus back to whatever control had it before the update, it is really
annoying to anyone using the other parts of the game interface.

Can anyone give me some advice as to the best way to handle continuous

chat
in an environment like this? Is there a better way than the RichTextBox? Any thoughts are greatly appreciated. Thanks.

Jerry


Nov 20 '05 #3
Wish I could say I had experience with it. I would say that maybe you could
raise an event after its been updated to set the focus back to another
control. Or find another method besides scrolltocaret, I wish I could give
better advice than that..

"Jerry Camel" <rl*****@msn.com> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl...
I'm setting the insertion point and color and using the AppenText method.
Then I'm calling the ScrollToCaret method, but that only works if the
control has the focus.

I know there's got to be a way to do this, I see it all the time, but for
some reason I just can't figure it out...

Jerry

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:vs***********@corp.supernews.com...
How are you setting the text?

"Rlrcstr" <rl*****@msn.com> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
Greetings, All... I'm writing an internet enabled game and I'm
working
on the chat engine. I'm using a RichTextBox as the chat message display

window
so I can easily display text in several colors. One of the problems
is:
in
order to scroll the text box to ensure that the most recently posted

message
is visible, I have to give the RichTextBox focus. Even though I can

switch
focus back to whatever control had it before the update, it is really
annoying to anyone using the other parts of the game interface.

Can anyone give me some advice as to the best way to handle continuous

chat
in an environment like this? Is there a better way than the

RichTextBox? Any thoughts are greatly appreciated. Thanks.

Jerry



Nov 20 '05 #4

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

Similar topics

0
2433
by: |-|erc | last post by:
<?php // Get the names and values for vars sent by index.lib.php3 if (isset($HTTP_GET_VARS)) { while(list($name,$value) = each($HTTP_GET_VARS)) { $$name = $value; }; };
2
1647
by: oracle3001 | last post by:
Hi All, I want to capture / read the text flowing through a chat window that is part of an external application. I should note that I don't just want to capture the text in the chat window...
2
2771
by: John Dalberg | last post by:
I am looking for a software package hopefully open source for a live chat system in C#.. one that's similar to phplivesupport. I have contacted the vendors I found in the component gallery at...
1
1037
by: Terry Olsen | last post by:
I have a chat client working, using a standard textbox for the chat window. Is there another control and/or code I could use that could recognize a hyperlink in the chat and allow me to click on it?
1
1372
by: ranabhavin2 | last post by:
Hi, I have made database chat application in asp.net. now suppose I have two chat window at different computer. If user1 writing something to user2 then at the bottom there shuold be message...
5
3947
by: Bhaiyyah | last post by:
I am repetitively failing to login with any user name for XHTML Chat. Here is some info I copied from view source: Link: http://www.shiachat.com/forum/chat.html ...
1
1832
oll3i
by: oll3i | last post by:
when i run it from bat (@start "CHAT to topic" run Chat)without durable subscriber the window for chat opens but when i added the durable subscriber to the code it stopped opening? import...
4
3178
by: hussainiyad | last post by:
Hi experts ,i,m doing a chat room project in it i wanna to create a iframe (e.g in gmail when we want to chat then a window will come )i wanna the same type of window in my chat project, can...
4
2462
by: nbt725 | last post by:
Dear Sir, Hello ! I want 1 to 1 chat script in php between client coming to site to chat with admin. And admin can chat with multiple client.There can be multiple admin. I want to disable login...
0
7161
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
7384
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,...
1
7101
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...
0
7525
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
5686
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
4746
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...
0
1596
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 ...
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.