|
really? and you launched it as process (external application) and you can read 170 characters per line from it? because it doesnt work for me.. so maybe the problem is in stream reader? im using this code http://www.codeproject.com/KB/threads/launchprocess.aspx
|
|
|
|
|
Hi,
no, sorry, it is a console app that outputs to a wide console it owns.
if the app is an existing app it may have its own limitations, and/or it may assume
its console is 80 char wide.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I dont think u can set width standard console window in C#, but may be can by C++.
|
|
|
|
|
System.Console has a number of methods (and properties) that may help
SetWindowSize
WindowHeight
WindowWidth
LargestWindowHeight
LargestWindowWidth
But, as Luc said, the app may break lines before the edge of the window.
|
|
|
|
|
Does anyone know how can I possibly update or refresh a combobox that's on another form (or how can I update this form)?
|
|
|
|
|
Is the form part of your project ( I expect not ) ? You can get the handle of the combo box and send it WM_ messages, but it sure is nasty, I would not recommend it
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The form is a part of my project.
I have two forms. One is MainForm, and on it is a databind combobox. There is also a button, and when the user clicks it, it takes him to another form where he can enter some new information and add those information to a datasource to which my combobox is connected to. That information should then be displayed in combobox, but I need to refresh it first, and I have no idea how to do that.
|
|
|
|
|
Ah, OK. Now I understand the question, use a delegate to inform your main form that an event on the subform means it needs to refresh the combo box
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Ok, thanks
|
|
|
|
|
Hello all.
I'm designing a small app that takes a bitmap image as an input, compares it to a database of images, and returns the image it is most similar to.
The matches will not be exact (i.e. they may be of the same subject but at a slightly different angle, zoom, etc.).
What I'd like to know is what aspect of the image you'd suggest to use for this comparison (binary image pixels, histogram, etc.) and how to make a match when the images will not be exact copies.
I'm coding this in C# and any code specific answers would be appreciated as well.
Thanks.
- Alex
|
|
|
|
|
There's a free C# library that does image recognition and motion detection, among other things. The library is called AForge.NET[^]. Perhaps it will help you detect image similarities.
|
|
|
|
|
Thanks Judah. I will check that out.
|
|
|
|
|
Can anyone tell me how I can detect if an item is added/removed/changed in a listbox/combobox? As far as I can see there are no events raised when these changes occur, at least if it does not happen to a selected item.
|
|
|
|
|
yeah, you have to do this yourself, i do this in 2 ways, if i use lots of combobox in my app then i make a component class, inherit the combobox, make my own method that will add the items as well as raise an event too
2nd is useless infront of 1st, it can be use when i have one or 2 combobox
i call my desired method after Add() or Remove() to update it
i hope it will help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i add new database from add new item in visual studio 2005 and trying to insert data in table, i checked connection string, query every thing, but when i press insert button to add data it dont give me any error nor any data is inserted.
PLZ HELP ME
asd
|
|
|
|
|
Wow - what do you expect us to do for you based on that ? How are you trying to insert data ? What sort of database ? What is the connection string ?
For starters, I recommend reading the 'how to ask questions' sticky on the top of the forum.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i m inserting in sql server express edition 2005 which i selected from add new item in visual studio 2005, i can view data in grid, but when i m trying to insert data it dont give me any error but it is not adding the data in table
SqlCommand admin_comm = new SqlCommand("insert into P_analysis values (@pid, @p_price, @p_date, @opd, @pdp, @rin, @rip, @ord, @p_name, @r_name)", admin_conn);
admin_comm.Parameters.Add("@pid", SqlDbType.Int);
admin_comm.Parameters["@pid"].Value = int.Parse(s1);
admin_comm.Parameters.Add("@p_price", SqlDbType.Int);
admin_comm.Parameters["@p_price"].Value = int.Parse(s2);
admin_comm.Parameters.Add("@p_date", SqlDbType.SmallDateTime);
admin_comm.Parameters["@p_date"].Value = s3 ;
admin_comm.Parameters.Add("@opd", SqlDbType.SmallDateTime);
admin_comm.Parameters["@opd"].Value = s4;
admin_comm.Parameters.Add("@pdp", SqlDbType.Int);
admin_comm.Parameters["@pdp"].Value = int.Parse(s5);
admin_comm.Parameters.Add("@rin", SqlDbType.VarChar);
admin_comm.Parameters["@rin"].Value = s6 ;
admin_comm.Parameters.Add("@rip", SqlDbType.Int);
admin_comm.Parameters["@rip"].Value = int.Parse(s7);
admin_comm.Parameters.Add("@ord", SqlDbType.SmallDateTime);
admin_comm.Parameters["@ord"].Value = s8;
admin_comm.Parameters.Add("@p_name", SqlDbType.VarChar);
admin_comm.Parameters["@p_name"].Value = s9;
admin_comm.Parameters.Add("@r_name", SqlDbType.VarChar);
admin_comm.Parameters["@r_name"].Value = s10;
admin_conn.Open();
admin_comm.ExecuteNonQuery();
admin_conn.Close();
asd
|
|
|
|
|
Wrap the whole thing in a try-except block and see what error you get, if you get any that is.
Your query isn't in the right format either.
Example: Table: RegistrationInformation Column: PlayerName
Query would be:
INSERT INTO RegistrationInformation (PlayerName) VALUES (@PlayerName)
NOTE: @PlayerName can be whatever you want it to be, this is how you reference it in SQLCommand.Parameters
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I believe you can just specify values, but I agree it's not wise to do so.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Maybe, I am so used to doing it now it just looks weird without it. Now that I think of it I think you can as long as you understand that it will just start at the first column and goes as far as it can with the given information. And with that implementation I can see many issues
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Expert Coming wrote: And with that implementation I can see many issues
Oh, I agree 100%. Better to say what you want, instead of hoping it works itself out.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hhani wrote: int.Parse(s5);
NEVER do this. Use int.TryParse, so your code will never blow up.
I guess this means you can't use client tools to enter SQL direct to the DB and make sure the SQL works ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It looks like you are just now starting a project... How could you possibly be at an emergency state yet? Your not even in production. We would love to help, but quite frankly, I, and probably most others could care less if you had an emergency or needed something urgently.
Now, give more information.
Is this a form, or web application?
What kind of database?
How about some sample code?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
m inserting in sql server express edition 2005 which i selected from add new item in visual studio 2005, i can view data in grid, but when i m trying to insert data it dont give me any error but it is not adding the data in table
SqlCommand admin_comm = new SqlCommand("insert into P_analysis values (@pid, @p_price, @p_date, @opd, @pdp, @rin, @rip, @ord, @p_name, @r_name)", admin_conn);
admin_comm.Parameters.Add("@pid", SqlDbType.Int);
admin_comm.Parameters["@pid"].Value = int.Parse(s1);
admin_comm.Parameters.Add("@p_price", SqlDbType.Int);
admin_comm.Parameters["@p_price"].Value = int.Parse(s2);
admin_comm.Parameters.Add("@p_date", SqlDbType.SmallDateTime);
admin_comm.Parameters["@p_date"].Value = s3 ;
admin_comm.Parameters.Add("@opd", SqlDbType.SmallDateTime);
admin_comm.Parameters["@opd"].Value = s4;
admin_comm.Parameters.Add("@pdp", SqlDbType.Int);
admin_comm.Parameters["@pdp"].Value = int.Parse(s5);
admin_comm.Parameters.Add("@rin", SqlDbType.VarChar);
admin_comm.Parameters["@rin"].Value = s6 ;
admin_comm.Parameters.Add("@rip", SqlDbType.Int);
admin_comm.Parameters["@rip"].Value = int.Parse(s7);
admin_comm.Parameters.Add("@ord", SqlDbType.SmallDateTime);
admin_comm.Parameters["@ord"].Value = s8;
admin_comm.Parameters.Add("@p_name", SqlDbType.VarChar);
admin_comm.Parameters["@p_name"].Value = s9;
admin_comm.Parameters.Add("@r_name", SqlDbType.VarChar);
admin_comm.Parameters["@r_name"].Value = s10;
admin_conn.Open();
admin_comm.ExecuteNonQuery();
admin_conn.Close();
plz plz tell thankss
asd
|
|
|
|
|
Check the properties of your database (Right click the name of your database in Solution Explorer) and set the property of "Copy to output" to "Copy if newer".
If that doesn't work, manually copy your database and paste it in the debug folder of your project.
Hope this helps
|
|
|
|
|