Nope. But if you add extra unused references then yes. Please refer http://msdn.microsoft.com/en-us/magazine/cc163655.aspx[^]
Jayant D. Kulkarni Brainbench Certified Software Engineer in C#1.1, C# 2.0, ASP.NET, .NET Framework and ADO.NET
Nope. But if you add extra unused references then yes. Please refer http://msdn.microsoft.com/en-us/magazine/cc163655.aspx[^]
Jayant D. Kulkarni Brainbench Certified Software Engineer in C#1.1, C# 2.0, ASP.NET, .NET Framework and ADO.NET
I was pretty much sure that as DataGridViewColumn implements IComponent, it should throw exception when manipulated by another thread. I am little bit surprised to see that we can change any property of DataGridViewClumn from any thread while it is not possible for DataGridView itself. How is it possible that DataGridView is not editable from another thread while the datagridviewcolumn is? I am waiting for the answer since 24 hours.. :^)
Jayant D. Kulkarni
modified on Thursday, December 10, 2009 11:29 PM
When we change a project type from a DLL to EXE or vice versa, what exactly internally happens? How CLR know that this is executable? Is there any tag in the MSIL generated for that assembly? How to check it? What I tried, I have a DLL without Main. I compiled it and used it. Then I put Main in it and recompiled. Then I renamed Test.Dll to Test.Exe but I got this E:\AssemblyVersioning\DotNetFunda\bin\Debug\Test.exe is not a valid Win32 application. I want to know the internals of EXE and DLL.
Jayant D. Kulkarni
Hi All, I have written a code in C# win form that will browse all network, domain in that network, machine in the selected domain and share and folder under the selected machine. But the problem is the code runs under the logged on user credentials. If the logged on user does not have permission on the given folder it shows access denied. I want to pop up "connect to" dialog box which windows shows when we try to connect to different machine? Can anybody tell me how to do this? How to pop up the connect as box? Jayant D. Kulkarni
Thanks Karl for reply. Yes it can be done using different properties, for example check the tag value and set the image. Now I am crating a generic user control and I want these images should dynamically get assigned. So, application1 will like some another icon at root level and different icon at child node level, similarly application2 will like to use some different icons. What I will like to do is let the application using my control set the images programmatically. How can we do this?
Jayant D. Kulkarni Brainbench Certified Software Engineer in C#1.1, C# 2.0, ASP.NET, .NET Framework and ADO.NET
Thanks Karl. It worked for me. One more question, can we have separate icon for each node? I am asking because currently I am assigning image depending upon the HasItem property of treenode. In future I will like to show different icons for each node. Is it possible?
Jayant D. Kulkarni Brainbench Certified Software Engineer in C#1.1, C# 2.0, ASP.NET, .NET Framework and ADO.NET
How can I show different icons/images to different nodes in a TreeListView? I am referring the example http://blogs.msdn.com/atc_avalon_team/attachment/541206.ashx[^] I want to show one image to all root nodes and another to all child nodes.
Jayant D. Kulkarni
[Message Deleted]
Hey Andy, Thanks a lot for gr8 answer.. It worked well. I voted 5... Jayant
Yes, you are right. But that will make whole web service running in authenticed mode. I want to run a piece of code under the context of currently logged on user. Jayant
Hi, I am having one problem. I have one web application calling web service, say webservice1. Webservice1 calls webservice2 which reads a file from the network and sends back the response. The problem is web application, webservice1 and webservice2 are all running under network service account. Network service account does not access to network resources. Hence, in the webservice2 I have to find the currently logged on user and impersonate it. After that the code will work fine. The problem is, how to get the currently logged user and impersonate it when I am not having his password. :^) Regards, Jayant
One simple question, if an event is declared like a field of delegate type, except that the keyword event precedes the event declaration how can an interface contain a type declaration? Jayant D. Kulkarni
Friends, Does anybody know how to get the list of all previously logged users on a windows machine? One simple way is to go to documents and settings and get the folder names. But can we have some other alternative like using registry or WMI?
Jayant D. Kulkarni Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
It is obvious choice1. Because of the rule that finally block is always executed inspite of any excpetion is occured or not. In this case, inner most try and finally is executed first and then the outer one. :)
Jayant D. Kulkarni Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
If you have overloaded methods then you need to check which method you want to execute. Here is the sample code to call MessageBox.Show("Hi").Assembly winAsm = Assembly.Load("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); Type[] allTyps = winAsm.GetTypes(); foreach (Type typ in allTyps) { if (typ.Name == "MessageBox") { Console.WriteLine("MessageBox found..."); MethodInfo[] mtds = typ.GetMethods(); foreach (MethodInfo mtd in mtds) { if (mtd.Name == "Show") { if (mtd.GetParameters().Length == 1) { mtd.Invoke(typ, new object[] { "Hi!!" }); } } } } }
:)
Jayant D. Kulkarni Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET