|
They did invent a beautiful thing especially for you, it is called documentation.
If you don't know where it is, Google may show the way. Studying a book on the subject might be useful too.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
use KeyDown event, check if its Enter Key or not. If yes
TextBox.Text = TextBox.Text.Replace("\r\n", "<br />");
or
TextBox.Text = TextBox.Text.Insert(TextBox.SelectionStart, "<br />");
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thank you Xmen W.K.
But your code doesn't work.
It inserts both of <br /> and \r\n
I've used this code, it works.
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
TextBox textBox = sender as TextBox;
if ((int)e.KeyChar == 13)
{
try
{
e.Handled = true;
textBox.Text += "<br />";
}
catch { }
}
}
|
|
|
|
|
Well, it wasn't full code. But your code is a bit buggy What if the carret position is in the middle of text ?
Thats why use string.Insert as I posted above.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hello everyone!
I am looking for some training on a low budget. I do have several books, but was hoping that someone had some video courses they want to get rid of. I also do have a subscription to LearnVisualStudio, but some of their content is older than what I need.
Looking for:
C# (3.0 ideally)
ASP .NET 3.5 is a bonus as well.
AppDev has great training, so if anyone has their training they could sell or lend, that would be great.
|
|
|
|
|
|
These are okay and I did know about them, but they are very specific.
I am looking for content as verbose as AppDev.
I know that usually cost $$$, but I am hoping someone out there has materials they no longer use.
-Brian
|
|
|
|
|
Can anyone tell me how to open any file using its default program ?
|
|
|
|
|
Hi,
Process.Start("file") simulates double-clicking the file in Windows Explorer.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi
I am working on a project that will use tabbed interface for displaying multiple documents (like Visual Studio). I can either I treat it like MDI interface (setting IsMdiContainer to true ) and deal with the difficultis of making it actually tabbed (AFAIK this is not exactly straightforward). Or (my preference) forget about MDI and simpliy open individual documents in individual tabs and that's it.
What is the advantage of the former approach?
Thanks for clarification, H.
|
|
|
|
|
Hi H,
I just built an application using the approach you mention (tabbed with an MDI on the outside). I find that this interface works extremely well for a large number of applications. In particular, the ability to constantly show navigation / menu bar / etc on the MDI parent.
I used Infragistics tool suite to build out the interface - they have a component that actually makes MDI children tabbed - and abstracts most of the work for you. I highly recommend checking it out! The component is called UltraTabbedMDIManager ...
|
|
|
|
|
Principally I guess that in standard MDI you can have multiple views on the screen at once where tabs kind of limit it to one. Some 3rd party docking controls allow you to go either way by dragging views around - like in Visual Studio.
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: Principally I guess that in standard MDI you can have multiple views on the screen at once where tabs kind of limit it to one.
Agreed. This is the primary reason my personal browser's been Opera for the last 7+ years.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
Why not use a TabControl then?
|
|
|
|
|
...if your idea of fun is as warped as mine. No Visual Studio allowed.
static void Main(string[] args)
{
try
{
TestStatic.SaySomething("HI");
}
catch (Exception error)
{
Console.WriteLine(error.InnerException.Message);
}
try
{
TestStatic.SaySomething("Hi 2");
}
catch (Exception error)
{
Console.WriteLine(error.InnerException.Message);
}
Console.ReadLine();
}
}
public class TestStatic
{
static TestStatic()
{
throw new Exception("Afternoon Exception");
}
public static void SaySomething(string message)
{
Console.WriteLine(message);
}
}
Regards,
Rob Philpott.
|
|
|
|
|
|
Did you cheat?
Regards,
Rob Philpott.
|
|
|
|
|
Nope. This is easy, the first time a static method gets invoked, the static constructor is invoked. Yours throws an exception. The second time, the static constructor is not invoked again, so your call succeeds.
|
|
|
|
|
Le Centriste wrote: Nope. This is easy
Why did you get it wrong then?
Regards,
Rob Philpott.
|
|
|
|
|
I got it wrong? Then, why did you accuse me of cheating?
|
|
|
|
|
Hes playing. But you did get the answer wrong.
|
|
|
|
|
Yes, I finally ran it. I am surprised that the static constructor is called twice. Probably because it is throwing an exception.
|
|
|
|
|
The static constructor is NOT being called twice.
|
|
|
|
|
yeah, you're right. So, when the static constructor first throws an exception, any attempt to use the static methods (or maybe instance methods) rethrows the exception.
I never use static constructors, and such behavior does not make me want to them.
|
|
|
|
|
I think the TestStatic.SaySomething will not be called and it will directly go to the catch block.
But the second TestStatic.SaySomething will be called because static constructors are called only once, afaik.
Am I correct ?
|
|
|
|