|
i am sorry!! i didn't see that Mr. Martin.
but it seems you are quite good in peeping other's reply
|
|
|
|
|
sam# wrote: i didn't see that
I assumed that.
I forgot to mark it as "Joke"
sam# wrote: Mr. Martin
Come on!
sam# wrote: but it seems you are quite good in peeping other's reply
Really???
|
|
|
|
|
|
you can do it using two events:
1. when mouse down
2. when mouse get off the button range
in step #1, you know that the mouse is down. in step #2 you know that the mouse left the button, then you can stop the thread you started in the first event!
|
|
|
|
|
Wondering if anyone can point me in the right direction, as a starting point, in building a frame accurate High Definition Video player i.e. must be able to control the HDV at the frame level. Have been spending time looking into various SDK's like WMV HD, DirectShow and DirextX with no clear concensus on the correct direction. Any pointers would be apprciated. Thanks
|
|
|
|
|
Hello ,
I have one class in C# which I need to post into messagequeue as an message.
I am using XmlMessageFormatter. Problem is the message posted in to message queue is in Ascii format not unicode. I need it to get posted in unicode format.
Can anyone help it out.
Though attributed my class as [StructLayout(LayoutKind.Sequential , CharSet=CharSet.Unicode)] it didn't work out.
Please suggest me.
thanks,
Sreedevi
-- modified at 8:15 Monday 9th July, 2007
|
|
|
|
|
Hi,
I have a list box with items in format:
1,1
1,2
1,3
..
2,1
2,2
..
Now i want to store the items in two different arrays how can i do that.
Regrads
Sangram
|
|
|
|
|
Hello,
Create two ArrayList's.
Iterate over the Items, split the item with ',' char.
Add the splitted results to the ArrayList's!
All the best,
Martin
|
|
|
|
|
Thanks...
Plz help me with a small code snippet as i am new to this
Regards
Sangram
|
|
|
|
|
|
Actualli I want to store the listbox items into a database.
So I wanted to convert the items in the list box to arraylist.
But I don't know how to this.
|
|
|
|
|
Hi,
I have a small c# console program which is deployed on a network drive in over 100 sites. However when I update the code and redeploy the executable I have to manually phone each user and set the .net framework security on each machine. Is there an easy way around this. Can I write some code top handle this?
Thanks
John
|
|
|
|
|
Have a look at ClickOnce Deployment[^].
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
Hello frnds,
i want to read the mobile no. entered in txtbox digit by digit....
Nisar Inamdar.
|
|
|
|
|
Use the TextChanged event.
Standards are great! Everybody should have one!
|
|
|
|
|
try this :
for(int i=0;i<textBox1.Text.Length-1; i++)
{
MessageBox.Show(textBox1.Text[i].ToString());
}
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
I think you could use the textBox1_KeyDown(object sender, KeyEventArgs e) event for your textbox...here you have e.KeyCode and other more properties that can help you very much.
Just call me Valy...
|
|
|
|
|
(This application is a Pocket PC application)
I have the following problem:
I create a dataset in code and add some rows to it. Then i show these rows using a datagrid.
<br />
<br />
DataSet ds = new DataSet("dataset");<br />
DataTable mytable = new DataTable("vizite");<br />
DataRow dr1, dr2;<br />
<br />
DataColumn dc = new DataColumn("bifat1");<br />
dc.Caption = "bifat1";<br />
dc.DataType = System.Type.GetType("System.Boolean");<br />
<br />
DataColumn dc2 = new DataColumn("bifat2");<br />
dc.Caption = "bifat2";<br />
dc.DataType = System.Type.GetType("System.Boolean");<br />
<br />
mytable.Columns.Add(dc);<br />
mytable.Columns.Add(dc2);<br />
<br />
<br />
dr1 = mytable.NewRow();<br />
dr1["bifat1"] = true;<br />
dr1["bifat2"] = false;<br />
mytable.Rows.Add(dr1);<br />
<br />
dr2 = mytable.NewRow();<br />
dr2["bifat1"] = true;<br />
dr2["bifat2"] = false;<br />
mytable.Rows.Add(dr2);<br />
<br />
ds.Tables.Add(mytable);<br />
<br />
dataGrid1.DataSource = ds.Tables["vizite"];<br />
<br />
This part works the way it should it shows:
+----------+
|True|False|
+----+-----+
|True|False|
+----+-----+
After this i want to change in the dataset all "True" values to "Yes" and all "False" values to "No".
This is how i wanted to do it:
<br />
<br />
int i;<br />
<br />
for (i=0;i<ds.Tables["vizite"].Rows.Count;i++)<br />
{<br />
object cell = null;<br />
string cellstr;<br />
<br />
cell = ds.Tables["vizite"].Rows[i].ItemArray[0];<br />
cellstr = System.Convert.ToString(cell);<br />
if (cellstr == "True")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[0] = "yes";<br />
}<br />
if (cellstr == "False")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[0] = "no";<br />
}<br />
<br />
cell = ds.Tables["vizite"].Rows[i].ItemArray[1];<br />
cellstr = System.Convert.ToString(cell);<br />
if (cellstr == "True")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[1] = "yes";<br />
}<br />
if (cellstr == "False")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[1] = "no";<br />
}<br />
<br />
}<br />
The problem is this code is not doing anything...i cant see the changes. The table is still the same
|
|
|
|
|
Hello,
What does the debugging tell you?
Is the code were you set a value to the Item excecuted?
If yes, maybe you only need a "Refresh()" or "Invalidate()" of the control.
Apart from that:
Use "else if".
string.Equals
Don't always access an Item over the whole Indexer structure (Row actRow)
All the best,
Martin
P.S.:
Just saw that it is your first post here on the forum.
Your question is detailed and has a good subject statement! (But you should use the "pre" Tag for code snippets)
Got my '5' to say: Wellcome!
|
|
|
|
|
The code inside the if is executing i've checked when i debugged the program.
The instructions inside these 'if's are executing as they should
<br />
if (cellstr == "True")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[0] = "yes";<br />
}<br />
if (cellstr == "False")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[0] = "no";<br />
}<br />
<br />
cell = ds.Tables["vizite"].Rows[i].ItemArray[1];<br />
cellstr = System.Convert.ToString(cell);<br />
if (cellstr == "True")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[1] = "yes";<br />
}<br />
if (cellstr == "False")<br />
{<br />
ds.Tables["vizite"].Rows[i].ItemArray[1] = "no";<br />
}<br />
I really don't know what the problem is!
I've tried with this.refresh and this.update too...well i'll try with invalidate too. though i have a feeling it wont work.
...
It doesn't.
|
|
|
|
|
|
This doesn't work either. I don't think that i get no changes because i need to make refreshes.. but i don't know what else should i do or what am i doing wrong.
-- modified at 8:17 Monday 9th July, 2007
|
|
|
|
|
sorry!! i didn't see your code.there are two mistakes.
1. Firstly when you added Column you specified their Type as Boolean and now u r changing the values.
2.when you assign the data source property with out making any table style structure it automatically generate table style for it.
put DataGrid1.TableStyles.Clear() before reassigning data source and then use refresh
|
|
|
|
|
I forgot to mention that i tried with "System.String" too instead of "System.Boolean" but it didn't work either.(used both true as boolean and "true" as string) I'm sorry but i didn't quite understand where should i put that DataGrid1.TableStyles.Clear(). After i add the rows to the dataset and before the 'for' cicle.
|
|
|
|
|
hmm.. i think some part is missing. check the following code .its working fine.in case any confusion please feel free for messaging me
DataSet ds = new DataSet("dataset");
System.Data.DataTable mytable = new System.Data.DataTable("vizite");
//fill data in grid
private void fillGrid()
{
DataRow dr1, dr2;
DataColumn dc = new DataColumn("bifat1");
dc.Caption = "bifat1";
//dc.DataType = System.Type.GetType("System.Boolean");
DataColumn dc2 = new DataColumn("bifat2");
dc.Caption = "bifat2";
//dc.DataType = System.Type.GetType("System.Boolean");
mytable.Columns.Add(dc);
mytable.Columns.Add(dc2);
dr1 = mytable.NewRow();
dr1["bifat1"] = "True";
dr1["bifat2"] = "False";
mytable.Rows.Add(dr1);
dr2 = mytable.NewRow();
dr2["bifat1"] = "True";
dr2["bifat2"] = "False";
mytable.Rows.Add(dr2);
ds.Tables.Add(mytable);
dataGrid1.DataSource = ds.Tables["vizite"];
}
///
/// changes values of grid
///
private void changeValues()
{
for (int i = 0; i < mytable.Rows.Count; i++)
{
if (mytable.Rows[i][0].ToString() == "True")
{
mytable.Rows[i][0] = "yes";
}
if (mytable.Rows[i][1].ToString() == "True")
{
mytable.Rows[i][1] = "yes";
}
}
dataGrid1.Refresh();
}
|
|
|
|