Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Andrew Em

@Andrew Em
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Multiple select in listbox
    A Andrew Em

    For the first i might add that i'm new to programming, it is one of my first projects i'm playin around with, so didn't know what "iterate" the list meant, and i didn't know how to use "SetSelected" method etc, i'm mostly trying my way there but error messages aint very funny. Anyways thanks for the help, got it all working now i think.

    Light is faster than sound... Thats why some people look smart till they start to talk.

    C# help question

  • Multiple select in listbox
    A Andrew Em

    Martin# wrote:

    Yes, a "make my homework, so I don't have to think!" message board is missing!

    Not asking anyone to "make my homework", i simply couldn't get it working... Tried understanding it, tried to get it work and i couldn't, thats why i asked.

    Light is faster than sound... Thats why some people look smart till they start to talk.

    C# help question

  • Multiple select in listbox
    A Andrew Em

    Good one, worked on first try :-D Thanks! Next part of the application is to make another listbox select the same indexes as the first one does, heres also the problem that it only selects one. (note: the same indexes, not the same numbers :)) Any suggestions?

    Light is faster than sound... Thats why some people look smart till they start to talk.

    C# help question

  • Multiple select in listbox
    A Andrew Em

    think you could explain how i do that or add a code sample? Would appreciate it. Thanks

    Light is faster than sound... Thats why some people look smart till they start to talk.

    C# help question

  • Multiple select in listbox
    A Andrew Em

    Hi I'm building a little "search" function for my listbox! This is what i want to happend: I got a textbox, then i write the number (the listbox contains a list of numbers) i want to find. The number i write in the textbox should then get selected in the listbox when i click a button. That far, it works great with this code: lstlistBox1.SelectedItem = txttextBox1.Text; Now to the problem. If the number i write in the textbox exists more than one time in the list, i want all the items with that name to get selected. Been trying with loops and stuff to make it happend but just wont work. Anyone got a suggestion? Thx in advance

    Light is faster than sound... Thats why some people look smart till they start to talk.

    C# help question

  • Text file handling issue
    A Andrew Em

    Thank you for your answers. The reason i work with text files is that this is my first "real" c# project, and i'm not very skilled in using it. Was mainly playing around trying to find a way to solve my problems. Found a number of problems with it though so thinking of using access database instead. If you could add some comments to the above code example i'd be grateful, dont really understand every part of it. Thanks --

    Light is faster than sound... Thats why some people look smart till they start to talk.

    C# help data-structures tutorial question

  • Text file handling issue
    A Andrew Em

    Hi I got a problem with the project i'm building, i'm using StreamWriter and to append text to a textfile, so the text file look like this: entry1 entry2 entry3 *blank row* entry4 entry5 entry6 *blank row* i do that with this code: StreamWriter sw = File.AppendText("test.txt"); sw.WriteLine(tb1.Text); sw.WriteLine(tb2.Text + " : " + tb21.Text); sw.WriteLine(tb3.Text); sw.WriteLine(); sw.Flush(); sw.Close(); Then i use a loop and array to read those files into my application. TextReader TR = new StreamReader("test.txt"); int NumberOfLines = 20; string[] ListLines = new string[NumberOfLines]; for (int i = 1; i < NumberOfLines; i++) { ListLines[i] = TR.ReadLine(); } Now i got the problem, i need to be able to delete/change the "packs" between the blank line, was thinking something like making a backup of the file and re-writing it, without the selected pack (using a listbox to select) or in some way replace that pack with what the user types in instead when i hit the delete or change button. The problem is i dont know how to get the "new" text to the same position as the old when i change it. Anyone got an idea? Sorry if i confuse you :) --

    Light is faster than sound... Thats why some people look smart till they start to talk.

    C# help data-structures tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups