|
|
CP means Code Project (this is the website you are on when reading this text... .
www.thomas-weller.de
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Programmer - an organism that turns coffee into software.
|
|
|
|
|
Dlsoft (www.dlsoft.com) sells an adequate barcode tool. Their technical support is very helpful if you have problems.
|
|
|
|
|
in my application i have some 4-5 tabs. what i need is on a button click the tab containing the ACtiveX control should be selected and the shared screen should be shown. the problem comes when i click on the button the corresponding tab is shown but gives an error of InvalidStateException. Maybe the ActiveX control needs some time to load .... becz if i am putting a message box there it works fine.
is there some way in which i can wait or check until the control has been loaded.
|
|
|
|
|
i am unsing ADONET for my database. What's happening and how to solve it if i have error :
1.Database: Object reference not set to an instance of an object
2.Data type mismatch in criteria expression.
3.The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data
Thanks.
|
|
|
|
|
1 - fix your code. This means an object is null. Can't say more without seeing code
2 - fix your code. You're trying to compare objects of different types. Perhaps missing quotes from a string ?
3 - Fix your code, specifically make your code not accept data that's longer than the DB column will accept, or make the DB column bigger.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi all I have a combo box with display member and value member
but all the value contain a unicode and all the unicode contain the character '\'
when i retrive the value from the combobox it's return to me the unicode with "\\" and it is't fell my requirment
who can i solve that.
KimoKono
|
|
|
|
|
None of this makes any sense. All strings in C# are unicode. I think you need to post your code so we can see what you're doing wrong.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
thanks Christian for ur attetion
i used the unicode for arabic letters my friend
here is my code
int Counter = 0;//looping throught the string
int CountAllLetter = 0;
int CountInFirst = 0;
int CountInMiddle = 0;
int CountInLast = 0;
//-------------------------------------
string Qurantext = " " + Txt_search.Text.ToString() + " ";
string LettertoUnicode = string.Empty;
//-------------------------------------
CharEnumerator charEnum = Qurantext.GetEnumerator();
while (charEnum.MoveNext())
{
LettertoUnicode = Convert.ToString(Qurantex[Counter]);
//here is my problem
stringletterunicode=@Cmbletters.SelectedValue.ToString();
if (LettertoUnicode == letterunicode)//"\u0645")
{
// To Increment the letter in all text
CountAllLetter++;
charEnum.MoveNext();
//Before the letter space
string checkfirst = Convert.ToString(Qurantext[Counter - 1]);
if (checkfirst == " ")
{
CountInFirst++;
}
//this string to check if the letter in the last word by checkin the next letter if it space
string checklast = Convert.ToString(Qurantext[Counter + 1]);
if (checklast == " ")
{
// To Increment the letter in the last
CountInLast++;
}
// in the middle
if (checkfirst != " " && checklast != " ")
{
CountInMiddle++;
}
}
Counter++;
Kareem Elhosseny
|
|
|
|
|
What is Qurantext ? If it's a string, why not use the contains method to look for substrings ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
its a string comming from a textbox
Kareem Elhosseny
|
|
|
|
|
OK, so why not use the methods built into the string class to look for substrings ? I think your issue is how convoluted the code is.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I don't get it. What are you trying to do? Why do you deal with unicode issues at all?
Regards
Thomas
www.thomas-weller.de
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Programmer - an organism that turns coffee into software.
|
|
|
|
|
dear friends thanks for ur attention
i know will C# supported the unicode but i make a comparison for fonts
with unicode
its just a Statistics task
Kareem Elhosseny
|
|
|
|
|
how to create a Clip from a WMV file where user will define the starting and end position of the Clip.
Actually i have to create Functionality as of VCD Cutter.
Regards Rishi
|
|
|
|
|
You'll probably find that DirectX has what you need to do this, but managed DX almost certainly does not, you'll need to interop with DX or use a third party wrapper.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Christian Graus
can u please tell abt any such Third Party wrapper that can be used with C#.
i had tried a dozen but did't find useful.
Regards
Rishi
|
|
|
|
|
|
Hi all,
I am getting null exception in try block.
what i want to do is:
not breaking the normal execution and run the next line of code.
dont know what to do?
please help me.
thanks in advance
Preetpal Kaur Parhar
|
|
|
|
|
The easiest way is usually to check for null before trying to use the reference.
I don't think that it's useful to be more specific than that without seeing any actual code.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
thanks a lot...
but i have thought of this way before.
and the thing is i have around 20 of fields n i cannot put the check before everything.
so need to do something which applies to all.
can u please guide me little more?
|
|
|
|
|
You have no other choice but to fix your code. You cannot jump back into a try block, your other option is to put a try block around each attempt to assign, and it sounds in general like you're overusing try blocks to allow you to write bad code.
One thing you can do, is write a helper method that takes two values and does the null check and only assigns if it's not null, and call this method 20 times.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If you apply something to all the code, it can't apply to each of the fields. To handle an exception separately for each field, you would need a try...catch for each of them, which would be a lot more code than checking for a null reference if it's done correctly.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
preetpal wrote: i cannot put the check before everything.
Why not??
There might be another way, depending on your concrete situation. But if it appears that sth. can be null, you simply have to check for it. No escape, no excuse. Everything else is just incorrect code!
Regards
Thomas
www.thomas-weller.de
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Programmer - an organism that turns coffee into software.
|
|
|
|
|
Provide the code that is causing the problem and someone may be able to help you better.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|