|
I have a TreeView control inside a TabControl. Im adding my items from a collection.
foreach (LogicStatementLine line in ift.Triggers)<br />
{<br />
newNode = new TreeNode(ift.GetObjectName(line), 10, 10);<br />
node.Nodes.Add(newNode);<br />
newNode.Tag = line;<br />
}
I have set the ShowNodeTooltips to false on the TreeView control. Yet Im still getting them when the text extends beyond the viewable area. Is there anyway to turn them off completely?
|
|
|
|
|
i have this problem (Thread is running or terminated; it cannot restart.)
and i search for solution but what i was read about that {thread which has died cannot be resuscitated}, so how can i make the aborted thread start again ?
|
|
|
|
|
|
You cannot restart a thread which has completed (normally or abnormally). You have to either create a new thread or use a thread pool.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
thanks..
i just make new thread within my loop
|
|
|
|
|
How can i simulate Mouse Events so that any control who wired on to event and has an event handler will be called without clicking the mouse physically.
Another Simulation, simulating MouseMove on the screen to an object and clicking it.
|
|
|
|
|
u can try
MouseEventArgs E=new MouseEventArgs(MouseButtons.Left,1,3,3,3);
form1_MouseDown(this,E);
this will call forms mouse down event with out acctually clicking mouse.
rahul
|
|
|
|
|
Is there a way to query AD for the computer name the user is logged onto based on their user name?
I work at a Help Desk and we're constantly asking for their computer name so we can remote in with some 3rd party software. It seems there should be a way to query AD based on their user name and get the name of the machine they're currently logged onto.
I'm looking to make a simple console app, similar to "net user jdoe1 /do" or something along those lines. Any ideas?
|
|
|
|
|
Might be more of a framework question.
It is a design-time question.
So I am interfacing with an object (to be written by someone else), which executes requests asynchornously on a worker thread. I am interested in an failures that may occur in the execution of my request. How can he propogate exceptions to my original thread of execution?
Thanks
NIK
|
|
|
|
|
Put all the worker code in a wrapper method that looks something like:
try
{
DoProcessing();
}
catch(Exception e)
{
//Invoke some method/event on the original thread here
}
catch
{
//Invoke some method/event here as well; even though C# doesn't allow it, there can be exceptions that don't have objects
}
|
|
|
|
|
|
If the worker thread is a threadpool thread created using BeginInvoke, then the CLR catches and rethrows the exception when you call EndInvoke (usually called in the callback).
Hope this helps.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I would think the CLR would have to or thread pooling wouldn't be a viable feature.
Still though, I don't control the creation of the thread that would be firing the exception. I think I'll have to settle for an manual notification (event perhaps), which won't be the same as an actual exception, but I can always throw one as a result of the notification.
Thanks to all for the responses.
NIK
|
|
|
|
|
I did a search with what's in the subject line and got no results. How can I transfer data from one form to another? There is an example in the VS Help section that instructs you to create a class to hold the data. Is there an easier and faster way?
Thanx
Jude
|
|
|
|
|
How are the forms related?
|
|
|
|
|
Parent form calls a simple form with a textbox and 2 buttons.
Jude
|
|
|
|
|
TheJudeDude wrote: There is an example in the VS Help section that instructs you to create a class to hold the data
Sounds reasonable if it is for more than the odd string or int .
TheJudeDude wrote: Is there an easier and faster way?
Define easy and fast. e.g. Easy to impliment doesn't generally equate to easy to maintain.
You might get some ideas here: Passing values between forms[^]
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
If you want to do it with the "right" way, see this example:
public class DataClass
{
private string myData = "";
public string MyData
{
get { return this.myData; }
set { this.myData = value; }
}
}
public class FormA : Form
{
private DataClass dataClass = null;
public FormA(DataClass dataClass)
{
this.dataClass = dataClass;
}
}
public class FormB : Form
{
private DataClass dataClass = null;
public FormB(DataClass dataClass)
{
this.dataClass = dataClass;
}
}
public class Main
{
private DataClass dataClass = new DataClass();
private FormA forma = null;
private FormB formb = null;
public Main()
{
this.dataClass.MyData = "Hello World";
this.forma = new FormA(this.dataClass);
this.formb = new FormB(this.dataClass);
}
}
|
|
|
|
|
I have 2 string, but i need 1 column in TreeList.
I have string_1 show in TreeList and string_2 is data from string_1.
How to add in TreeList?
-- modified at 17:09 Thursday 18th May, 2006
|
|
|
|
|
I want to make setup project for my C# windows application,that i in visual studio 2005 develop.I want embed the dotnetframewok 2.0 in my setup project.during installation first will it search dotnetframework on the pc.if it not installed,will it install first dotnetframework and after this will continue to install my application.there is a tool that name bootstrapper is in visual studio 2003 but there isn't in visual studio 2005.How can ı do this please help...
|
|
|
|
|
please help i must make setup project for tomorrow...
|
|
|
|
|
Download it form Microsoft[^].
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
first page that you url give is about visual studio 2005 but bootstrapper is for visual studio 2003...
|
|
|
|
|
Ok, this seems like it should be simple to do but it is giving me a headache.
Lets say a function returns an object but I dont know what the type of the object is, such as:
object SomeFunction ()<br />
{<br />
return object;<br />
}
And I would like to create a new variable based on the type of object returned.
object o = SomeFunction();<br />
System.Type t = o.GetType();<br />
t NewVar = null;
Why cant I use t to declare the type for NewVar? There has to be a simple way to do this.
|
|
|
|
|
Why should it work? t is a variable, no metter if it's a System.Type, it's still a variable...
I can advise you to do something:
1. either you do a case\if statements to get the Type and do by that.
2. OR either you can do an interface (or use one) that all the types you need can implement from it, eg. string\int.... are most likly implementin ICompareable, you can use that.
I have no more ideas for that...
|
|
|
|