|
I would do the conversion to an integer inside the else branch. If the conversion goes wrong you could throw another exception there telling that the DefaultRoleForNewUser exists but is invalid.
www.troschuetz.de
|
|
|
|
|
What exception must I try and catch?
|
|
|
|
|
|
sam_g1 wrote: I don’t know how to use the show the aero..
Could you explain as to what an AERO is?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
hi
in the class library i am using filereaders,fileinfo,filestreams for reading and writing files for source and destination paths but i am getting error near the filereaders,filestreams "namespace or assembly missing" .Even if i use System.IO it still gives me an error.
Any solution for the above problem
sasi
|
|
|
|
|
Look at the error message, it will tell you exactly what class it has problems with. Then you look up the class in MSDN Library[^], there you will see what namespace the class is in.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I hope I'm not the only one hit by this: in some window forms I have a DataGridView having a DataSet (filled from a select) and AutoSizeColumnMode set to Fill. Before the form is showing up I get an unhandled exeption message with "This operation cannot be performed while an auto-filled column is being resized" - I have no clue about what operation we talking about and the exception is thrown randomly (and never if step through the application in debugger). If click Continue everything is OK, the form comes up filled, aligned and resized.
Somebody please give me a hint.
|
|
|
|
|
HI
how can add a object for example a line object to report in running mode ?
Regards Amir Jalaly
|
|
|
|
|
Hi,
I have a Win Form with a Main Menu, and I need to open one of these menu options via code.
I'm trying to password protect a menu. I've got it set up so that when a user selects a particular menu option, a Form pops up asking for a password. The trick is to open the menu without a select event happening (after the password is verified).
If you know of a better way to go about this, that would be great. I could have all the SubmenuItems Enabled=false by default and then change to true, but I think it would be better not to show the SubmenuItems at all.
Thanks,
Ron
|
|
|
|
|
Hi!
Simply set the Visible property of the menu items in question to false and change it to true once the password has been verified...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Thanks Mav,
I put the menu as not enabled. I didn't think that you could have a click event on an unenabled menu... but you can. When the password is verified, the menu becomes enabled.
Ron
|
|
|
|
|
Hai Everybody,
I have project it is related to resume presently it is a window based application. They need to change it has a web application, In that they have a feature called (Automation of scanning a document and put the information in the match field) like when we scan a certain resume it might be in any format, but it will collect the information from resume eg., name and put it in the name field on the screen. How is it possible if u have any idea plz let me know or from u r friends.
Please do Needful..............
Advance Thanks
Srinivas.N
|
|
|
|
|
Do you mean scanning a the resume on a paper using a scanner?
If yes then you could always scan a document and store it in word format, then use the Word API to read the contents of the file and store them in your native format.
Hope this helps.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
hi all,
I need to split below string using another string " "
MINIMUM STAY:
NILL
MAXIMUM STAY:
1M
DATE/ROUTE CHANGES:
REBOOKING
Before departure - Charge GBP30
After departure - Charge GBP30
when I am doing like this
string[] lparr=lstrFileContent.Split(" ".ToCharArray());
when I am doing like this, string spliting it using char '<','H','R','>'.
But I need to split using whole " ".
So can any one please tell me how to split a string using another string?
thanks in advance.....
|
|
|
|
|
public String[] ConvertString(string Str)
{string [] StrArray = Str.Split(new Char [ ] {'H'});
return StrArray;
}
the only thing is, this splits a string into an array,
you could then pluck out each of the values out of the array
|
|
|
|
|
If you are using the .net 2.0 framework you can use the following call:
string[] lines = "Line1<HR>Line2".Split(new string[] { "<HR>" }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
You could replace the string "<HR>" with a single character that's not used elsewhere (even '\0' works, btw.) and then use a regular string.Split with the substitute character:
string tmp = lstrFileContent.Replace("<HR>", "\0");
string[] lparr = tmp.Split('\0');
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Nice, I like this idea, should come in handy when working on .net 1.1
static string[] Split(string stringToSplit, string seperator)
{
char sep = '\0';
while (stringToSplit.IndexOf(sep) >= 0)
{
sep++;
}
stringToSplit = stringToSplit.Replace(seperator, sep.ToString());
return stringToSplit.Split(sep);
}
Usage:
string test = "Split this<HR>here";
string test2 = "Split here<HR> but ignore\0 null<HR>\x01 yea";
string[] lines = Split(test, "<HR>");
string[] lines2 = Split(test2, "<HR>");
|
|
|
|
|
hey CP (codeproject), greetings. I would love for someone to help me develop a class that can send bytes of audio information thru a stream and also read bytes from it and play it.
ian Munez developed a recording and playback loop class but i dont know how to apply it to the network stream.
i already setup the streamingf session. all i want to know is how to send the bytes from the microphone buffer, and alos how to play buffer from the network stram thru the playback buffer. thanks
|
|
|
|
|
Don,
Are you trying to say read a MP3/WAV/mulaw/AdLaw type file and stream it to some player? If so then first I have to ask is what kind of codec are you planning to use, what kind of hardware are we talking about. This is a reasonable complicated proposition because of the size of technical specifications on the various file formats. So for one, you are probably best served by choosing a single file format to tackle.
When you can fufill the basic requirement of reading the file and writing out a viable copy, then you are ready to apply the streaming. I also have to ask you is this an application you might consider using SIP for? And by the same token if you are using a Dialogics card, or other commercial kit, the SDK should provide the tools to get you going. At this point however I lack enough information to be of any really help.
Good luck
Mike
Mike Luster
CTI/IVR/Telephony SME
|
|
|
|
|
i am using Notify icon control. everything is working fine except when i run the program notify icon appears in taskbar. when i close the program it doesn't go from there , agian run the program now there are two icons , ever time i run the program icons icreases but i keep mouse over the icons .icons remove automatically. i didn't understand why this is happning.
i would like when i close the program icon remove form taskbar automatically.
please help me out
Amit Grover
CDAC R&D
|
|
|
|
|
Even i am facing the same problem
When i close the application from the cross button of the form
i have disposed the Notify icon so that time it goes off
but if i stop the program execution from the studio
the Notify icon stays in the TaskBar
Please explain me if anyone knows the reason behind it
Regards,
Pramod
|
|
|
|
|
Chk this out
http://www.codeproject.com/csharp/trayiconmenu01.asp
|
|
|
|
|
Hi,
I have an application where we type into a text box and this gets copied into 80 grid cells.
The application cannot keep up with a fast typist because of the number of copy operations.
Hence the Keyboard hardware event gets the keypress and sticks it in the keyboard buffer.
The TextBox.TextChanged event is then fired and copies the text into the grid.
But the TextChanged event gets behind the typist.
If only I could test the keyboard buffer to see if there are any pending keypresses, I could just ignore the TextChanged event as long as there were more keypresses coming through.
(unless the next keypress was a tab).
When we were doing DOS stuff we could do this and the VS-8 Console does have this facility.
In Windows forms there must be a similar facility, but the only thing I can find that seems similar is the .SendKeys.Send();
Does anybody know how I can check if there are windows forms keypresses in the queue?
Philip Best BSc(CompSc) AscDipEng(Elec)
C# SQL Software Developer & Electrical Engineer
mailto:phil@StrategyMap.com.au
www.StrategyMap.com.au
|
|
|
|
|
I am writing some window forms that involves with MDI...
There are 5 different forms...
Form 1 = parent form
Form 2 = Child Form (with 3 different buttons in it to activate other 3 forms (form 3, 4, or 5)
Form 3 = some stuff
Form 4 = Some stuff too
Form 5 = some stuff too too
ok What was going to happen is that the Form 1 would initially open up, while Form 2 as a child window to appear inside the working area of Form 1.
What I would like to do is that one of the button like Form 3 to be clicked. At this point, the Form 2 would close and show Form 3 child window inside the working area of Form 1.
Now the question is that can the parent window tell which button on the Form 2 child window was being pressed so the parent form can close the existing child form and bring up the appropriate child form? If so, how is this done?
I have developed the software in C# in the past but want to improve my software that would involve with MDI.
|
|
|
|