|
Don't know if you've solved it yet, but the tree exposes two functions called BeginUpdate and EndUpdate . Put the BeginUpdate before any tree modifications and EndUpdate when you're done. Should do the trick.
--
Joel Lucsy
|
|
|
|
|
Pen p = new Pen( Color.Blue );
p.EndCap = System.Drawing.Drawing2D.LineCap.Triangle
//How do I get it triangle to be bigger?
//How do I get a dashed line?
Thanks a lot in advance.....
|
|
|
|
|
Hello Dear SkunkedWorks
For drawing Dashed Line use these sample codes :
dashValues is an array of dash's length.
float[] dashValues = {5, 2, 15, 4};
Pen blackPen = new Pen(Color.Black, 5);
blackPen.DashPattern = dashValues;
e.Graphics.DrawLine(blackPen, new Point(5, 5), new Point(405, 5));
Bye.
|
|
|
|
|
I like formatting my constructor initializers like this:
public MyClass(int a) :
base(a)
{
} but for some reason VS 2005 likes formatting them like this:
public MyClass(int a)
:
base(a)
{
} It's really annoying and I haven't found a way to prevent it. Anyone have any tips?
Thanks,
Alvaro
I cannot take anything the Bush administration does seriously. The corruption, the cynical disregard for humanity, the cronyism and incompetence, all wrapped in a slimey flag of ultra-marketed nationalism repulses me. -- consdubya from fark.com.
|
|
|
|
|
VS2005 has alot of autoformating features that you can turn on and off. You can even turn on adding a space before and after a . for a class member. Its one of the many settings, but I don't know why they have some of them. I would look in the options->Customize and see if you can find these autoformat settings.
Steve Maier, MCSD MCAD
|
|
|
|
|
Steve Maier wrote: would look in the options->Customize and see if you can find these autoformat settings.
I've looked but found nothing. I'm hoping there's some undocumented Registry setting or something like that to allow me to adjust it.
I find it hard to believe the Microsoft guys actually like using that convention. I've never seen it before -- what a waste of space!
Thanks,
Alvaro
I cannot take anything the Bush administration does seriously. The corruption, the cynical disregard for humanity, the cronyism and incompetence, all wrapped in a slimey flag of ultra-marketed nationalism repulses me. -- consdubya from fark.com.
|
|
|
|
|
When my listview control loses focus the selected item is unhighlighted but not removed from the SelectedItems collection. How can I keep it highlighted even after a different control gains focus.
|
|
|
|
|
dan neely wrote: How can I keep it highlighted even after a different control gains focus.
Sent the .HideSelection property to false .
Share and enjoy.
Sean
|
|
|
|
|
I have a user that is wanting to automatically log in to some web pages, and I've got most of them doing this, but there's still one that's giving me fits that I'm hoping someone can help me with. I'm writing the code in C#, and am displaying the webpage via the Microsoft Web Browser COM component. The webpage that I'm having issues with is popping up a login box that looks very much like an AD login box. Any idea how I can capture control for this box so I can programatically populate it and hit the "OK" button?
|
|
|
|
|
Some more information:
I'm using the old VB WebBrowser COM Component (AxSHDocVw.AxWebBrowser). I think I've narrowed it down to the fact that I need the headers passed to the Navigate method to include the authentication information, but I'm not quite sure how to do this. Does anyone have any sample code (like this for Posting) for the Headers/Authentication?
Thanks
-- modified at 15:00 Wednesday 30th November, 2005
|
|
|
|
|
Hi.
I am trying to build a VS 2005 addin and I want to add a commandbar with a custom image (I am using VS's AddNamedCommand and a satellite dll). It seems that if the image is 16-colored then it is correctly attached to the commandbar. If it is 256-colored, then all I can get is a blank (missing) image. Is there any way to have 256 bitmaps attached to custom commandbars? Thanks.
Daniel
|
|
|
|
|
Hi,
I have some kind of synchronisation problem. I have a C# Word Add-in,
and in it I want to close a file and then delete it. I use code as follows,
// Close the file
pDoc.Close(ref saveChanges, ref missing, ref missing);
// Delete the file
System.IO.File.Delete(pDocStr);
This works fine for a small file, but for a very big file I catch an
exception that says that "the file x.doc being used by another
process".
Anybody any suggestions for handling the synchronisation?
Thanks in advance
|
|
|
|
|
Hi,
I have not mailed to help you in solving your query. In fact seeing your query I thought you might help me in solving my query. I think you have used word document in C#. I am getting problem in opening existing word document in c#. I hope you may help me in solving it. Thanks in advance
Hiral
|
|
|
|
|
if i can help then sure, send me some details of the problem.
|
|
|
|
|
Hi,
Thanks for replying. Actually I got my solution.Anyways thanks for your help.
Hiral.
|
|
|
|
|
Hi Everyone,
I got this code:
if(file.Name.StartsWith(Cont_"))
{
engine = new FileHelperEngine(typeof(Contact));
Contact[] details = (Contact[])engine.ReadFile(file.FullName);
foreach(Contact info in details)
{
txtoutput.Text += info.toString();
}
}
else
{
engine = new FileHelperEngine(typeof(OSFUNOUT));
OSFUNOUT[] details = (OSFUNOUT[])engine.ReadFile(file.FullName);
foreach(OSFUNOUT info in details)
{
txtOutput2.Text += info.toString();
}
}
and wanted to change it to this sort of code:
System.Type type;
if(file.Name.StartsWith("Cont_"))
{
type = typeof(Contact);
}
else
{
type = typeof(OSFUNOUT);
}
engine = new FileHelperEngine(type);
type[] details = (type[])engine.ReadFile(file.FullName); *****
foreach(type info in details) ****
{
txtoutput.Text += info.toString();
}
However the lines with the **** are giving me problems, how do I create an instance of that type?
I could change it to
object[] details = engine.ReadFile(file.FullName);
foreach(object info in details) ****
{
txtoutput.Text += info.toString();
}
however i still need then to cast info to the class I'm working with...how would i do this (type)info doesn't work...
thanks.
|
|
|
|
|
This should work.
Array details = engine.ReadFile(file.FullName) as Array;
if (details == null)
return;
for(int i=0; i < details.Length; ++i)
{
txtoutput.Text += details.GetValue(i).toString();
}
If you need to access a non virtual method of the object.
Use type.GetMethod("methodName").Invoke(details.GetValue(i), null); or
type.GetProperty("propertyName).GetValue(details.GetValue(i), null);
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-- modified at 14:27 Thursday 1st December, 2005
|
|
|
|
|
Thanks, it works nicely. The help is greatly appreciated.
|
|
|
|
|
Hi,
I've done some "net send" program and it all works great but there is something missing. I want to replace standard popup window with my own, where i can have reply button and textbox for copy-paste of sended text. is this possible in C#?
Thanks in advance.
|
|
|
|
|
|
How can it be done? Do you know any site where i can find some information about this?
|
|
|
|
|
i want to know how can i convert my C# code into its corresponding assembly code for me to convert the assembly code into the corresponding .hex representation or convert it directly to hex ?
cause iam beginner to robotic field and i want to do that to use C# syntax and its OOP style in programming those chips and microcontrollers.
Any help regarding that.
By the way it is possible cause some companies already did that but for java coding style.
Mess With The Best And Die Like The Rest
|
|
|
|
|
If I understand what you want to do correctly you should prepare for bad news. C# doesn't compile to a native assembly language, it compiles to an intermediate form called MSIL. MSIL is JIT (just in time) compiled at runtime by the .NET CLR to native code, and this native code will only get generated if the CLR considers it safe.
All this makes C# an extremely bad choice for low level programming - you have no native code, and what you do have is useless without a .NET runtime for the platform you're running on.
I'd recommend a more traditional language like C++ for what you are trying to do.
Regards,
Rob Philpott.
|
|
|
|
|
Hi!
I know, When you read this subject you asked yourself "What the problem is this ?!"
Ok, I'm working on a Custom DateTimePicker in Shamsi Calendar User Control (for Iran) like .Net DateTimePicker Control. In first UserControl form i have just one ComboBox and on second form i have several objects.
But I cant change first forms ComboBox's Text from second form !!!
I changed it's Modifiers to public but also i can't access it.
Please Help me about multi page User Controls like this.
Thank You.
-- modified at 5:21 Wednesday 30th November, 2005
|
|
|
|
|
freshonline2003 wrote: I changed it's Modifiers to public but also i can't access it.
Really? Could you post some code that illustrates the problem?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|