Answer Questions
Steve Harding Declaring delegates using Reflection
Hi, I am trying to generate the fallowing class using Reflection: public class MyClass : CompositeControl { public delegate void CreateChildControlsDelegate (); public CreateChildControlsDelegate method; protected override void CreateChildControls() { CreateChildControlsDelegate createChildControlsDelegate = new CreateChildControlsDelegate (method); createChildControlsDelegate(); } } Here is my current progress: AssemblyName assemblyName = new AssemblyName (); assemblyName.Name = "MyDynamicAssembly" ; AppDomain appDomain = AppDomain .CurrentDomain; AssemblyBuilder assemblyBuilder = appDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess .R ...Show All
Mike737Aviator VS 2005 IDE Bugs, problems and suggestions
Hello, I can't find a way to submit bugs or suggestions regarding VS. So here's a topic for that. Apparently bugs in the VS 2005 IDE: - the Document Outline window doesn't show XML files structure as it did in VS 2003 - when an item is selected in the Class View window (e.g. a namespace or a class), the item's properties are not displayed in the Properties window, as it was in VS 2003. Regards, Ruslan Guys, Thank you for the information and the link and the prompt reply. I didn't expect to get the information from the first hands, it's a good surprise! I used of the Properties window for the class view to quickly get full namespace names and some basic info about members. I develop a ...Show All
HeathM Underline text
I was wondering if there was any way to underline the text of a string... Application: For right now I am outputing a bunch of strings into a message string to display in a message box. Later I will be outputting to a text file. I have searched the MSDN Lib to no avail; if someone could point me in the right direction, that would be great. Can you use HTML code in VC# Thanks Thom it will keep appending to the stream until you finally want to commit changes to the file, then read the entire stream into the file. You of course need to read the entire file into the memorystream, when loading, so it can continue on appending to the stream. You need to of course as stated in the doc/shown by example, make ...Show All
Mobile Master How get a list of domain names
Hi everyone i have a little dude, how can i get a list of domain names like the login window of Windows Xp, i see some codes on internet using the system.DirectoryServices but i don't have the names that appear in the "connect to" field of login dialog of windows Directory de = new DirectoryEntry("WinNT"); de.Children, will have everything you need ...Show All
DDressel1 Printing problem
Hi there, I'm currently working on a small project for filling in some forms on the computer and then printing the data into the forms blank fields. Understood Good! ;-) Well, I had a hell of a time to align all fields to the right possition. I printed, adjusted, printed, adjusted... It works now - at least when I print from my computer. Copying the program to a friends machine, starting it, filling in the fields and then printing results in a total mess. Not one feeld as where it is, when I print from my computer. What the hell am I doing wrong Here my code: public void ChoosePrinterAndPrint( ) { PrintDocument doc = new PrintDocument (); PrintDialog pDialog = new PrintDialog (); doc.PrintPage += new PrintPageEve ...Show All
DCollins Session Initiation Protocol
Hi, Can any body tell which API or Lib. is good for VoIP for .Net specifically C#, if ever experienced. by good there could be three out of many meaning 1. ease to use 2. well documented , good user manual 3. performance and efficiency wise. actually i want to establish a Wireless LAN to make telephone calls. at the moment i am trying to use ASTA SIP library for this purpose. but can anybody tell me an alternative library or solution. Regrds Khan thanx alot :) I don't think you're going to find such a thing, and even if you find it, you would need to pay and not a small amount to get it. Carlos Hi, ...Show All
db_guy How to read current active IE window's html content
Hi there!, I really hope someone can help me with this issue... it is really cracking my brain up:S What I want to be able to is to load the html content of the current active IE window by a simple IE Frame or console application. Not using the webbrowser component. That is possible but I just don't know how to do it. Maby with the HtmlDocument I have googled and googled.. I found this example http://www.codeproject.com/vb/net/ByPassAutomation.asp which is VB, but other than that the example does NOT work.. well I have IE 7.0 so maby it's because of the tabs.. can anyone please help me Regards, Qawi Hi, I think I got it:) thanks.. however.. how do I install it to IE I got this.. ...Show All
Leaf. writing text from C# into XML (urgent)
Hi friends, i am writing text from c# into text file,I use following code : private void Button1_Click(object sender, System.EventArgs e) { StreamReader fp; DataSet1 ds =new DataSet1(); DataRow dr; try { fp = File.OpenText(Server.MapPath(".\\upload\\") + "test.txt"); string info = fp.ReadToEnd(); string[] arInfo = new string[4]; char[] splitter = {'|','^'}; arInfo = info.Split(splitter); for(int x = 0; x < arInfo.Length; x++) { Response.Write(arInfo[x] + "<br>"); dr = ds.Tables["Sample"].NewRow(); dr["username"] = arInfo[0]; dr["password"]=arINfo[1]; ds.Tables["Sample"].Rows.Add(dr); ds.WriteXm ...Show All
n0n4m3 Is this a bug of C# IDE
This is the scenario: Open a cs file for editing. Spliting the window. Edit the file in lower part of code window. Then try to rename a variable in upper part of window with typing. Normaly that a rename mark should be shown and with mouse click or shortcut i can activate rename action. But in this case that doesn't show any more. Even when i remove the split of file, or try with diferent variable. That behaviour is lost for good from that point on. I need to close the file and open again to have such behaviour of rename assistance from IDE. boban, remember to vote for and validate your feedback ( https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=239551 ) Yep, that looks like a bug (I can reproduc ...Show All
paolob very strange System.Net.Sockets.SocketException
What can be a possible cause When my program running on a notebook connects the server, it gets the System.Net.Sockets.SocketException. I try to ping the server by the domain name from the notebook. It's OK. So not related to domain name resolution or network stability problem. I try to telnet to the server from the notebook directly and issue some commands. It's OK also. So not related to any firewall. It just happens in a few notebooks in the same network.... what can be the possible cause The following is the code. if(ConnectSocketThread==null || !ConnectSocketThread.IsAlive) { ConnectSocketThread = new Thread( new ThreadStart(this.ConnectSocketThreadFunction) ); ConnectSocketThread.Name = "ConnectSoc ...Show All
daat99 How to set a excel file readonly?
Thank you To set the information/attributes, we use the File.SetAttributes in the System.IO namespace: System.IO.File.SetAttributes( "File.xls ", FileAttributes.ReadOnly); and thats it! to set multiple attributes, simply add another FileAttribute (OR) System.IO.File.SetAttributes( "File.xls ", FileAttributes.ReadOnly | FileAttributes.Hidden); would make it readonly and hidden. To undo this, or rather set the attributes back, then you need to use FileAttributes.Normal, on its own: System.IO.File.SetAttributes( "File.xls ", FileAttributes.Normal); does this help Yes, I want to know how to set the file readonly programmatically. ...Show All
jimmy_t Another word about Enumerations
Hello All. I wonder if I could get you folks to check my thinking on this, because I'm wondering if there isn't some aspect of enums that I'm overlooking. Now, as I understand it, an enum consists of an ordered set of named integer constants with the ability to reference the name of the constant as a string. So, the salient points are these: named: good for code readability constant: good for switch statements integer: good for control statements and indices; bad for type consistency string: good for basic output; n/a for localized output Okay, the app I'm designing has several collections and matrices representing various states and lookups, so I really need named integers for indexing in order to keep the cod ...Show All
syhzaidi Create a library of Tools and standard forms like in Visual Foxpro
Hi Y'all I came from Visual Foxpro 9.0, in it i can create standard forms. These forms already contains code for saving data, closing the window standard headings and pictures. since I am now developing for C# (Coolest, Sharpest PL i've handled) in visual foxpro you can save this forms in a library file and you can actually add it to your toolbox. So in design time all you have to do is to click and drag from the toolbox your form. Is there a similar functionality in C#. I tried once copying one form to another filename, guess what when I edited a form all of the references still points to the name of the old form. :-) By the way some tip on visual foxpro programmer, there is a way to call all of the functions of visual foxpro and als ...Show All
Anil Narayanan How to check 2 reference objects for equality?
For examples sakes i got 2 Table instances, that are created by the same routine thus i know for a fact they are exactly the same. However when using equality checks they always return false indicating the table instances are not the same. I am using the following static methods 'object.equals' and 'object.referenceequals', i also tried the table instance's 'equals' method. How can i implement a conditional check to see if 2 instances of the same type are the same You're dependant on how that class implemented their Object.Equals override. Which classes are you trying to compare well you shouldnt need to check if the type is the same if you created the same object. you could use the GetType() of t ...Show All
granville Form MessageBox mouseleave
Hi, I am using a form's showdialogue property to show the form as a messagebox. I would like the functionality so that when a user mouse over the form and then mouses out - the messagebox would close automatically. However, the mouse out event doesn't fire all the time, it fires sporadically. I'm not in love with this event, I would be glad to use another one if it achieves the same result. Any help Basically, I just want to call the dispose method of the form when the user mouses over and then out. Clarify! Your event is not Always Firing or Form is not correctly Dispose off If Form is not correctly Dispose of then how you are evaluating this. And what code you are using in MouseLeave Make sure you are hooking event h ...Show All
