|
amir-haghighi wrote: . I can not good speak english . i
That's fine. I'm sure whatever language you speak natively, I can't speak as well as you speak English.
amir-haghighi wrote: how go to line in richtextbox in my program ?
You can't, because the line numbers no longer exist when your code is compiled, the code does not exist in remotely the form you created it at that time. Also, it's not possible to jump execution to a random spot in the code, even the VS debugger cannot do that, it can only jump within the current method, and within the current try block. What you're asking is basically impossible, there is no chance of you being able to do it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Take a look at the answer in this[^] thread on MSDN.
If you ignore the bit about selecting the RichTextBox from a Tab , you should be able to work it out.
[Edit]
Just found this code:
public void GoToLineAndColumn(int Line, int Column)
{
Cursor.Current = Cursors.WaitCursor;
int Offset = 0;
int i = 0;
foreach (String L in Lines)
{
if (i < Line - 1)
{
Offset += L.Length + 1;
}
else
{
break;
}
i++;
}
Select(Offset + Column - 1, 0);
Cursor.Current = Cursors.Arrow;
}
Lines is RichTextBox.Lines property
You might also need the ScrollToCaret method, as I cannot remember if the Select(int, int) automatically brings it into view.
[/Edit]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi all,
Could someone please tell me how to write code for the below situation?
When entering numbers into a text box
input 126 => output 1,26
input 1234 => output 12,34
It shouldn't accept letters and should allow me to leave textbox empty
Thanks in advance
|
|
|
|
|
|
As I only seek for a simple validation, I thought I could have a piece of code instead of using a custom control.
I'm sure it is a valuable reference for future needs. Thanks anyway
I still need a simple code to do it
|
|
|
|
|
Use the KeyUp Event to validate what's written in the TextBox and then alter the text.
But you'll have to write the code for it yourself..
|
|
|
|
|
i have a folder which name is Test in D: Drive , now want create Test.zip ,How it Posible
|
|
|
|
|
|
Hi,
You can use System.IO.Compression namespace to do that. You can find lot of help on msdn site for that.
Regards,
Paramhans Dubey
|
|
|
|
|
|
How to stop MSSQL database server with C#.net
|
|
|
|
|
Check this[^].
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
can anyone please tell me that how two machines can communicate with each other over the internet with socket programming.
i know it is possible by webservice but i want to know that how to communicate over the internet with socket programming.
if possible then please give me a small sample code.
thanks in advance.
tbhattacharjee
|
|
|
|
|
|
I need help on how to get the timetable from this website so that I can arrange it to send it out in SMS format.
http://utptt-ex.petronas.com.my/Reporting/Individual?identifier=8182&B1=View+Timetable&objectclass=students&idtype=id&width=100&periods=1-30">
My project can retrieve the XML from the website, but I don't know how to get the input because it's in table format.
|
|
|
|
|
regular expressions or just string mashing, basically.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello.
I'm working with matlab and when I'm opening windows inside matlab I have a lot of open windows in the taskbar (Main matlab window and other windows name "f1", "f2", "f3" and so on).
Is there a way to hide the sub windows from the task bar?
Thanks.
|
|
|
|
|
MATLAB ???
In WinForm, you can set the property ShowInTaskbar = false.
|
|
|
|
|
I'm not familiar with MathLab but if you're using a mathlab API in a WinForm application you can choose not to show the Form(s) in the taskbar by changing the property ShowInTaskbar to false .
|
|
|
|
|
matlab is software he has installed..
ShowInTaskbar doesn't work here.. i think the only way is to minimize your windows to the tray menu..
search in google for a minimize applications to tray menu app or code yourself a program that does it..
greetz
|
|
|
|
|
Ah, he wants a way to hide his matlab windows by using C#.
|
|
|
|
|
Hi all, Sorry for the misunderstanding.
I have Matlab which is a program I installed.
The program have an option to open sub windows from the main window (lets say I know the names of all sub windows).
I want to build an exe file that when I run it , it will hide all the sub windows from the taskbar.
Hope I was more clear now and I soory again for not explaining myself before.
|
|
|
|
|
|
Hi pal,
Thanks. I saw the code.
This code hide the whole window so you can't see it on screen. What I want is to hide the window only from the task bar but still to see it on the screen itself.
Thanks.
|
|
|
|