Answer Questions
Gabbar Singh Form Count
I need to get a count of all the forms in a particular C# solution. The following helps me do that. public Type[] GetAllForms() { Assembly asm = Assembly.GetExecutingAssembly(); ArrayList result = new ArrayList(); foreach ( Type type in asm.GetTypes() ) { if ( type.IsSubclassOf( typeof (Form) ) ) { result.Add( type ); } } return (Type[])result.ToArray( typeof (Type) ); } But now i need to instantiate these ...Show All
tejasjunior OpenFileDialogbox
How to set enable as false to openfiledialog box's open button untill we select an image or file Do you want to disable a button in your application or a button on the OpenFileDialog form button on the open dialog form should be disabled until we select a file private void Form1_Load(object sender, EventArgs e) { button2.Enabled = false; } string fileName; private voi ...Show All
UncleB enumeration was modified operation may not execute
Hi all; i am using the following fuction to close some open forms with tag "NOTMAIN" in my application. private void CloseOldForms() { FormCollection frmColl = Application .OpenForms; foreach ( Form tempFrm in frmCOll) { string tempFrmTxt = tempFrm.Tag.ToString(); if (tempFrmTxt.Equals( "NOTMAIN" )) { tempFrm.Close(); } } } But the application stops after ...Show All
koiravahti How to use Microsoft .NET Framework 2.0 SDK
i think my subject tell all How to use Microsoft .NET Framework 2.0 SDK how to view other clases, for examples methods for DIRECTX 9.0 c ok ok my question is not that clear I instlled the Microsoft .NET Framework 2.0 SDK, and i really dont know What to do with it: I have CLR DEbuger -- What is that MSIL dissambler -- Dont know what is that too Windows resurce location editor -- Saem as the other 2 Actually, I don't think your s ...Show All
R.W. Stewart .NET Framework
Ok. I dont know if this is the right forum to post this question in, but this is the forum I am used to using so I will just ask, and if its not, could someone kindly redirect me in the right direction. I was just wondering if a user would have to have the .NET Framework installed on his/her computer for him/her to be able to run my program on his/her computer. Also, I would like to know if a person would have to have a SQL Server to access a SQ ...Show All
elizarrj Migration problem..., Need help!.....
I am migrating from VC++ Managed code 2003 and 2005, but I ran into a problem with the vectors in VC++. I need the std::random_shuffle algorithm in a bad way. Is there any such algorithm in C# Thanks... I was thinking the same thing, but I was hoping C# had something so I wouldn't have to do any coding..... oh well!... maybe it has ... but i dont know any functions like th ...Show All
Angelo Caruso But customErrors-mode IS "Off"!!!
This is not the first times this happened... I am developing and debugging a website. I can run the site from Visual Web Developer without problems, there are no errors. However, whenever I want to see the result from a "remote computer" (or simply through another browser using the URL), I get a "censored" error message. On this page I am requested to set the CustomErrors-mode to "Off" in the web.config file if I want the error message to be vi ...Show All
SaintJimmy Ampersand
Hi, I'm having trouble with an ampersand in my URI. I'm working in a winform with a webbrowser. This is my code: String test1 = "http://serv/reportserver /CUBE/CUBE02&rs:Command=Render&Budget=[Budget].[N Budget]."; String Testen = test1 + "%26[1]"; (%26 is the same as &) webBrowser1.Url = new Uri(Testen); When the browsers opens he converts the url to : http://serv/reportserver /CUBE/CUBE02&rs:Command=Re ...Show All
Chua Wen Ching ArrayLists + ref keyeord + accessing values automatically
Hi, I have a problem in using ArrayLists , If I have the following code snippet: class C1 { ArrayList prefix; int order; public C1( ArrayList prefix, int order) { this .prefix = prefix; this .order = order; } } class C2 { public void method1() { ArrayList x = new ArrayList (myCollection); C1 c1 = new C1 (x, 10); } } Now , what ...Show All
PTA Can I use the c++ custom wizard in vc#?
in 2003 I create a c++ custom wizard and only change the c++ to C#,and i put the files into the vC#wizard folder,so i create correctly template in C#. but in 2005 I think the structure has been changed so the problem is also coming out.I can create a project but in the solution tool window there is nothing and it didn't save sln file either. So my question is how to use the custom wizard for c# Hi, are you talking about creating a custom ...Show All
Waterbaby Threading - ActiveX Events/Objects
Hi, I have a threading problem that drives me absolutely nuts and I don't know what to do: I'm using an ActiveX object and subscribe to one of its events. Whenever I execute the method that drives the event, a couple events are triggered. The event response holds an ActiveX object which I need to work with. What happens now is that whenever the event response returns it runs on a different thread. I want to store the event response activex ob ...Show All
LJry Costumizing the MessageBox
How can i costumize my messbox like the background title bar text color and orther.. I dont want to make a new form, is there another way coz` is faster and easyear then creating a new form Sorry, you can't modify the outlook of MessageBox, why don't you create a new form for the dialog Actually, if you want to create you own style(Not only background and title color) something like winamp, I think it's better ...Show All
Chirurg big file storage in sql
Hi i want to store a file lets ley 100 Mb in my sql Database.. how is the best way to do it Thanks!! To do this I would store the file on the filesystem, and store only a reference to the file in the database. I suggested actually storing the file in SQL Server (and not the file system) as this ensures the integrity of the data, e.g., support for transactions, back up and recovery etc. yes i ...Show All
Kevin Tambascio What should be the best practice to check the object ?
Hi, Normally we check a value by this format if ( obj == null ) { //do some code } I know it is good for readability. But for performance reason I am suggested by one of my coleagues that we shuold check the constant value first i.e. if ( null == obj ) { //do some code } What is the best possible way to check the object Could any body give the proper reason to use the later one. What do you mean clear you It is not really for ...Show All
kingces A few simple questions...
I could use some help determing the output of the following code: int intY; int intX; int intMysterValue; intX = 1; intMysteryValue; do { intY = ( int ) Math.Pow( intX, 2 ); lstDisplay.Items.Add( intY ); intMysteryValue ++; intX++; } while (int X <= 10 ); lblResult.Text = Convert.ToString( intMysterValue ); I have trouble understanding the Math.Pow method...Any help Also, I can't figu ...Show All
