Right after i posted this i had an epiphany, i just replaced \r\n in the string with ` and split using that becasue i i was trying to find an odd character that no one uses very often and that solved my problem
numbers1thru9
Posts
-
String splitting -
String splittingI have a string that whenever it finds \r\n in the string i need it to be split, i tried using Text.Split("\r\n") but it doesnt like that. This is the only thing that is causing me errors with my printing, can anyone help me fix this? or does anyone know how i can count the number of times that \r\n appears in a string?
-
Wordwrapping when printingI am designing my print form but im having a small problem, some strings that I am wanting to print are longer than the print bounds and I would like to know if there is a way to make the string print within the bounds and wrap to the next line when it hits those bounds?
-
Printing in C#I am trying to take text data from a listview in my program and print it in a report. Im new to printing anything in any language. I have followed this article[^] only to get part of what i need. the error that i have is the part where it actually prints the elements, it wont, it just does the header and footer. but what i would like to know is does anyone know of a good tutorial i can follow to print text from a listview?
-
listview items double clickWould this cancel the checking or unchecking of an item in the listview?
-
listview items double clickin my listview if you double click an item, it checks or unchecks it. How can i capture the double click on an item and make it do something else?
-
listview item check problemprivate void lvTasks_ItemCheck(object sender, ItemCheckEventArgs e) { if (lvTasks.Items[e.Index].Checked == false && lvTasks.Items[e.Index].SubItems[6].Text == "0") { //sql.makeCompleted(user_num, lvTasks.Items[e.Index].SubItems[4].Text); taskList.Remove(lvTasks.Items[e.Index]); lvTasks.Items[e.Index].SubItems[6].Text = "1"; lvTasks.Items[e.Index].SubItems.Add(DateTime.Today.Date.ToShortDateString()); completedTasks.Add(lvTasks.Items[e.Index]); lvTasks.Items.RemoveAt(e.Index); } else if (lvTasks.Items[e.Index].Checked == true && lvTasks.Items[e.Index].SubItems[6].Text == "1") { completedTasks.Remove(lvTasks.Items[e.Index]); lvTasks.Items[e.Index].SubItems[6].Text = "0"; lvTasks.Items[e.Index].SubItems[7].Text = ""; taskList.Add(lvTasks.Items[e.Index]); lvTasks.Items.RemoveAt(e.Index); }
-
listview item check problemOK, im going to try and explain this the best I can. I have a listview that shows things by category with an associated treeview for displaying specific categories. I have the ItemCheck event handler changing categories whenever an item is checked and remove it from the listview. the problem is if the item is the last item in the listview when the box is checked/unchecked the program.cs throws an argument out or range exception. does anyone know why or how to fix it?
-
checked list view itemsok say i have a list of items in the listview, when i either check or uncheck them i want certain things to happen. but if i add an item to the listview, it fires the event handler as if i checked or unchecked an existing item and i want to block it from doing that.
-
checked list view itemsi have a listview in my program and whenever the item is checked or unchecked i want certain things to happen. how can i accomplish this without the item checked event handler taking over every time i add an item to the listview?
-
iterating arraylistsThanks for your help too :-D
-
iterating arraylistsI never thought about doing that and it worked perfectly, and was extremely simple. Thanks!!! :-D
-
iterating arraylistsI normally iterate through arraylists with a foreach loop. However im iterating to search for a certain item to remove from the arraylist and i cant iterate and remove the item when its found in the foreach loop becasue it throws an exception. my arraylist is holding a list of listview items and im going to use a for loop or while loop to remove it from the arraylist. my problem is that i dont know how to iterate through arraylists and extract a single item when im not using a foreach loop. can someone help me get the right syntax for this?
-
List viewsI found an article and designed a new user control based on that. :-)
-
List viewsAlso I need to know if there is a way I can make my listview columns in details view unable to be resized.
-
TreeViewHow can i make my treeview show all the items expanded by default?
-
system.web.mail and .net 1.1Im trying to code an email message. From what ive found is that im supposed to use system.web.mail however when i try to use it, it tells me that the namespace doesnt exist, can anyone help me out?
-
Email without an smtp serverI need to send an email message to receipients in my program. My problem is that I need it to send without an smtp relay. I found an example on this site on how to do it but it was written in C++ when I need it in C#. If someone can send me a link or code of how to do this, it would be greatly appreciated.
-
Hash Code retrievalI need to retrieve the MD5 Hashcode from running processes, how can I do this?
-
Showing unused drive lettersHow can I see what drive letters are being used by the system so i can return a list to the user that shows what drive letters are not being used?