|
Try
string sInsert = "insert into temp11 values ('This is my test data''s ')";
|
|
|
|
|
You should use parameterized queries to do this.
They are far less prone to SQL injection attacks and don't have problems with special characters inside your query strings, too.
Regards,
mav
|
|
|
|
|
Hi,
I know vertical length,horizontal length and sweep angle. with these inputs i am calculating radius,height and chordlength. But i am not able to fix Rectangle co-ordinates (assuming x=100, y=250).
My calculation is this:
p1 = x- (r+length/2);
p2= y - (r + length/2
p3 = r * 2;
p4= r * 2;
But this is not working
Can any one help me.
Regards,
-- modified at 5:52 Monday 12th September, 2005
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
my rectangle co-ordinates are wrong. my arc is not coming properly. this is the code.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace FreeHand
{
///
/// Summary description for FillPolygon.
///
public class FillPolygon : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox lengthBox;
private System.Windows.Forms.TextBox angleBox;
private System.Windows.Forms.Button button1;
public Graphics m_GraphicsToDrawOn;
protected Pen m_PenToDrawWith;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox Vertical;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public FillPolygon()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
InitializeGraphics(this);
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
[STAThread]
static void Main()
{
Application.Run(new FillPolygon());
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.lengthBox = new System.Windows.Forms.TextBox();
this.angleBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.Vertical = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lengthBox
//
this.lengthBox.Location = new System.Drawing.Point(776, 104);
this.lengthBox.Name = "lengthBox";
this.lengthBox.TabIndex = 0;
this.lengthBox.Text = "30";
//
// angleBox
//
this.angleBox.Location = new System.Drawing.Point(776, 136);
this.angleBox.Name = "angleBox";
this.angleBox.TabIndex = 1;
this.angleBox.Text = "270";
//
// label1
//
this.label1.Location = new System.Drawing.Point(648, 104);
this.label1.Name = "label1";
this.label1.TabIndex = 2;
this.label1.Text = "Horizontal";
//
// label2
//
this.label2.Location = new System.Drawing.Point(648, 136);
this.label2.Name = "label2";
this.label2.TabIndex = 3;
this.label2.Text = "Angle";
//
// button1
//
this.button1.Location = new System.Drawing.Point(792, 192);
this.button1.Name = "button1";
this.button1.TabIndex = 4;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(776, 64);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 5;
this.textBox1.Text = "0";
//
// label3
//
this.label3.Location = new System.Drawing.Point(648, 64);
this.label3.Name = "label3";
this.label3.TabIndex = 6;
this.label3.Text = "Rotate At";
//
// Vertical
//
this.Vertical.Location = new System.Drawing.Point(376, 72);
this.Vertical.Name = "Vertical";
this.Vertical.Size = new System.Drawing.Size(152, 20);
this.Vertical.TabIndex = 8;
this.Vertical.Text = "20";
//
// label4
//
this.label4.Location = new System.Drawing.Point(240, 72);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(72, 24);
this.label4.TabIndex = 9;
this.label4.Text = "Vertical";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// FillPolygon
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(936, 389);
this.Controls.Add(this.label4);
this.Controls.Add(this.Vertical);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.angleBox);
this.Controls.Add(this.lengthBox);
this.Name = "FillPolygon";
this.Text = "FillPolygon";
this.Load += new System.EventHandler(this.FillPolygon_Load);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.FillPolygon_Paint);
this.ResumeLayout(false);
}
#endregion
protected void InitializeGraphics(Form canvas)
{
IntPtr formHdc = canvas.Handle;
m_GraphicsToDrawOn =Graphics.FromHwnd(formHdc);
m_PenToDrawWith = new Pen(Color.Red);
}
int horilength=0 ;
int verticallength=0;
int length = 0;
float angleDeg ;
float angleRad;
int x=100;
int y=150;
int x1=300;
int y1=250;
int r=0;
int h=0;
private double ang = 45.0f;
private void button1_Click(object sender, System.EventArgs e)
{
horilength = int.Parse(lengthBox.Text);
verticallength = int.Parse(Vertical.Text);
length =(int) (Math.Sqrt(Math.Pow(horilength,2)+(Math.Pow(verticallength,2))));
//angleDeg = Math.Max(0.0f, Math.Min(90.0f, float.Parse(angleBox.Text)));
angleDeg = float.Parse(angleBox.Text)/2;
angleRad = angleDeg * (float)(Math.PI / 180);
ang= (float)Convert.ToDouble(textBox1.Text);
//ang = Math.Tanh((verticallength/horilength)*3.14/180);
//Graphics g = this.CreateGraphics();
//Pen pen = new Pen(Color.Red, 1);
// get circle radius
r = (int) (((double) length / 2) / Math.Sin(angleRad));
//
h = (int) (Math.Cos(angleRad) * r);
// draw arc
this.Invalidate();
}
protected override void OnPaint(PaintEventArgs e)
{
int p1=0;
int p2=0;
int p3=0;
int p4=0;
float st=0;
float sp=0;
this.textBox1.Text = Convert.ToString(ang);
Point rotatePoint;
if(r!= 0)
{
// p1 = x - (r + length /2);//(r + length/2);//+int.Parse(ang.ToString());
// p2= y - (r + length /2);//(r + length/2);
p1 = x - (r - length /2);
p2= y - ( r - h);
p3 = r * 2;
p4= r * 2;//(int)Math.Sqrt(Math.Pow(length,2)-Math.Pow( r,2)) ;
st= -45 + angleDeg;
sp= -2 * angleDeg;
//e.Graphics.DrawLine(m_PenToDrawWith, x, y, x-length, y-length);
e.Graphics.DrawLine(Pens.Blue,50,y,x,y);
e.Graphics.DrawLine(m_PenToDrawWith, x, y, x+horilength, y);
e.Graphics.DrawLine(m_PenToDrawWith, x+horilength, y, x+horilength, y+verticallength);
e.Graphics.DrawLine(m_PenToDrawWith, x, y, x+horilength, y+verticallength);
//e.Graphics.DrawLine(Pens.Green,50,250,100,250);
//e.Graphics.DrawLine(Pens.Green,50,250,100,325);
rotatePoint = new Point(x,y);
//e.Graphics.DrawRectangle(Pens.Black,p1,p2,p3,p4);
Matrix myMatrix = new Matrix();
myMatrix.RotateAt((float)ang, rotatePoint, MatrixOrder.Append);
// myMatrix.Rotate(ang, MatrixOrder.Append);
e.Graphics.Transform = myMatrix;
// e.Graphics.DrawRectangle(Pens.Black,p1,p2,p3,p4);
Rectangle rect= new Rectangle(p1,p2,p3,p4);
//e.Graphics.DrawRectangle(Pens.Red,rect);
//upper side
e.Graphics.DrawArc(Pens.BlueViolet ,rect ,st ,sp);
//
// if(angleDeg *2 <180)
// {
//
// angleDeg=180-(angleDeg *2 );
// rect= new Rectangle(p1,p2-Convert.ToInt32(angleDeg),p3,p4);
//
// }
//e.Graphics.DrawArc(Pens.Black ,rect ,st ,sp);
//Second Arc
//
// e.Graphics.DrawLine(Pens.Green,x1-50,y1,x1,y1);
// p1 = x1 - (r - length / 2);//+int.Parse(ang.ToString());
// p2= y1 - (r - h) ;
//
// if(angleDeg *2 < 180)
// {
// p2=p2-(180- Convert.ToInt32(angleDeg)*2);
// rect= new Rectangle(p1,p2,p3,p4);
// }
// e.Graphics.DrawRectangle(Pens.Red,rect);
// e.Graphics.DrawArc(Pens.Black ,rect ,-st ,-sp);
// Create pen.
//Pen blackPen= new Pen(Color.Black, 2);
// Create coordinates of rectangle to bound ellipse.
// float y1 = 0.0F;
//float width = r*2;
//float height = r*2;
// Create start and sweep angles on ellipse.
// Draw arc to screen.
//e.Graphics.DrawArc(blackPen, x1, y1, width, height, startAngle, sweepAngle);
}
//m_PenToDrawWith.Dispose();
//m_GraphicsToDrawOn.Dispose();
}
private void FillPolygon_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
}
private void FillPolygon_Load(object sender, System.EventArgs e)
{
}
private void label4_Click(object sender, System.EventArgs e)
{
}
}
}
|
|
|
|
|
Hello everybody,
I've got a form with multiple usercontrols which contain some textboxes. Is it
possible to adjust the tabindexes so it can hop from the textbox in the one control
to another and back. I tried something like this.
this.usercontrol1.textbox1.tabindex = 1
this.usercontrol2.textbox1.tabindex = 2
this.usercontrol1.textbox2.tabindex = 3
but this doesn't work. Can anyone tell me whether it is possible to do something like
this and how to achieve that.
With kind regards
Joris
|
|
|
|
|
This code works if u write it in the gotfocus event of the form. Does not work when written in the load event
|
|
|
|
|
I have a project by SampleApp with 4 usercontrol.cs files with it.
3 of them with same namespace Sample1.Other usercontrol by "SampleApp" with namespace Sample2.The 3 user controls are used in the SampleApp.I have built the project.
I have a TestApp of outputtype Windowsapplication where i wanted to place the SampleApp.dll by adding it in to the tool box.when i place the .dll on to the form,i am getting an exception as
Sample2.SampleApp error 'Specified cast is not valid'
Can anyone please let me know why i am getting this error.
Thanks & Regards
Lakshmieie
|
|
|
|
|
I'm trying to understand how the .NET framework manages memory and I've been using various profiling tools but there are still a few things that don't add up that maybe someone here can help me with. I've been using primarily devPartner studio with a sample project just to test a few things out.
Let's start with the simplest of examples. If I create a loop that calls a dummy function that does nothing, something just to occupy memory, after the garbage collector runs a small amount of memory remains occupied. Granted it's only 324 bytes, but it should be 0 bytes and I need to figure out why. DevPartner Studio tells me I have 7 unreachable objects for a total of 208 bytes. My question is that if the garbage collector just ran, why are there any unreachable objects left? The rest of the memory (116 bytes) is occupied by an object array named "String Table" that I presume .NET was using to keep track of the strings I was allocating to consume memory. Seems the string array is no longer needed it would make sense if it were garbage collected, but if .NET wants to keep it around it really not a problem. At least that behavior is explainable. The 208 bytes of unreachable objects is a bigger problem.
The problem becomes much more significant when I create an instance of a System.Data.SqlClient.SqlConnection and open it. After opening the connection, closing it, and garbage collection, I'm left with about 185K of memory that couldn't be cleaned up, about 150K of which is unreachable objects.
I haven't yet tested the impact of opening multiple connections or repeatedly opening and closing the same connection.
Any ideas will be greatly appreciated.
Thanks, Jason
|
|
|
|
|
one of the possible reasons is objects that need explicit finalization (have defined finalizers). when they are not reachable anymore and GC runs, memory for these object is not reclaimed immediately. instead, objects are moved to the so called 'FReachable' queue and their finalizers ar run. the memory is reclaimed in the next GC round.
you can find more details here[^] or here[^]
|
|
|
|
|
When you close a database connection, the connection itself is not destroyed, but kept in the connection pool. This greatly improves the speed of each following connection to the same database.
---
b { font-weight: normal; }
|
|
|
|
|
First off, how did you make the GC run? GC.Collect ? That's not enough. You need to do
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
Jason Pease wrote:
If I create a loop that calls a dummy function that does nothing
That's because the JIT compiler generates native code the first time a function is called and that code obviously takes up some space. If you'd noticed it carefully, you'd have seen that memory consumption doesn't keep rising, it just stays at that point. Nothing short of shutting down the process will reclaim that memory for you.
Jason Pease wrote:
The problem becomes much more significant when I create an instance of a System.Data.SqlClient.SqlConnection and open it. After opening the connection, closing it,
IIRC, the underlying connection is not closed and the managed SqlConnection object is simply pooled, so obviously it can't be garbage collected.
Jason Pease wrote:
I'm left with about 185K of memory
How did you measure? Task Manager? You should be using Perfmon with "#Bytes in All Heaps" counter to get an accurate picture of the size of the GC heap.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
S. Senthil Kumar wrote:
IIRC, the underlying connection is not closed and the managed SqlConnection
Maybe it's because my profiler (devPartner Studio) doesn't allow me to see it, but this space only shows up as "Unreachable Objects"; it doesn't show me the type of object. I would have expected to see a pooled connection with some type of indicative name, not Unreachable Objects.
This brings up the question though of where a pooled connection is kept. Seems I can utilize the same pooled connection from two different applications (right?), I would have expected it to not be included in the memory of my application space, but instead somewhere else. Maybe I need to study this more thoroughly.
S. Senthil Kumar wrote:
How did you measure? Task Manager?
DevPartner tells me how much memory it is profiling. I've verified this number with the .NET counters and it seems to be reliable.
Thanks for your help, Jason.
|
|
|
|
|
Jason Pease wrote:
Seems I can utilize the same pooled connection from two different applications (right?)
Really? I may be wrong, but I don't think that's possible. At best, they might be shared across all AppDomains in the same CLR instance.
This[^] is a very good (and free) profiler that shows the actual objects in the GC heap.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
how do I copy directories?
There is the Directory class, but it has no Copy method in it, and the File.Copy method won't let me specify a directory in its parameters.
|
|
|
|
|
you have to make your own function for it .you can travel a directory in breadth first search manner and then u can copy each file individually.In C# there is nothing for copying directories may be u can find anything in win32 api.although i am not sure.
|
|
|
|
|
Hi All,
I want to watch all fixed drives on a computer.Is there any reliable way to do that.I am watching for create , delete , change , rename events for all files and folders.I am using filesystemwatcher but its not very reliable at all especially for high trafiic activity.I am using empty string for the filter property.I have changed internalbuffersize to 32 KB.I don't want to miss any event , if any event fires two or three times that is not a problem.I in the notifyfilters i have set that property to NotifyFilters.Size|NotifyFilters.LastAccess|NotifyFilters.LastWrite|NotifyFilters.FileName|NotifyFilters.DirectoryName|NotifyFilters.CreationTime|NotifyFilters.Attributes even after that i am having troubles with word documents especially when i write into a word document and save it sometimes it fires changed event and sometimes i am not able to get the event .it is not showing the internal buferoverflow exception on that time either.and when i am copying a large directory say having around 13000 files then internal buffer overflow exception occurs.on msdn site they have given that with a 4 KB buffer size we can watch change for around 80 files so may be i have to use very large buffer size.Is there any other Class or Win32 API available which can do the task so that I must be able to watch all the events and don't miss any event.Thanks in Advance.
|
|
|
|
|
Without writing your monitoring code as an NTFS extension, no there is no reliable method to capture changes acrossed an entire volume. FileMon, from SysInternals, uses this technique. It requires a black belt in NTFS internals and Interop to implement though.
The FileSystemWatcher relys on the NT Kernel function ReadDirectoryChangesW . This function is known to have more than a few problems, especially when monitoring remote directories. The problems just get worse, the bigger the directory tree you're monitoring.
For more information, search for ReadDirectoryChangesW on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I know vertical length and horizontal length and sweep angle.
I am calculating the third side which is my chord length and also
calculating radius and height. but i am not able to set rectanlge points.
assuming x= 100 y = 250
Can any one help me.
Regards, Eswari
-- modified at 3:10 Monday 12th September, 2005
|
|
|
|
|
Hi,
I developed an application to read mails from a POP-3 Server.
But i want to know the arrival of new unread messages...
How can we know the status of an mail wheather it is read or unread..
Looking Forward for ur help
Thanx in Advance,
Bobby
|
|
|
|
|
POP3 doesn't have the notion of read/unread mails, I guess you have to implement logic in your client to do that. Depending on your design, you might want it to be stored as part of the mail itself, or as a separate metadata entity that refers to the mail.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi
I have done a program using thread(multithreading)
with 3 text boxes, 3 labels and a button. such that when the button is clicked,
Label 1 should become green color after the entered time period in text box1.
Label 2 should become Yellow color after the entered time period in text box2.
Label 3 should become Blue color after the entered time period in text box3.
This I have done with three threads to start these processes. that is start the three threads in the buttonclick.
Here is the coding part
sing System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Threading;
namespace multithreadtest
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button1;
private Thread t1, t2, t3;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
t1 = new Thread(new ThreadStart(colourlabel1));
t2 = new Thread(new ThreadStart(colourlabel2));
t3 = new Thread(new ThreadStart(colourlabel3));
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.label1.Location = new System.Drawing.Point(88, 64);
this.label1.Name = "label1";
this.label1.TabIndex = 0;
this.label1.Text = "Blue";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label2
//
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label2.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.label2.Location = new System.Drawing.Point(208, 64);
this.label2.Name = "label2";
this.label2.TabIndex = 1;
this.label2.Text = "Green";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label3
//
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label3.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.label3.Location = new System.Drawing.Point(320, 64);
this.label3.Name = "label3";
this.label3.TabIndex = 2;
this.label3.Text = "Red";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(96, 24);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 3;
this.textBox1.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(208, 24);
this.textBox2.Name = "textBox2";
this.textBox2.TabIndex = 4;
this.textBox2.Text = "";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(320, 24);
this.textBox3.Name = "textBox3";
this.textBox3.TabIndex = 5;
this.textBox3.Text = "";
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.button1.Location = new System.Drawing.Point(456, 40);
this.button1.Name = "button1";
this.button1.TabIndex = 6;
this.button1.Text = "Iterate";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(680, 397);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void colourlabel1()
{
Thread.Sleep(System.Convert.ToInt32(textBox1.Text));
label1.BackColor=Color.Blue ;
}
private void colourlabel2()
{
Thread.Sleep(System.Convert.ToInt32(textBox2.Text));
label2.BackColor=Color.Green ;
}
private void colourlabel3()
{
Thread.Sleep(System.Convert.ToInt32(textBox3.Text));
label3.BackColor=Color.Red ;
}
private void button1_Click(object sender, System.EventArgs e)
{
this.button1.Enabled = false;
t1.Start();
t2.Start();
t3.Start();
}
}
}
Now I am learning system.Threading.timer class, I couldnt understand how to work with this. Can anyone please explain me how to work withthis class and can anyone add this class to the above progarm and explain me..
dhol
|
|
|
|
|
there is a good threading example on msdn
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemthreadingtimerclasstopic.asp
hth
g00fy
|
|
|
|
|
First off, it isn't right to update UI controls from a different thread. This[^] might help you understand why.
To answer your question, simply drag and drop a timer from the toolbox. Set its interval property, subscribe to its Elapsed event and you should be done.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi
In c# windows form application, can u do a small program and make me understand this concept.
I find it difficult while coming across this topic(system.threading.timer).
Its really confusing me.
so please with a small example can u sent the coding part and explain wht it does.
pls do this help..
dhol
|
|
|
|
|