|
I have written and article[^] about it. Hope it helps
|
|
|
|
|
trang1800 wrote: Is there a way we can turn off detecting cross-thread error?
Yes.
Control.CheckForIllegalCrossThreadCalls = false;
trang1800 wrote: Should we do that?
No.
Keyboard not found. Press F1 to continue.
|
|
|
|
|
blackjack2150 wrote: Yes.
Control.CheckForIllegalCrossThreadCalls = false;
Yes, but only when the debugger is attached.
|
|
|
|
|
Hi. I have a SSL server and a SSL client that communicate with each other, both written in C#. Now I would like to write a SSL java client that's able to communicate with the server. I found few code examples, but none that explains where to specify the certificate. Maybe someone can help me out.
Thanks.
|
|
|
|
|
So this is a Java question, then?
|
|
|
|
|
blackjack2150 wrote: So this is a Java question, then?
Yes and no since I want both sides (C# server and Java client) to communicate with each other.
|
|
|
|
|
Anyone know how to do multiline indent/outdent? Like in Visual Studio...select multiple lines, press Tab, and it indents the selected lines. I'm doing this in a RichTextBox. Thanks.
I've searched both Google and this site but have found nothing. (By indent, I don't mean the indent property, I mean adding a tab in front of every line)
Thanks.
|
|
|
|
|
Indent:
richTextBox1.SelectionIndent += 10;
Outdent:
richTextBox1.SelectionIndent -= 10;
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
As in...by tabs...('\t') character. I figured out the indent part actually...I just need the outdent.
|
|
|
|
|
Didn't SelectionIndent work?
I wonder how you programmed Multiline Indent action by inserting '\t' characters!! By a loop?
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
SelectionIndent adds a real indent to the box. I want to take away the tab character at the front of each line if it exists. I think I may have just figured out how. And yes, I used a loop to add in the '\t' characters.
|
|
|
|
|
Well, I think you have some choices to do that but of course they're not too common!
For example:
"\t\t\tHi".TrimStart(new char[]{ '\t' });
Removes all '\t' chars from the beginning.
You can also use String.Split or maybe String.Substring or ... However, whatever you use, I think, you haven't a simple and clean solution. I still prefer SelectionIndent
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
|
|
|
|
|
Hello Everyone,
I am creating a small application that looks like an Excel Spreadsheet for scheduling purposes. It looks as such:
Employee Name 1 | Employee Name 2
11/01 8:00-10:00 Blah | 8:00-10:00 blah blah
11/02
11/03
What I am trying to do is allow each cell to have multiple selectable lines in it. For instance:
Employee Name 1 | Employee Name 2
11/01 8:00-10:00 Blah | 8:00-10:00 blah blah
12:00-1:00 Lunch |
11/02
11/03
I have seen other applications that are able to do this without creating another row and duplicating the date. I have read and read but I can't seem to find anything that points me in the proper direction, most likely due to the fact that I don't know what keywords to look up in order to find what I am looking to do. Any pointers in the right direction of how to achieve this would be greatly appreciated!
|
|
|
|
|
Hallo
i'm writing the GUI for some console applications and i want to include those apps directly in the GUI executable.
In particular, i'm writing a brief program to launch (in sequence) DISKPART and imagex to restore an os onto a specified partition.
could you point me to any resource about?
thanks in advance
R
|
|
|
|
|
You can add the console application as an embedded resource, extract it at runtime and use Process class to start it. Here is a similar example: Bat file compiler[^]
|
|
|
|
|
Hey guys,
I'm calling the Process.Start() methode on an application that once started, it fires up a new application and exits so as you can see, another process is actually started by the originally lanched process which I cant monitor when it exits "the newly lanched application", you may like to call this "handing over".. Any idea how can we catch the later application and monitor when it exits??
Thanks guys!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
|
Mika Wendelius wrote: Perhaps you could use Process.GetProcessesByName method[^].
Thanx Mika!!
GetProcessesByName was EXACTLY what I needed
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
You're welcome
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi Muammar©,
When the first process creates the second process, it could obtain the new Process ID and return that
as its exit status, so you can use it in a batch file or any other process.
|
|
|
|
|
Hey Luc,
Luc Pattyn wrote: When the first process creates the second process, it could obtain the new Process ID and return that
as its exit status, so you can use it in a batch file or any other process.
Hmmm.. And how do you do that??
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi Muammar©,
some C# code:
Process p=Process.Start(...);
int id=p.Id;
Environment.ExitCode=id;
Application.Exit();
and some batch code:
C:\process.exe
set PID=%ErrorLevel%
|
|
|
|
|
Thanx Luc! I did it, I just needed to use the GetProcessByName
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello,
i am new in this forum and it seems to, that here are a lot of very wellknown people, who maybe could help me.
I would like to program a ActiveX-Control in C# to visualize the data of an acceleration sensor, which works with x- and y-axis. The program, which provides the sensor data, has the possibility to include ActiveX-Controls. There´s also a Solution file, which can be used.
My problem is, i can program in C or C++, but i have never programmed in C# or .NET. Could somebody help me or has an idea, where i can get syntax or algorithm, to understand, how c# works? I use Visual Studio 2005 ! Thank you very much...
|
|
|
|