|
For a short horrible moment I though I saw a goto statement... wait... arghhh... I did see a goto statement!
You MIGHT want to have a look at the "while" keyword
|
|
|
|
|
OMG -- this is the worst example of programming I've seen since I taught class.
Keshav V. Kamat wrote: i did this because I wanted to store the substrings in a separate array.
Your code does no storing of anything in any array whatsoever! And it is quite an expensive set of code. Doing this:
string Val = "a,b,c,ddd,e"
string values[] = Val.Split(',');
...will take your input string, split out the values into an array, remove the comma, and it's length represents the number of comma-delimited words in it. You end up with an array that looks like this:
a
b
c
ddd
e
and the number of values is values.Length which is 5 -- and the number of commas is values.Length - 1 which is 4. Likewise if there are no ',' in the string, then values contains just the first instance of the string with an array length of 1.
|
|
|
|
|
If we set a control's autoscroll to be true, it will autoscroll on both x, and y directions. How can I make it only autoscroll in one direction, say up and down?
Thanks
|
|
|
|
|
Hi,
I'm trying to find a control that will have the functionality of a shortcut bar (like the Toolbox bar in VS.Net - you click on the category "Windows forms" and it slides and shows all the components) but that will allow me to put various controls on it (like the TabCtrl does). Is there something like this already available? Maybe part of a .Net controls library sold by somebody?
Any suggestions?
thanx
|
|
|
|
|
hi
i use access db and vs2005.
my problem is : i want in dataGridView_SelectionChanged event show fields of my database in some controls like textbox . i done this work and i gave good result . but when i delete a record in runtime the following error shown me:
Deleted row information cannot be accessed through the row.
i use datarow for add,update,delete row and use oledbdataadapter and use this
code to access fields of database and show it in some controls :
private void dataGridView1_SelectionChanged(object sender, DataGridViewCellPaintingEventArgs e)
{
if (this.BindingContext[ds_khane1, "Khaneh_1"].Position == -1)
return;
else
{
DataTable dt = ds_khane1.Tables["Khaneh_1"];
DataRow newrow = dt.Rows[dataGridView1.CurrentCell.RowIndex];
txt_name.Text = newrow["name"].ToString();
txt_family.Text = newrow["family"].ToString();
...
}note : i was use dataGridView1_CellPainting event and solved my problem,but why the above error shown me in dataGridView1_SelectionChangedevent and how to solve problem ?
thanks.
|
|
|
|
|
how make column in datagraid as A comboBox??
fatma
|
|
|
|
|
Hello
One common misunderstanding that occurs here in the form is considering DataGridView and DataGrid as synonyms. They are not the same. Which exactly are you using?
I'll still assume that you use the old DataGrid :
Revise DataGrid.TableStyles property and DataGridColumnStyle class in your MSDN. Though I strongly recommend that you use DataGridView instead.
Regards
|
|
|
|
|
I am trying to launch the winzip.exe application from within my application and when I use the System.Diagnostics.Process method It errors out.. can someone please provide me with a simple shell of code that would accept the winzip.exe application name and file path, src file and dest file and a waitPeriod param. I really need this
I am using C# 2005 studio express.
Thanks
mrcaston@webcust.com or
marselle.r.caston@jpmchase.com
MRC
|
|
|
|
|
Hello
I suppose you write it like this:
Process.Start(@"C:\Program Files\Winzip\Winzip.exe %1 MyFile.zip");
or something similar? Instead, only write the zip file name:
Process.Start("MyFile.zip");
and the windows explorer will launch the default program associated with that file type -usually will be Winzip-.
Regards
|
|
|
|
|
Hi
Use this one.
process1.StartInfo.FileName="C:\\Program Files\\Winzip\\Winzip.exe";
process1.StartInfo.Arguments="Myfile.zip";
process1.Start();
enjoy!!!
<marquee>nishu
|
|
|
|
|
How to change the color of the complete row in my datagridview?
1. read the information from a file //DONE!
2. fill the cells with information //DONE!
3. add the cells to the row //DONE!
4. add the row to the datagridview //DONE!
5. display the datagridview //DONE!!
This is what should be done:
if the cell[0] Value == "FALSE"
set the row backgroundcolor to red
think this has to be done between step 3 and 4.
Would appreciate every hint.
Thx,
Ezazazel
|
|
|
|
|
Hello
Try changing DataGridView.Rows[X].DefaultCellStyle.BackColor for that row.
Regards
|
|
|
|
|
There is a property called AlternativeColor, i think. That property makes every second row a different color.
|
|
|
|
|
Is there an implementation for CORBA in Visual Studio 2005 / especially C# (free- or gnu would be perfect)
If yes, where can I get it?
Thx,
Ezazazel
|
|
|
|
|
You mean like this[^]?
Sorry... I cheated and used Google.
led mike
|
|
|
|
|
found the same one but it cannot be downloaded
I do use google...
|
|
|
|
|
ezazazel wrote: but it cannot be downloaded
I downloaded it with no problem.
led mike
|
|
|
|
|
no, not for me - not a single link works, always 404 error
could you plz post your dl -link
thx
|
|
|
|
|
at the bottom of the page it says:
Remoting.Corba development is hosted on SourceForge at http://sourceforge.net/projects/remoting-corba/ .
led mike
|
|
|
|
|
|
I would like to show a VC8 C# Form inside a VC6 C++ MDI application. Is this possible? If so can anyone refer me a web-site as to how this is done? I am thinking about creating a C# DLL that can be loaded into the VC6 C++ MDI application that can return Child window.
Chris
|
|
|
|
|
I want to write a program in c# with this feature:
program call to a phone number and when phone have been answered,play a sound message(Wave file)for it.
please guide me how can i do it?
|
|
|
|
|
Hello
This will involve 2 parts:
1- Calling the phone : You will be using something calld TAPI 3.0 to do it.
2- Playing the audio stream to the modem's voice line: You'd use DirectX to do it.
Search CodeProject's articles section for details.
Regards
|
|
|
|
|
Excellent and Great. I really did not know that dialing phone call was so easy with C#. I already found a nice article in CodeProject for using TAPI.
http://www.codeproject.com/cs/internet/devangpro.asp[^]
Before I was harvesting for articles in google about dialing phone using C# and I did not know the right keyword and I ended up with some commercial libraries which was sooo expensive like starting from 1000US$.
By the way,
Nader Elshehabi wrote: 2- Playing the audio stream to the modem's voice line: You'd use DirectX to do it.
-- Why do I need so complicated solution to play audio stream to the modem's voice line ( I mean, using DirectX). Should not there be some easy windows method to play mp3 files directly to Modem's Voice line ?
Do you know any article which describe How to play mp3 files or direct Microphone line to Modem's voice line ?
Regards and thansk always
As you are the best friend for all C# coders in this forum.
Emran
|
|
|
|
|
Hello
Well, now we know TAPI could save someone 1000$. This could work as a commercial .
Playing audio directly to any audio line using DirectX sound reasonable, doesn't it? It's all I can think of.
About the article try this[^]. I don't think it considers modem voice line, but it discusses audio lines in general. If it doesn't work, hint me and I'll investigate more.
Extra Regards
|
|
|
|