tags:

views:

56

answers:

2

How can it be done with c#?

I'm able to populate a listbox on a button click, but don't know how it can be done on application startup.

Thanks.

+3  A: 

Put the same code in the constructor of the form.

Ardman
That was so simply! Thanks a lot.
Alex
@Alex: If it helped. Don't forget to mark as answer to help others.
Ardman
+1  A: 

Double click on the form (empty space).

This will generate a Window_Loaded(...) {}; event.

Put your code between the curly braces.

Snake