|
Thankyou very much.
Couldn't have asked for a better response.
PS - Your english is perfectly good. I wouldn't have known if you hadn't told me
"imagine how stupid the average person is ...
now imagine that half the planet is more stupid than that!"
|
|
|
|
|
Martiankeeper wrote: 2) Do I need to manually apply double buffering to the tabcontrols and listview controls?
You should also look at ListView.BeginUpdate() and ListView.EndUpdate() method to disable and enable redrawing of ListView. Also Control.SuspendLayout() and Control.ResumeLayout() could be helpful.
"Please! For the love of God! Can you help me unlearn VB?" -Jeremy Falcon
|
|
|
|
|
hi to all,
how can i split a string value with a seperator of many character.
like this :
string MyString = "abc|@def|@hij|@klm|@"
after the split i want the following result :
abc
def
hij
klm
best regrads and thanks in advance
fady
|
|
|
|
|
Try:
string test = "abc|@def|@hij|@klm|@";
char[] seperators = {'|'};
string[] splitted = test.Replace("@","").Split(seperators);
Then you get an array of 5! strings, the last is empty.
Greetings,
Ingo
------------------------------
An bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
If it is the same string sequence, String.Split will do the job.
string[] myStrings = myString.Split(new char[] { '|', '@' }, StringSplitOptions.RemoveEmptyEntries);
Not that the StringSplitOptions is new to 2.0. If you are still in 1.1, you have 2 choices:
1- filter the empty strings when reading the array.
2- Use Regex.Split instead:
string[] myStrings = Regex.Split(myString, "[\|@]+");
The regular expression means "split on | or @, which may appear one or more times. Unfortunately, the Regex one leaves an empty entry at the end, because your string finishes with the "|@" sequence.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Hi!
What I usually do is to replace the separator strings with single characters that do not otherwise occurr inside the string and then perform a regular Split.
Something like this:
string MyString = "abc|@def|@hij|@klm|@";
string MyNewString = MyString.Replace("|@", "\0");
string[] Parts = MyNewString.Split('\0'); You should get the expected result.
You have to be careful, though: Since your string ends with a separator, you'll get an additional empty string as last entry in your result array!
Regards,
mav
|
|
|
|
|
|
I must admit that I wasn't sure that '\0' would behave nicely until I tried.
But now that I actually tried it there's no real reason why it shouldn't work - .NET strings aren't \0-terminated, so \0 should be a character like every other. Only difference is that you'll have a hard time trying to insert a \0 manually in your text
Regards,
mav
|
|
|
|
|
|
I am writing a program that takes a grid and use its contents to print out a customized printout.
I want the column lengths on my printout to be the same as the column size on screen but my reporting software requires the length in inchs.
How can I convert the column width property of the grid into inchs?
|
|
|
|
|
Then you need to know the resolution of the screen, e.g. the ppi (pixels per inch) value. The most commonly used standard value for this is 96 ppi.
Just divide the length in pixels by the ppi value, and you get the length in inches.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: Then you need to know the resolution of the screen, e.g. the ppi (pixels per inch) value. The most commonly used standard value for this is 96 ppi.
But this is not the same for every computer. You can get the DPI with the DpiX and DpiY properties in the graphics Object.
------------------------------
An bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
hi
I need some small projects or a site where there is a exercise for C# so that i can develope myself in C#.
sasi
|
|
|
|
|
The pick up a book or two on C#. They'll walk you through those first "starting out" apps.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
you can grab this book from MSDN website when you register your copy of C# Express
Microsoft® Visual C#® 2005 Express Edition: Build a Program Now
|
|
|
|
|
I know that you can get ISO 8601 date/time format using DateTimeFormatInfo.SortableDateTimePattern.
From the VS help on DateTimeFormatInfo.SortableDateTimePattern we can get:-
"This code produces the following output.
CULTURE PROPERTY VALUE
en-US yyyy'-'MM'-'dd'T'HH':'mm':'ss
ja-JP yyyy'-'MM'-'dd'T'HH':'mm':'ss
fr-FR yyyy'-'MM'-'dd'T'HH':'mm':'ss"
However, there does not seem to be any mention of the timezone extension. i.e. in the format
YYYY-MM-DDThh:mm:ss±hh:mm
How can I add the ±hh:mm based on the current timezone location.
Thanks,
Liam
|
|
|
|
|
Just add zzz to the format string.
---
b { font-weight: normal; }
|
|
|
|
|
I want my application to start maximised and I want the Maximise(resize) button beside the close X button to be disabled. How would you do this?
In the end we're all just the same
|
|
|
|
|
Set the WindowState (in the properties) to Maximized and the Maximize Box to false but you can change the windowstate stil by doubleclicking on the formheadline. To disable that you have to catch the forms resize event and than set the windowstate to maximized.
Greetings,
Ingo
|
|
|
|
|
i am looking on the net for a long time for an example code that shows how can i resolve Channel in c#.
does anybody know?
thanks.
|
|
|
|
|
I have created a form which will give the user CPU info.
I have a button called "btnCPUInfo" and I want it when clicked to display information on the CPU speed on "txtCPUSpeed" textbox and in "txtCPUCore" This will give the CPU core name. and Finally I want thwn button "btnCPUInfo" is clicked a list box called "lstCPUCore" will populate with the number of CPU cores.
How would you do this?
In the end we're all just the same
|
|
|
|
|
You could start by making use of the PerformanceCounter class provided under the System.Diagnostic Namespace. It gives you control over monitoring yours or a remote machine via a number of performance parameters
|
|
|
|
|
Hello!
I'm wondering if anyone know of an article where you make your own textbox. I don't want to inherit from textbox, I want to do it from scratch. Or an article that goes through something simular.
Thanks in advance!
~~~~~~~~~~~~~~
Martin Lundberg
Student, Sweden
|
|
|
|
|
i think u may need to put a picturebox and draw the character accordinig to the pressed key. but why you want to do it from scratch.
|
|
|
|