|
Thanks Ali. I have set that property to true and it is still the same.
|
|
|
|
|
Please re-check your code.
The multiline property is the only one responsible for this effect and is set to true by default, so Ali's reply is absolutely correct.
Are you handling any key events yourself?
Regards,
mav
|
|
|
|
|
hi
i want to create new folder in my website programmaticaly.
how i can do it?
tanks
|
|
|
|
|
Same way you'd create a folder anywhere, the only issue is making sure you have the permission to do so, as the user you're logged in as within the site.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
With the standard treeview when a user right clicks a node to show a context menu the selected item does not change. I want to force this change. Is it possible and if so how?
Thanks for any help.
|
|
|
|
|
If there's an event you can catch for the right click, then a tree view has a method for finding the item under the mouse ( assuming it's not passed into the event handler ) and you can select it there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can subscribe to the MouseDown event and use the following piece of code.
if (e.Button == MouseButtons.Right)
{
TreeNode node = treeView.GetNodeAt(e.X, e.Y);
if (node != null)
treeView.SelectedNode = node;
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I came up with what I think is a good idea for making multithreading programming easier in any .NET language. .NET 2.0 adds the capability to write anonymous functions, it would be nice if there was a "parallel" statement, that could simplify writing threadprocs
<br />
public void DoSomeParallelStuff() {<br />
parallel<br />
{<br />
{<br />
}<br />
{<br />
}<br />
{<br />
}<br />
}<br />
<br />
}<br />
behind the scenes the compiler could create the anonymous functions, add them to the ThreadPool by calling ThreadPool.QueueUserWorkItem. in some cases it would be nice to automatically block the caller thread, maybe a sister statement "parallel-blocked"
<br />
parrallel-blocked {<br />
{<br />
StreamReader rd = new StreamReader("C:\test.txt");<br />
...<br />
}<br />
{<br />
StreamReader rd = new StreamReader("D:\test.txt");<br />
...<br />
}<br />
}<br />
<br />
Console.WriteLine("Tasks complete");<br />
I think this would make it much easier to write multithread capable code. I've actually added this feature to a compiler I'm working on and it works quite nicely.
60% of statistics are made up on the spot
|
|
|
|
|
That would definitely be drool-worthy. Send a proposal to Microsoft and maybe it will see fruitation!
|
|
|
|
|
I would like to read some articles for beginners concerning the creation and use of dll. Can you give me some sites?
|
|
|
|
|
|
how can I find out the volume name of a CD (or another drive) ?
|
|
|
|
|
You'll need to P/Invoke GetVolumeInformation
Have a look at this article[^],
|
|
|
|
|
|
I have a custom control which inherits from Windows.Forms.Label - it adds some field and properties which enable the user to draw a color border around it. In the OnDraw method i first call base.OnPaint, and then draw the border. It has a disadvantage - some text may become covered by the border. Is there a way to avoid this? I can draw the text myself in a smaller rectangle than the client rectangle, but then I loose the control's ability to dynamically wrap the text. Help me!
|
|
|
|
|
Try to make the text aligment in the middle horizontal of the label
|
|
|
|
|
Yes, it works, bu I want to be able to have all the remaining styles to choose from. Any other options?
|
|
|
|
|
Just don't make the custom border so thick .
|
|
|
|
|
Hi All,
I'm having a problem with TraceSwitches. When I create one it doesn't seem to read the values from the XML .config file and nothing gets logged. Here's what I have done:
1) I've created a TraceSwitch:
static public TraceSwitch Logger = new TraceSwitch("TDLog", "Application Log");
2) I created a file stream:
FileStream filestream = new FileStream("c:\mylogfile.log", FileMode.Create);
3) I've created a <b>TextWriterTraceListener</b>
private TextWriterTraceListener _logfile = new TextWriterTraceListener(filestream);
4) I've added the TextWriterTraceListener to the Listeners collection:
Trace.Listeners.Add(_logfile);
5) I've also set up a .config file to give startup parameters to the TraceSwitch (the config file is called: myapp.exe.config since my app is called: myapp.exe. Here is the contents o my .config file:
<configuration>
<system.diagnostics>
<switches>
<add name="TDLog" value="4" />
<trace autoflush="true" />
</switches>
</system.diagnostics>
</configuration>
When my app run the Trace Level is initiall set to OFF dispite the fact I set it to verbose explicitly inside the .config file. For good measure I've also added a #define TRACE in the top of my .cs file to no avail. Any ideas on what I'm doing wrong ? Thanks in advance...
-Pete
|
|
|
|
|
Hello All,
I have several COM components that I reference. Unfortunately, they are referenced at a rather low level of the solution, which makes strongly naming the projects within the solution difficult. I have seen a couple of "work around" ways to strongly name those COM components, which enables me to strongly name the rest of my project. I was wondering if anyone had a good suggestion as to the best way to strongly name referenced COM components.
Thanks in advance for the advice,
Ryan
|
|
|
|
|
I have Labels controls with some properties set in an ArrayList. I want to be able to easily qrite and read it from a file. Is Label serializable or do I have to mess with it's properties, store them as strings and use o lot of string handling while reading it from a file? Is ArrayList serializable?
|
|
|
|
|
Why don't you try? It should be.. as it derives from Control , and Control has SerializableAttribute attribute, and I don't see Inherit=false anywhere - so derived classes (e.g Label ) should be seriazable
Anonymous wrote:
Is ArrayList serializable?
dunno... look at MSDN.com, search for ArrayList ... if you see [Serializable] as attribute in class declaration, than it is forshizzle serializable.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Yes to both. You can figure the answer out yourself for other classes by looking to see if the base classes implement ISerializable or have a [Serializable] attribute.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
Contrary to what dnh and Marc say above, Label s (or any other Control s) are NOT serializable. ArrayList s are serializable, but how much success you have depends on whether the objects contained inside are serializable.
Take a look at my article Themed Windows XP style Explorer Bar[^] for a way to get around the "Control s aren't serializable" problem. Also, it's probably wise to read what MSDN has to say about serializing[^]
"I think I speak on behalf of everyone here when I say huh?" - Buffy
|
|
|
|
|
I need to do something like the following. The problem occurs because the Class library doesn't recognized the "CMainForm" class. I can make things compile and work if both classes are in the same file but I need them to be in separate files.
I can't use the "namespace" directive because the CMainForm class isn't a DLL/library.
Any help would be greatly appreciated.
Carol
File #1. EXE
---------------------------------------------------------
namespace ExampleCode
{
public class CMainForm : System.Windows.Forms.Form
{
}
}
File #2. DLL
---------------------------------------------------------
namespace MyClassLibNamespace
{
public class MyClassLib
{
CMainForm m_MainForm;
public CFactory(CMainForm MainForm)
{
m_MainForm = MainForm;
}
}
}
|
|
|
|