|
Will u please post the code!!!!!!!!
|
|
|
|
|
Hi!
The Rich Edit control that's actually the core control underneath the RichTextBox can display underlines (even the squiggly ones), but setting the corresponding character styles is not possible directly with the regular RichTextBox.
You'll have to send EM_SETCHARFORMAT messages to the rtb to enable underlining in a given style. You can't have an underline color that's different from the text foreground color, though.
You might want to look up the CHARFORMAT2 structure in the Platform SDK documentation on the different options you have to underline text within a rich edit control (and thus in a RichTextBox).
Regards,
mav
-- modified at 7:47 Saturday 4th February, 2006
Just found out that my statement on the underline color was incorrect.
You CAN have different underline colors, althouth it's not documented in the CHARFORMAT2 struct. The upper 4 bits of the bUnderlineType determine the color.
|
|
|
|
|
Hi everyone!!!
I want to add SplashScreen to my application. I found on the Web a source to do : http://www.reflectionit.nl/Splash.aspx
To give more promptness to this SplashScreen, I have to add a Flash 8 control (OCX Flash). There I have problem on execution. The error message :
Impossible to reach a removed object named "SplashForm"
Is there solution!!!
Thank you!!!
C# Forever !!!
|
|
|
|
|
Try making a new project, and copying all your existing source into it
|
|
|
|
|
Hi James Gupta and thanx for reply !!!
That what I have done, but there is always same problem !!!
I don't know if you you've seen the code source of the application (URL : http://www.reflectionit.nl/Splash.aspx). The problem is only when I add a Flash OCX control (Flash8.ocx) to the SplashForm , else, I have not this problem.
Thanx!!!
|
|
|
|
|
Hello, does anyone know how to use DrawString / DoubleBuffer / UserPaint / AllPaintingInWmPaint to paint your own RichTextBox? This is for a news ticker that contains multiple fonts, font colors and embedded images. The autoscrolling is working great, but the flicker is really bad and I was told that double buffering is the way to go (is it, or is there something else, like making an image and double buffering its movement??). Any pointers would be really appreciated!
|
|
|
|
|
You could override the RichTextBox class, and in the constructor:
<br />
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);<br />
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);<br />
|
|
|
|
|
Is it possible to fire two events at the same time?
In my code I fire off an event if my if statement is true (see code below)
<br />
if (SegType == "Y")if(OnQResponse != null) OnQResponse(this, new EventArgs());<br />
Could I add the other event in this statement? Like: if(SegType == "Y") if(OnQResponse != null && OnDataRecvd != null){OnQResponse(this, new EventArg()); OnDataRecvd(this, new EventArg());
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
The only problem I see is your approach, if one of the 2 handlers is null, no event is fired. But that may be the intended behavior. If this is the case, that may confuse other parts of the application expecting to be notified of one event, but are not because nobody subscribed to the other one.
If this is the intended behavior, simply make one event: OnQResponseAndDataRecvd.
if ((segType == "Y") && (OnQResponseAndDataRecvd != null))
{
OnQResponseAndDataRecvd(this, EventArgs.Empty);
}
If you need 2 separate events:
if (segType == "Y")
{
if (OnQResponse != null) OnQResponse(this, EventArgs.Empty);
if (OnDataRecvd != null) OnDataRecvd(this, EventArgs.Empty);
}
You may also notice the use of EventArgs.Empty instead of new EventArgs() . Basically, EventArgs is a class that contains no information, and this way you avoid creating unnecessary new objects.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
-- modified at 13:23 Wednesday 25th January, 2006
|
|
|
|
|
If you mean that the code handling the two events should execute at the same time, then no.
An event is basically a list of method pointers. When you call the event, it will just call the methods in the list one after the other. That means that when you call OnQResponse, it will not return until all event handlers in it has been executed.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks,
I saw that. I guess there is no way to create a delegate that will fire two at the same time?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
If you want the delegates to run asynchronously (the closest to firing them at the same time), look for the BeginInvoke[^] method.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello everybody.
Does anybody knows a way of changing the color of some words (reserved words) of a code editor using a VS 2003 add-in?
So for some kinds of files, I would like to highlight some words and symbols, check syntax, etc.
I know how to access the TextDocument object that represents the editor, but I don' know which one of its properties should be used to change the color of a portion of text. Any pointers to information on this will be warmly welcome.
Thanks
Omar
|
|
|
|
|
How can I update selected row from gridview.
|
|
|
|
|
Do you think it is possible to give you anything like a decent answer to your question when you have provided so little information on what you want?
The best I can personally do is provide a link to the RowUpdatingEventArgs object[^]
-- modified at 10:52 Wednesday 25th January, 2006
|
|
|
|
|
I have one gridview in my webform and i added Command field which includ (edit,select,update,cancel, events) when i click edit commandfield then i do some changes in selected row and trying to update that changes from gridview.
all what i need is how can i update changes in gridview1_RowUpdating Event
I hope i was little bit more clear in my question
|
|
|
|
|
I need to send message from my computer to another with NetMessageBufferSend function. Everything works fine when i'm sending to a computer on the same domain as mine. The problem is that i need to send a message to computer in another domain. Does anyone have experience with this? Any help will be appreciated.
|
|
|
|
|
Not supported. This is the function that the command line utility "NET SEND" uses, and therefore, has the same restrictions. You'll either have to change your domain configuration so the target domain trusts the senders domain (not likely to happen), convert your domain environment to Active Directory (also not likely to happen), or use a different messenging system that isn't dependent on Windows Security to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to find some ebooks for .net 2005, i haven't master card, credit card, so i can't buy these ebooks on network, if you have, you can help me.
I need ebooks: "Microsoft sql server 2005 step by step" and "Programming microsoft visual c# 2005 core reference".
you can buy it help me or can you give me.
Thank you very much
|
|
|
|
|
These books don't come in an E-Book format and they are NOT free! It's absolutely ridiculous that your asking for them without paying anything.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Your profile says you're a student, so I'm guessing with such specific book titles, you need them for a class, but don't want to pony up the cash for buying them, and want to get them for free. Why else would you want a specific title when there are many resources for both C# and SQL Server 2005 available for free online? Anywho, code project and a myriad of other sites should have the information you need for free, but if your teacher requires that you have those specific books, your school's library probably has a couple copies that you can view/borrow.
Good luck
|
|
|
|
|
I want to create a C# console app that can change the current directory then exit. When I use System.IO.Directory.SetCurrentDirectory(@"c:\temp");, after the application closes it returns to the original subdirectory before execution. I want it to stay on the new set directory. Any ideas?
|
|
|
|
|
|
The other reply is correct. SetCurrentDirectory only affects the current directory of the process, not the command prompt that launched it. If this is all you want to do, then it's really easy without using any code:
C:> COPY CON C:\WINDOWS\GOTOTEMP.CMD
@ECHO OFF
C:
CD C:\TEMP
^Z
Now all you need to type at a command prompt is GOTOTEMP .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:20 Wednesday 25th January, 2006
|
|
|
|
|
My example is a simplification of what I need. The acutal C# project will have more logic to deterine correct path.
Thanks anyway.
|
|
|
|