|
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.
|
|
|
|
|
I'm doing a payroll system in C#.I have some problems in connecting databases.
My problem is how to make a single connection for the whole application and use it every where.
What will be the best practise of using connections because I'm doing OOP and I'm new to C#.
SO I hope some one will help me.
Thanks in advance.
Jay
|
|
|
|
|
I don't know what business requirement requires you having only one connection for the whole app, but it is not a good idea, especially since you can only have one reader per connection active at any given time. You would probably end up having a bottleneck, there.
The best is to use connection pooling. In ADO.NET, this is done for you. As long as you keep using the same connection string, ADO.NET recycles the connections for you.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
-- modified at 21:10 Wednesday 8th March, 2006
|
|
|
|
|
Hi Jay
What kind of application is that?
Ok.You can use Microsoft's Application Building Blocks. Building blocks is a class library and framework either you can use as it is or you can extend and customize as per your application requirements. Search in MSDN.Blocks are available for different functionalities like Security,DataBase,Error handling etc.Download and give a glance.
M.Sendilkumar
Thomson Corporation
|
|
|
|
|
Jay,
The preferred MS access method is to connect, retrieve multiple rows if possible, and then close the connection. As noted ADO Connection pooling is great for this. If you prefer working with embedded SQL you can definitely use ODBC in this manner: basically create an adapter and fill your dataset. Fundamentally you have to choose the direction you want to go with that makes the most sense to you. Bear in mind the more layers we add to "simplify" our logic isn't always the most straightfoward solution at the end of the day.
Now having a database proxy is another approach. Like the other cases I'd say you definitely need to ditch the one connection approach and support some "configurable" number of connections to allow for tuning. Ideally a proxy would have a multi-threaded or async architecture as the core einfrastructure. You can also build in security as needed. There are plenty of TCP/IP examples on Code Project that do this type of thing. All you would need to do is provide the Glue to make it ft within your world.
I personally use ODBC with MySQL and have found the development to be pretty easy. One of the hassles is the DSN, i.e. do you want to provision it in odbcad32 on each system or... provide some automated form of registry loading? Again here's a cat that has been skinned many times on Code Project.
I'll briefly mention OLE DB which is Micosoft's supplement to ODBC. Basically yet another access method but this one is not aimed at relational databases per se, but if you have to retrive from other data stores such as ISAM files, MS Office Files, then it' worth investigating.
Good luck
Mike Luster
CTI/IVR/Telephony SME
|
|
|
|
|
hi am called brian
first of its not good to use only one connection in your application especially if your application is going to be a mull-ti user.but if it is a single user kind then its ok.
the easiest way of creating connections is
1] go to the solution exp on the right hand side of of the V.S window
and double click on the on the properties link it will open a window that contains the application settings but you select the settings option
then create your connections that is any no you want
eg(connection,ConnectionString,Select the data source)
1)in the first dropdown you create the connection name
2)in the second dropdown you specify the connection type(Connection String)
3)you select the Data source
2]to access them you will use this the following code
//create a variable[connecition]
SqlConnection connection=new SqlConnection ();
//use it to implement he connection string
connection.ConnectioString=Properties.settings.default.ConnectionString;
try that out
|
|
|
|
|
Hi
I wanted to store word documents in my SQL server, so i have stored them as images. Now I want to be able to open these documents after clicking a hyperlnk in a datagrid.
Is this possible? Can someone show me how to do this?
Thanks for your help.
melissa
|
|
|
|