|
i'm not sure, but i think that Thread.IsAlive is a bit dangerous...
msdn says about Thread.IsAlive : "true if this thread has been started and has not terminated normally or aborted otherwise false" so if an exception comes up in your dataprocessing you have a autoResetEvent that signals something and nobody listening.
-- modified at 5:01 Thursday 29th November, 2007
never mind.. Thread.IsAlive does exactliy what it should
you could put the stuff into a console application and do some Console.WriteLines to find out where it actually stops working..
|
|
|
|
|
Hello,
I wish to incorporate some assembly security attributes to my class library. So I add something like this to my class library namespace:
[assembly:System.Net.SocketPermission(SecurityAction.RequestMinimum)]
namespace olapWeb_Controls
{
So on and so forth. Yet I have many classes in my class library - all of them reference the namespace. Apparently I can add permission by simple adding the directives to just one of the classes - but I would rather I added them one central place, rather than in just one class (which might get changed by someone else than me). Adding the same permissions to every single class seems like overkill. What should my best practice be?
Many thanks,
Morten,
Denmark
|
|
|
|
|
How I can add a new created data row in data table...?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
datatablename.Rows.Add(colone,coltow,colthree,......);
Thaer
|
|
|
|
|
Thx for reply.
Suppose I have 10 columns and I want to pass only three values then what to do.?
Also how to manage the identity column of the table....?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Where to pass column name and data type..?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
DataColumn col = table.Columns.Add();
col.ColumnName = "name";
col.DataType = type;
DataRow row = datatablename.NewRow();
row["columnname"] = value;
|
|
|
|
|
|
hi all
i build activex control by using C#.Net but i wount to preview any KeyDown on any control in new control .
the new control is 2 control is the label and textbox ,
i wount to preview any key down on textbox or on label i means any way key is down on any control on my new control .
how i can have any key is down on this control
thank for any body hellp me
Thaer
|
|
|
|
|
Hello together,
is it possible to display into a DataGridViewImageColumn different pictures, for different rows?
I tried it already this way:
looping on each row, getting the DataGridViewImageCell and set the Value-Property to a
new System.Drawing.Bitmap
But it don't work
Thanks for help
|
|
|
|
|
yes you can add columns by datatype image
go to edit columns to thr datagridview and add new column by type DataGridViewImageColumn
welcom mr
Thaer
|
|
|
|
|
Sorry, i think you missunderstand my question.
i need an ImageColumn and in this column, the rows have different images.
For example
Row 1 has a "doc.jpg"
Row 2 has a "mail.jpg"
Row 3 has a "fax.jpg"
Row 4 has a "mail.jpg"
But thanks for help
|
|
|
|
|
Use this
Icon treeIcon = new Icon(Path + "Images\\History.ico");
DataGridViewImageColumn iconColumn = new DataGridViewImageColumn();
iconColumn.Image = treeIcon.ToBitmap();
iconColumn.Name = "ColHistory";
iconColumn.HeaderText = "History";
DataGridView1.Columns.Insert(12, iconColumn);
//Where 12 is location of column number
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to run the CSharp program in Dos window of .NET Framework
|
|
|
|
|
what do you mean by CSharp Program?????
Nothing is Impossible. Even impossible spells "i m possible"
|
|
|
|
|
Do you mean a Console Project?
|
|
|
|
|
Helloooooooooooooooooooo
Yes i mean a console app.
|
|
|
|
|
Hi
In the properties of your project there's an option called "output type" (or something like that..) set it to console application and it will open in a console window.
|
|
|
|
|
If u are using IDE to develop application then, while selecting a new project you can choose the project type. Select a console project type.
If the post/article served your purpose then, please assist me in keeping it up by donating a small amount of money to my Paypal account. Email: sreejithssnair@hotmail.com
|
|
|
|
|
Open a DOS box and run it.
|
|
|
|
|
Hi I've created a Custom Control "YoLabel" with
<br />
SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true);<br />
and drawing it inside OnPaint(...) method. The Control draws itself fine.
Now I need to paint something more from outside the label such as
<br />
YoLabel lbl = new YoLabel();<br />
lbl.Paint += delegate(object s, PaintEventArgs)<br />
{<br />
};<br />
Now the above Event Handler is not firing. Inside YoLabel Control I'm using invalidate whenever Text, Color, etc properties are changed to repaint it.
So what is missing. Please Advice.
Thanks...
|
|
|
|
|
do you call base.OnPaint in your override of OnPaint? the Paint - Event is fired from there.
|
|
|
|
|
Thanks m@u it worked fine...
|
|
|
|
|
Hi,
Sukhjinder_K wrote: YoLabel lbl = new YoLabel();
lbl.Paint += delegate(object s, PaintEventArgs
it seems like you have two YoLabels now, one got added to Form.Controls and paints fine
thru OnPaint, the second one is not part of any Control collection, hence will never
become visible or get its Paint event fired.
You should not create a second YoLabel, you should add your painting delegate to the
Paint event of the existing YoLabel.
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
Thanks for the interest codeproject. I'm creating a YoLabel as
<br />
MyForm : Form<br />
{<br />
MyForm()<br />
{<br />
YoLabel lbl = new YoLabel();<br />
lbl.Paint += delegate(...);<br />
lbl.MouseUp += delegate(...)<br />
<br />
this.Controls.Add(lbl);<br />
this.lbl.BringToFront();
}<br />
}<br />
So I have only one YoLabel...
|
|
|
|