| RichTextBox Font Color (3 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi I have a richtextbox that show an RTF file. i want that onload the text that contain the wod "es" will be shown with Blue color how can i do it??? rhanx Raz |
|
| What is GetHashCode used for? (3 replies) |
| microsoft.public.dotnet.languages.csharp |
| I am reading a book about C#, in one of the examples the author uses the following lines of code on a struct public override int GetHashCode() { return number.GetHashCode(); } The problem that I have, is that the author never uses this GetHashCode anywhere else in the on the program except in the struct. So the question are: 1. Why did he go into all the trouble to add this piece of code? Was it b... |
|
| Threading & shared methods? (8 replies) |
| microsoft.public.dotnet.languages.csharp |
| Can someone please help up Are shared methods shared by all threads in a process? I believe they are which makes me wonder if there could be thread blocking problems when calling a shared method. Imagine this situation: A long running shared function that runs on a machine with multiple processors. When this method is called from separate threads, what happens? Does one thread wait for the other t... |
|
| (Beginner): C# requires .Net Runtime library? (19 replies) |
| microsoft.public.dotnet.languages.csharp |
| Just to confirm, to execute a developed C# program the machine running the C# program will require the .NET framerwork to be installed? I understand this is about 20 megs? So if I wanted to develop and sell a Windows app to the mass market, then it wouldn't be smart to use C# until the .NET framework became standard on peoples' machines? David. |
|
| Suitable Data Structure for my classes (OT) (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| First this is probably considered off topic. Even though it is off topic I intent to write the app in C#... We have an application that logs to a text file. I wanted to write an application to compile some of the information I needed out of the file. Currently, I do the compilation manually by using various utilities like "find" for occurrences of keywords in the text file. I would like the app to... |
|
| FW 1.0 textbox limitations on text length - any do exist? (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| I have textbox which is loaded with content of source file and file can be quite big. I've met with one issue, when for text file of 500KB single line text textbox loads content without any exception, however on the screen I see only Invalid data entry in the textbox. How can I avoid this? Is there a reliable way to load textbox with long strings? Or at least to detect this problem in the code? Is... |
|
| File ? Directory ? (3 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, Is there a faster (or less resources consuming) way to determine if a path points to a file or a directory than this one: if(File.Exists(path)) file... else if(Directory.Exists(path)) directory... Thanks! |
|
| Problems with MD5 Cryptography (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, I've been trying to use the MD5 cryptography class that comes with .Net Framework to encode a string that is needed to communicate with the MSN IM's Notification Server. However, the encoded string always seem to be different from what the Server needs. I have searched around for possible reason, and found someone with a similar problem. For example, when we encode 1013928519.693957190mypasswo... |
|
| Recapturing focus when dialog is closed? (3 replies) |
| microsoft.public.dotnet.languages.csharp |
| I have an a form that creates another form that is listed as TopMost in order to make it resemble a dialog box. When the user enters information into the form and closes it , I need to make the parent form refresh an arraylist with the new data that was just added. Can anyone tell me how to do this. The Form.Enter function doesn't work right for some reason. Any suggestions are very welcome, Ron |
|
| C# and VBScript (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| Regarding Nacl/Tk: http://www.jondavis.net/JDSolutions/#nacltk The interesting thing is that a generic C# class with properties can be handled in VBScript just fine, but XmlDocument (really just one of several framework classes I tried) could instantiate dynamically just fine but were not properly readable in VB. Why would one type work and one not work? Just off the top of my head, I think I migh... |
|
| easy one (10 replies) |
| microsoft.public.dotnet.languages.csharp |
| i wanne get the dir path to know where the user wanne save teh file how do i get the path after opening filedialoge // Gets the Directory private void button1 Click(object sender, System.EventArgs e) { string path; OpenFileDialog openFileDialog1 new OpenFileDialog(); openFileDialog1.InitialDirectory "c:\\" ; if(openFileDialog1.ShowDialog() DialogResult.OK){ Best Regards Amir *** Sent via Developer... |
|
| VS.NET intellisense (5 replies) |
| microsoft.public.dotnet.languages.csharp |
| Just wondering.... In a form load event, add the following: this.MaximumSize. at this point intellisense will show a dropdown where you can select "Width", even though this.MaximumSize.Width 10; is not valid. When I try to compile, I get: "c:\temp\WindowsApplication1\Form1.cs(251): Cannot modify the return value of 'System.Windows.Forms.Form.MaximumSize' because it is not a variable" Any idea why ... |
|
| Master - Detail Windows form (3 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, I have a master detail form set up. I am showing the detail/child records in a datagrid. The problem is that when a new child record is entered in the grid the foreign key is not auto entered and I get an error. How do I set the default value for this column? I am using two data adapters and a dataset control with a relation defined between the two tables. Thanks, AC |
|
| Desperate! String method "does not exist"?!? (7 replies) |
| microsoft.public.dotnet.languages.csharp |
| I have a TextBox with an ID of "Question6Answer18". I have a Save button (no form so I'm doing it manually) and in the code behind I'm trying to extract the 6 and the 18 into different variables. However, when attempting to access *any* string methods I get an error message saying that the method does not exist. I say any because I've tried several different ones trying to figure wtf is going on i... |
|
| Difference between string and String (6 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi All, Is there a difference between string and System.String? ..GetType() doesn't seem to work for string, is there a way to convert string to String? Cheers Dave |
|
| ArrayList contains object but how do I read a property from it? (10 replies) |
| microsoft.public.dotnet.languages.csharp |
| In the code below, How can I get the last MessageBox to display the PressNo. It says the object does not contain a definition for it but the .ValueMember seems to have no problem with it. I tried all sorts of things (for example, adding a .ToString() ) which doesnt help I can type ?AlistB[1].PressNo in the Immediate window and get a value back, just can't figure out how to do it within the program... |
|
| How to save all items in a listView and reload later? (10 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, I've been fighting with serialization, XML, etc. for a couple of days now, so now it's time to get some directed assistance! :^) I have an app with a ListView which the user populates with items (which have subitems/columns). I want to be able to save all of the items in the ListView to disk (format is not important) and re load them all at a later time to repopulate the ListView. This sounded... |
|
| C# pop up box (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, I have a treeview, that I want to have a lightweight box pop up when the mouse goes over each tree node. I want the effect to be the same as: a href "http://google.com" alt "Google" when in html you use 'alt', and a little tan popup box appears. Thanks |
|
| Best way to capture closing the app? (3 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, One more question ;^) In my app, I keep track of whether or not the user has data that needs to be saved. On exiting, I would like to display a dialog asking whether to save or not. This is easy for the buttons I have created to Exit, yet I cannot figure out how to capture the "X" button from the window frame... I have tried sticking the routine to the "Closing" event, but that did not seem to... |
|
| The better way to return array from function (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| I plan to define a function as Someclass[] function(...); However, I would like to process return array (for example, sort or delete somes). What should I do? [a] use the current design, copy returned array to collection and process later. [b] return as other type. What should the declaration look like in case [b]? [c] another choice, which I have not figured out how. TIA Somchai |
|
| Dynamic c# using sql server - possible? (6 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi! Is it possible to store code in a db server og txt file, and then dynamically compile it. Pseudo code: codeSnip request from a form posted("codeSnip"); runCommand("select code from codeLib where idx " codeSnip); Best, BB |
|
| passing values to thread (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, Is there any way to pass a value in to a thread. I want to pass an object to the thread function upon creation. thanks rakesh |
|
| OleDBDataAdapter's Update method question ... (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| I am trying to add a bunch of records to an Access table and am having a problem getting the data from the dataset to the table. My procedure is: 1.) Use the Fill method to load the dataset with the current database table . 2.) Add a bunch of records to the table. 3.) Create an Insert command for the DataAdapter 4.) Call the Update method to to update the table. My basic question is: Do I need to ... |
|
| Get Filename from DragEventArgs e (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| Ok here it goes... How do I get the filename of the dragged and dropped file in my winform in DragDrop event handler? i.e., How to extract the file name from DragEventArgs 'e' ??? TIA Josceline PS: In DragEnter event, I wrote : e.Effect DragDropEffects.Link; is it ok? |
|
| Stream can't read Thai Font (2 replies) |
| microsoft.public.dotnet.languages.csharp |
| I try to test the following code string sURL; sURL "http://www.kaveethai.com"; WebRequest wrGETURL; wrGETURL WebRequest.Create(sURL); Stream objStream; objStream wrGETURL.GetResponse ().GetResponseStream(); StreamReader objReader new StreamReader(objStream); string sLine objReader.ReadToEnd (); MailMessage myMail new MailMessage(); myMail.From "Ananthasri anan@wethai.com "; myMail.To "Ananthasri a... |
|