|
System.IO.Directory supports UNC paths - try using "\\\\abc\\shared" .
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi,
Can any one explain me the difference between Type.Missing and Missing.Value, if there is any?
Where should we use either of them (if there are difference or otherwise)?
Finally,
Please explain what should be used while automating excel in the param to add method of workbook object.
Thanks a lot
|
|
|
|
|
They are equivalent, so it's entirely up to you.
e.g., the following two display the same thing:
MessageBox.Show(System.Reflection.Missing.Value.ToString());
MessageBox.Show(System.Type.Missing.ToString());
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
Hello Friends
From 2 days ago i'm trying to show icons for treeview nodes programmatically. but i was failed.
I have an ImageList with 2 16*16 icons.
I have a TreeView Control too.
I'm writing codes like below and I can see nodes, But i can't see any icon, I searched so many references in WebPages,but they confused me.
<br />
treeView1.ImageList = imageList1;<br />
for (int i = 0; i < 4; ++i)<br />
{<br />
TreeNode n = new TreeNode("Node with image " + i.ToString());<br />
n.ImageIndex = 0;<br />
n.SelectedImageIndex = 1;<br />
treeView1.Nodes.Add(n);<br />
} <br />
Please help me.
Thank You.
-- modified at 5:12 Sunday 30th April, 2006
|
|
|
|
|
I checked your code .You must fix the line number 4 from
<br />
n.SelectedImageIndex = 4;<br /> to n.SelectedImageIndex = 1;
because your image list has only two images and the treeview can't display image for selected node
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
Hello again
Ok, I saw that and that was not the main problem, beacause i just typed wrong imageindex here and in my project it was correct.
Thank you for your advice.
|
|
|
|
|
Perhaps you've forgotten to set the Treeview 's ImageList property?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Does imageList1 actually contain the images? Does setting the property using the Forms Editor work?
Regards
Senthil
_____________________________
My Blog | My Articles | My Flickr | WinMacro
|
|
|
|
|
Hello
Everything is Ok, I have imagelist with icons (*.png,*.ico) and i set imagelist property of TreeView control. I have no problem in wizard mode.
It means when i add and set nodes and icons from properties window there is no problem. Problem accures in programmatically mode.
I think i have problem with pictures size or type, Can yo help me ?
|
|
|
|
|
Hi.
In almost all articles about Remoting, I saw namespaces "using System.Runtime.Remoting.Channels.Tcp" and "Using System.Runtime.Remoting.Channels.Http" and etc.
But when I want to use them, VS says that "A namespace does not directly contain members such as fields or methods".
Why ?
I using VS 2005.
Best wishes
|
|
|
|
|
Your problem is no tied with the question you asked.
You can not put a method inside a namespace like this:
namespace Something
{
public void DoSomething ()
{
}
}
methods can only be contained inside a class or a structure.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
You need to explicitly add a reference to System.Runtime.Remoting.dll. VS 2005 automatically adds reference to System.dll and certain other dlls depending on the project type, that's why you might not have done that before.
Regards
Senthil
_____________________________
My Blog | My Articles | My Flickr | WinMacro
|
|
|
|
|
hi everyone,
i'm developing 2 applications that can communicate to each other. application1 is using a tcp socket to send a message to application2. application2 should receive the message through its webservice. now, my problem is i'm not getting the message in application2. i tried running ethereal to check the packets and i can see that the message is going to the computer where application2 is running but i'm getting a Null reference exception on application2. i tried using stacktrace
but it's only giving me the line where the null reference occured no further information. so, i need advise what's going on. why am i not getting the message from the application? i have been working on this problem for a week now. so, please advice.
thanks.
|
|
|
|
|
Near to impossible to answer from your description. Please post the relevant receiver code and probably also the sending code (and don't forget to mark the line where the exception occurs).
|
|
|
|
|
hi,
thanks for your reply. i didn't post the code since it's very long. basically i only used BeginSend()(tcp socket) method to send the message and i get to this part of the other application :
//------WebService file--------
public string EndSendMessage(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
//---Form.cs file---------
MyWebService ws = new MyWebService();
//other code here...
string str = ws.EndSendMessage(); //<---- string is null
I've been looking around for a code that works like this but i can't find one. Is it really possible to send a message from a TCP socket to a Webservice?
Thanks.
|
|
|
|
|
Hi
I have two form, a main form with a button, its text is Show. When click this button, it shows me the second form and the main form is hidden. The second form with a button, text is Show Main. When click it, the main form is shown. But I cannot do this.
Please help me!
Thanks!
|
|
|
|
|
How are you showing the second form? If you're using ShowDialog , then the second form is modal, so you can't show the first form when it is visible. You might want to use Show instead.
Regards
Senthil
_____________________________
My Blog | My Articles | My Flickr | WinMacro
|
|
|
|
|
Using Vs2005, I cant get my custom paint to work during designtime.
Heres the example:
Start a new windows app.
Add a user control
Paste the following into the usercontrol code:
protected override void OnPaintBackground(PaintEventArgs e)<br />
{<br />
base.OnPaintBackground(e);<br />
<br />
Graphics gx = e.Graphics;<br />
Pen pen = new Pen(Color.Red);<br />
Rectangle rect = e.ClipRectangle;<br />
rect.X += 10;<br />
rect.Y += 10;<br />
rect.Width -= 20;<br />
rect.Height -= 20;<br />
<br />
gx.DrawRectangle(pen, rect);<br />
}
Build the project.
Ok, basically, I only see my custom paint if I drag my control into a form.
If I just want to look at the customcontrol designer screen, I dont see my custom paint.
Am I missing something? Am i supposed to set a flag somewhere, like Ownerdrawn?
Any ideas why?
Andy
|
|
|
|
|
That's normal. In design mode of a user control only the InitializeComponent function is executed - nothing else.
|
|
|
|
|
Hi
I am a beginner level programmer. I want to running and closing another program (Excel,Word,winamp etc) by command. How can i accomplish this? Can you help me,pls..
|
|
|
|
|
|
I have retrieved the data and it appears in my list box, but I do not know how to have the data listed in columns instead of horizontally. Can you advise me on this.
Thanks.
TippyMoe
|
|
|
|
|
Do you mean List View? Because as far as I know the List Box control doesn't support columns.
Sean
|
|
|
|
|
Thanks,
I am definitely looking for list boxes. I found what I needed. Thanks for your help.
Tippy
|
|
|
|
|
Had a look on ListBox.MultiColumn property?
|
|
|
|