|
OK, thats a bit better
treeView.AfterSelect += new TreeViewEventHandler( NodeSelected );
void NodeSelected(TreeViewEventArgs e)
{
tabControl.SelectedIndex = e.Node.Index;
}
Now this will select the 2nd tab if u select the second node. You can do your own mapping to your liking
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
Can't seem it find aname for the entire tab control (like in your example you have tabcontrol.) I have 5 tabs eached with a different name. Plus I get errors on ( NodeSelected ); saying more parameters are required.
|
|
|
|
|
Just to chip in, tabcontrol refers to the name of your TabControl variable (System.Windows.Forms.TabControl tabcontrol) as defined in your form class.
Gaul
Gaulles Technologies, Inc
http://www.gaulles.com
|
|
|
|
|
How to change the status bar color?
|
|
|
|
|
statusBar1.BackColor = Color.Black;
statusBar1.ForeColor = Color.White;
This'll put the back as black and the font as white...hope this helps.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
You don't. The status bar is one of those controls that doesn't allow you to do that by default.
This[^] thread on the dotnet list should tell you why that is and Mark Boulter offers a suggestion later in the thread (use the 'Next in topic' links to move through the thread).
James
Sig code stolen from David Wulff
|
|
|
|
|
Thanks James. I tried in all ways they discussed in that thread. I will try that solution the owner draw one.
|
|
|
|
|
That works beautifully James. Thanks a million for that.
|
|
|
|
|
Hi,
I need some help to create mailboxes from existing NT-accounts.
This code does'nt work:
DirectoryEntry entry = new DirectoryEntrt(LDAP_DOMAIN);
DirectorySearcher searcher = new DirectorySearcher(entry);
SearchResult result = searcher.FindOne();
DirectoryEntry dirEntry= result.GetDirectoryEntry();
DirectoryEntry adOrganization = dirEntry.Parent;
DirectoryEntry newUser = adOrganization.Children.Add("cn=Ola.Carlsson", "user");
newUser.CommitChanges();
----------------------------------
COMException (0x8007200a)..... does'nt exist...
Is SchemaClassName wrong?
/Ola
|
|
|
|
|
i have a small app. i wrote at the office
but i dont want to give every one the exe
so i can made changes
it return an error msg what can i do
|
|
|
|
|
shmuelt wrote:
what can i do
You can tell us what the error message is
James
Sig code stolen from David Wulff
|
|
|
|
|
Hi,
I'm compiling in run time with a code like this:
CSharpCodeProvider codeProvider = new CSharpCodeProvider();<br />
ICodeCompiler icc = codeProvider.CreateCompiler();<br />
<br />
System.CodeDom.Compiler.CompilerParameters parameters = new<br />
CompilerParameters();<br />
parameters.GenerateExecutable = false;<br />
parameters.GenerateInMemory = true;<br />
CompilerResults results = icc.CompileAssemblyFromSource(parameters,<br />
txtSource );<br />
<br />
if (results.Errors.Count > 0)<br />
{<br />
foreach(CompilerError CompErr in results.Errors)<br />
{<br />
txtErr.Text += "Line number " + CompErr.Line +<br />
", Error Number: " + CompErr.ErrorNumber +<br />
", '" + CompErr.ErrorText + ";" +<br />
Environment.NewLine + Environment.NewLine;<br />
}<br />
}<br />
else<br />
{<br />
<br />
Assembly assembly = results.CompiledAssembly;<br />
Type t = assembly.GetType("MyNamespace.MyClass");<br />
<br />
MethodInfo me = t.GetMethod("MyMethod");<br />
<br />
object result;<br />
result = t.InvokeMember("MyMethod2", BindingFlags.Public |<br />
BindingFlags.Static | BindingFlags.InvokeMethod ,<br />
null, null, null );<br />
MessageBox.Show ( ((int)result).ToString() );
string<br />
<br />
}<br />
}
The problem is: how can I specify reference assemblies to the run time compiled assembly?, is it possible?
'ReferencedAssemblies' in 'CompilerParameters' is only of read mode, so it's not possible to set them...I'm wrong?
Thanks in advance,
Edgar
__________________________________________
Edgar Berengena Moreno
Software Engineer
Appeyron Research
|
|
|
|
|
CompilerParameters constructor
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
GREAT!
Fast and simple. Thank you, Stephane.
__________________________________________
Edgar Berengena Moreno
Software Engineer
Appeyron Research
|
|
|
|
|
Is it possible to override a delegate?
I ask because I want to create a couple of threads but I want to pass a parameter to the method such that the threads will be working with different data, in this case a string.
Thanks in advance
Windows 98 (win-doze): a 32 bit Extension to a 16 bit Graphical Shell of an 8 bit Operating System originally coded for a 4 bit Processor by a 2 bit company that can't stand one bit of competition.
|
|
|
|
|
System.Delegate
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Thankyou very much for the quick response but I don't think I asked the question exactly right.
I would like to know if it's possible to pass a parameter to a thread so that I don't have to write two methods which do exactly the same thing apart from the contents of one variable being different.
Windows 98 (win-doze): a 32 bit Extension to a 16 bit Graphical Shell of an 8 bit Operating System originally coded for a 4 bit Processor by a 2 bit company that can't stand one bit of competition.
|
|
|
|
|
TheFLC wrote:
I would like to know if it's possible to pass a parameter to a thread so that I don't have to write two methods which do exactly the same thing apart from the contents of one variable being different.
Yes, define that variable (parameter) as an object, then check it during the handling of the delegate
Hop this helps
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
I found the answer in the MSDN. It's in the index at Threads->Creating at the bottom of the page.
Windows 98 (win-doze): a 32 bit Extension to a 16 bit Graphical Shell of an 8 bit Operating System originally coded for a 4 bit Processor by a 2 bit company that can't stand one bit of competition.
|
|
|
|
|
hi,
i have an app that makes aspnet_wp only grow in memory.
It's causing us a lot of problems.
I'd like to know which is the best way of finding if there's a memory leak.
We access some COM+ components, and we think it could be them. Which is the best way to find out it? And, if the COM+ components are guilty, which is the best way of cleaning the memory they use?
thanks in advance
the trooper
|
|
|
|
|
Do you have Visual Studio.NET Enterprise Developer or Architect? 'Cause if you do, then you can use the Visual Studio Analyzer and it'll tell you just about everything you wanted to know about your app.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Anonymous wrote:
which is the best way of cleaning the memory they use?
Use System.Runtime.InteropServices.Marshal.ReleaseComObject(object)
"In an organization, each person rises to the level of his own incompetence." Peter's Principle
|
|
|
|
|
Hello!
Is there any chance or possibility to transfer a c# program into a
SuSe-Linux platform? So I know, Microsoft don't offer a platform SDK
for LINUX.
Can you help???
|
|
|
|
|
|
How do I?
Or, to be a little more precise, I would like to suck homemade audio samples from an buffer (e.g., noise might be a gaussian distribution of integers between + -32K)and feed them at the right rate to a soundcard (audio device) for real-time play. (I'm not trying to play an existing, saved wav file.) A simple application would be a VCO (oscillator with a slider controlling the frequency).
In the .net world, is this done by DirectX? By the WINAPI? wavePlay? Magic? Not at all?
Background note: a wavetable might contain one complete waveform of a sample, and the buffer might have as many repetitions of the sample as maching performance allows.
|
|
|
|