Answer Questions
TheViewMaster Microsoft.Practices.EnterpriseLibrary.Configuration
have a problem with the framework 2.0 on Microsoft.Practices.EnterpriseLibrary.Configuration (that don’t exist) I have converted an application with Microsoft framework 1.1 in the new framework 2.0. This line code has an error: Database db = new DatabaseProviderFactory(ConfigurationManager.CreateContext()).Create("DBProva"); 1) ConfigurationManager don’t exist ( OK I have added System.configuration and ConfigurationManager exist now) 2) …but ConfigurationManager don’t have this method CreateContext(). what I do to resolve this problem Thanks ...Show All
PaulKotlyar System volume (sound) and cpu usage
Hey, Can somebody help me with these questions 1) How can I get the cpu usage in procents (C#) 2) How can I get/set the system volume(sound, C#) Thanks, Nils VG In order to get the current CPU usage I'd suggest taking a look at this code sample and for controling the system's master volume take a look at the sample here . ...Show All
Sandy Place Design Patterns: A patern for detecting business object changes needed
Dear Developer Community, Im looking for a design pattern or best practice to solve the following problem: I have my business objects (such as Account, Client, Complaint etc) all derived from a BusinessObject base class. These business objects might also consume other business objects, such as Account containing a List<AccountContact>, or Complaint having List<Comments>. What Im looking for is a mechanism of probing a business object for changes. Something like: Account acc = new Account(); acc.CompanyName = "New Company"; if (acc.HasObjectChanged) MessageBox.Show("Object Changed!") else MessageBox.Show("Didnt change yet!"); Any suggestions Kind regards, Marcel ...Show All
Ananda Ganesh Anonymous Methods
Hi Every body I've got a problem i wonder if you could help to solve that. I just wanna access to a control and edit it in another thread anonymously. I don't want to declare a separate delegate and then pass it as a parameter.This feature has included in .Net 2. thanks a lot. Thank you now i know what was the problem. I just want to save data that has entered by the user into my SqlServer Database(2005). And I've declared a form that contains a progress bar and a label to show the user application is in progress.I wanna close the progress form if there is any error and show a message box to the user. But i can't do this because the progress form ...Show All
Wesolek wanting to read/write image files - .bmp, gif, jpeg
Could someone tell me where I can find out how to read image files (most importantly .bmp, .gif, .jpg) as input files and write to image files as output files. Will I need to pay for a library Are there free libraries I am basically writing a program that manipulates photos or images, basically a photo effects processing program. I have only been able to program with .raw format so far, as it is the easiest form of image file to manipulate. As others correctly pointed out in this thread, reading an image from the formats you mentioned is not a problem. The only issue you will have is when saving images that support a palette, in your case essentially GIF and sometimes BMP ( ...Show All
Latso GetEnumerator question
I have a class that has a list containing another class. I need to get at the data members inside of the class inside of the class. I didn't think this would be a problem a simple foreach should take care of this right Wrong! I have the following for each foreach ( FileList F in driverEntry) { FileName = F.Name; } and I get this error foreach statement cannot operate on variables of type '_Default.DriverEntry' because '_Default.DriverEntry' does not contain a public definition for 'GetEnumerator' I have never written a GetEnumerator function before and frankly I don't know where to start. Could some one help give me a head start or is there a easier way to get at this P.S. If you need to see me class definitio ...Show All
Pragmented only one row is "read" using dataReader
I'm trying to populate a dataTable using a dataReader... how can i do this i'm stuck getting only the first row. what i want it to do is get all the rows that pertain to a codeno. For example in my oracle database/table i have 5 rows with the codeno '1'. it should get all of this rows and populate the columns of my dataTable. hope someone answers... Some type of DataAdapter should be used to fill DataTable. It's not common to use DataReader for that. If you want to read all rows from result you need to loop all of them with while(yourReader.Read()) { ..... } ...Show All
Billy2005 Compiler Error CS0570 from C++ defined property
Compiler Error CS0570 Does anyone understand error CS0570 'class' is not supported by the language This error occurs when using imported metadata that was generated by another compiler. Your code attempted to use a class member that the compiler cannot process. The code being called was written in Managed C++ paraphrased like so: public ref class FilePath { ... [MyPropAttribute] property int Name { const int get(); } ... }; The attribute [MyPropAttribute] is defined like so: [System::AttributeUsageAttribute(System::AttributeTargets::Property)] public ref class MyPropAttribute: public System::Attribute {...}; When I try to use the property in C# code I get CS0570, but see no document on how to get around t ...Show All
S.Jan Forms In C#
I know there is a way say if i have 4 Forms Form A Form B Form C Form D I want to put an order on how my forms load when i build the application like I want to load Form C first the Form D then Form A and the Form B....Is there a way i can order my forms like that in VS.Net....Also say if I wanted a splash screen when a form with a picture opens and it just loads for about 4 seconds the loads the next form....anyone know how to get this done I thought Visual Studio .Net 2003 or 2005 Enteprise Architect had some build options that you could set to show which form will load first and which forms will load after that within a project...thats what i meant...thanks for the link!!!!! hi,   ...Show All
George2 ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Hi All, When i tried to connect Oracle database(8i) .I am getting an error "ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". My Connection string is : "Provider=msdaora;DSN=U500.WORLD;Uid=xyz;Pwd=123;" Please help me out to clear this task. Thanks in Advance I think it should be there in .NET 1.1 (2003) http://msdn2.microsoft.com/en-us/library/system.data.oracleclient(VS.71).aspx This may help you too like that guy, use System.Data.OracleClient namespace. For this you need to add reference to System.Data.OracleClien. Best of Luck. Best Regards, Rizwan aka R ...Show All
ccote Executing individual classes
Hi everybody, I am developing an c# web application . I am quite new to VS IDE. Is there any option to execute and test the individual c# classes without running it in browser ie., can i test the individual classes in the IDE itself Thanks in advance, T. Jayakumar If you are running the Standard edition of Visual Studio 2005 or higher you might want to try using the new Object Test Bench feature. Hi , Thanks for all your reply. I want do the unit test in component level. For simplicity, i like to test the component functions by creating a main function in the method. Is it psble to execute or run the static main method from the IDE. I am Using VS 2003, does object test feature available in VS 2003 w ...Show All
Derek Sanderson read HTML content using c#.net
Dear all, I am trying to read HTMLcontent using C#.net, but its returning content as a unicode characters .so how can i read the characters form HTML. Thanks, Aya. hi, here its the best thing i can come up with i have tried 2 ways , 1. using webbrowser control and get text from its htmldocument 2. using bytes and decoder but i copy codepage(28596 iso-8859-6 Arabic (ISO)) from the webbrowser but how it was detected i don't know i thought streamreader can detect any code page but my thought was wrong it can detect the unicode variation WebBrowser wb; private void button1_Click( object sender, EventArgs e) { string url = "http://www.assafir.com/ ...Show All
SunHunter Type of file?
HOw to find the Type of file clicked by an user in the windows explorer in c# Hi, Musafir I'm afraid that you can't get the file type by click in windows explorer. Cause it doesn't touch the app. App knows nothing about it. However, you can do it with drag and drop to the C# app. And then get the file's info. Thanks i want to know whether the user has clicked on a textfile or a doc file or any other kind of file type in the computer. How to get the file type Please help What do you mean about windows explorer Pls make the idea clearer. Thank you ...Show All
Teymur Hajiyev Writing to excel using C#
I know there is a simple answer to this, but I just can't find it. I am able to create an excel file and write to it, but I can only write to the first column. I would like to be able to write data to the second column in excel as well. Is this possible Can you possibly show me code that opens an excel worksheet and writes a few values into specified cells There are several options you can use to manipulate an excel file. The first and possibly simplest is to use COM integration to manipulate an excel spreadsheet programmatically. I have a co-worker who does this with Visio. I also found a library on CodeProject that does excel exporting for you (you hand ...Show All
philcart Hour
I am trying to get the hour, using the following: DateTime .Now.Hour This works fine, but I need the format to be HH. So that 1:00 AM would return "01". How would I go about accomplishing this Thanks, Russ That worked perfect, and actually simplified something else for me. Thanks, Russ look at the ToString() provider for the DateTime, which will allow you to customly return back the format you specify. In your case, try: string theHour = DateTime.Now.ToString("HH"); //24 hour format Does this help Here is a list of custom formats for your reference: http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx ...Show All
