|
Okey , Thanks , My Means is the same that u wrote ,
Thanks!
|
|
|
|
|
hi
i suspend a thread now i have to resume that thread but with out using sleep method the code is below
using System;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace threadsuspend
{
public class myclass
{
public void method()
{
for (int i = 1; i <= 10; i++)
{
Console.WriteLine(Thread.CurrentThread.Name + "=" + i);
if (i == 5)
{
Console.WriteLine(Thread.CurrentThread.Name +" is going to suspend");
Thread.CurrentThread.Suspend();
}
Thread.CurrentThread.Resume();
}
}
}
class Program
{
static void Main(string[] args)
{
myclass mc = new myclass();
Thread thr1 = new Thread(new ThreadStart(mc.method));
Thread thr2 = new Thread(new ThreadStart(mc.method));
thr1.Start();
thr2.Start();
thr1.Name = "ntr";
thr2.Name = "anr";
Console.ReadLine();
}
}
}
please help me out
thanks to you
j somasekhar
|
|
|
|
|
Another thread would have to resume a suspended thread. Regardless, you shouldn't be using those methods anyway - they aren't only deprecated, they're marked obsolete.
What are you trying to do? Surely you can use proper synchronization objects?
Mark Salsbery
|
|
|
|
|
Hi,
please keep your code nicely formatted, using PRE[^] tags does that for you.
Probably the only time it makes sense for a thread to suspend itself, is when another thread is going to resume it. A suspended thread cannot resume itself, it is dead and buried for all intents and purposes, i.e.
Thread.CurrentThread.Resume();
is nonsense.
|
|
|
|
|
Hi All
I have a panel to draw some line in there in c#,but when it draw many lines,some of them will be out of sight.i want to see them with scrolling.please help me how can i put scrollBars in a panel object in c#.
thanks every body
|
|
|
|
|
You can get that almost for free, see my example here[^].
|
|
|
|
|
thanks
very nice,really usable
|
|
|
|
|
Luc Pattyn wrote: see my example here[^]. That is an excellent article ! Very useful.
thanks, Bill
Scipio: "That's true, Berganza; and what makes the miracle greater is, that we not only speak, but hold intelligent discourse, as though we had souls capable of reason; whereas we are so far from having it, that the difference between brutes and man consists in this, that man is a rational animal, and the brute is irrational." Cervantes, "Colloquy of Dogs," 1613CE. The two talking dogs, Scipio, Berganza, are hallucinations in the mind of a soldier with plague fever undergoing a "sweating" cure.
|
|
|
|
|
Thanks Bill.
|
|
|
|
|
If you enable scrolling your panel to fix the width and height with make scrollBars="Auto".
bellow the example:
<asp:Panel ID="Panel1" runat="server" Width="100px" Height="100px" ScrollBars="Auto" >
if you want show panel data on scrollbar just put your panel on another panel or div the fix the
</asp:Panel>
|
|
|
|
|
How can the following be achieved in a strongly typed dataset ?
int n = (int)Tables[0].Rows[0]["Field1", DataRowVersion.Original];
Thx
|
|
|
|
|
Hello everbody,
i want to automate a simple login to a website. I've seen a lot of examples and i can automatically fill the form, but i can't submit this form now. I dont't know what i am doing wrong. Can somebody help me.
The HTML Code for the button shows:
<TD><SPAN id=Button><INPUT value="I Concur " type=submit>
</SPAN></TD>
and my C# listing to fill the form is shown bellow:
public void csid_input(EXCHANGEDATA inhale)
{
HTMLDocument html_doc = new HTMLDocument();
html_doc = (HTMLDocument)iexp.Document;
HTMLInputElement logname= (HTMLInputElement)html_doc.all.item("login", 0);
cdsid.value = inhale.cdsid;
HTMLInputElement password = (HTMLInputElement)html_doc.all.item("pw", 0);
password.value = inhale.password;
iexp.Visible = true;
HTMLInputElement btn= (HTMLInputElement)html_doc.all.item("Button");
btn.click();
}
I am getting crazy. I tested several ways to get my problem solved. So can someone please help me.
Thanks.
|
|
|
|
|
I want to use remoting Library for sharing the object. could you please give me the example project and some ducument about remoting Library? .. Thank in advance.....
|
|
|
|
|
See here[^] for an overview, which will lead you to the technical details.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
It's amazing what you can find on the internet if you actually try looking.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I want to share connection string object and class object to many exe....could you tell me the example document and simple project?
but I use it in local computer..
waiting to hearing from you.
thank in advanced....
|
|
|
|
|
Don't cross post between forums. You have already asked this in Q&A. If you post to one forum everyone will see all responses and suggestion and not duplicate, and you won't have to answer the same questions in two places
No comment
|
|
|
|
|
I am uploading entities from one database to an identical one via a web service. The problem is that there are multiple copies of the database on multiple clients and this causes key collisions since we are using identity fields. For example, two identical tables will both have a key of "1". I am stuck with this schema, I'm afraid, so creating composite keys that would include an uploadclient key is not an option.
The central db is the same as the client databases, and is just intended to store all of the data from the upload clients.
I am writing LOTS of code that basically takes in an uploaded entity and creates a new one, then copies all of the properties into a new object before saving that new one to the database. This appears to be the only way to insert them with new keys since I can't use the key value of the uploaded object.
Given the constraints, does this sound like the best option? It's working fine, it is just a lot of code to type and I thought I would get some different views before I commit too much time to this.
|
|
|
|
|
How about creating an identity column(autogenerated unique Id) in the destination table?
|
|
|
|
|
Is making GUID primary keys an option ? There would be very few chances that the same key is being generated on several clients.
You could also have a look at Sync Framework. But this requires a little extra searches and experiments.
Hope this helps.
No memory stick has been harmed during establishment of this signature.
|
|
|
|
|
Thank you for the link, I'll be investigating that one.
I argued long and loud to have the guid keys, but in the end it wasn't my call. I afraid it came across as, "I'm too lazy to do lots of typing so let's add guids!"
Well long story short, I'm adding the entities the "hard" way: receiving them in via my WCF service and newing them up (along with tons of intersect table-relations) and then saving them to the central database.
It somewhat breaks the audit trail because you can't compare the client machine's data to the central database by a unique key, but admittedly you can find them by looking at the datetime stamps and some other key columns if the need to audit/reconcile arises.
|
|
|
|
|
Hi All:
How can I create Docking Control in c#?
modified 25-Nov-11 10:00am.
|
|
|
|
|
Well, what's it supposed to do?
|
|
|
|
|
I want to Create an Control as an Docking Control
I want to Create like ToolBox Control that can resize and Docking
|
|
|
|