shootsnlad Posted September 18, 2003 Posted September 18, 2003 In the form_load section of a form I want to ask a user to pick from a list of items., and depending on what they choose, will depend on what loads on the form. Now the way I have it now, is that in the form_load event of the form, I fill a list box. My problem is how to display the list box, and then do some processing and then display the form. The list box is not actually on the form because if I put it on the form, the form will display with it. Now the listbox is defined and filled in code, but when I simply do a listbox.show, nothing happens. So here is what should happen in what order. Form_load event starts Listbox is filled Listbox is displayed User clicks on list item Form_load continues, searching for item chosen Form_load event ends Form is displayed Ideas? I think a list box is the way to go, but I could be wrong here. Thanks. shootsnlad Quote
aewarnick Posted September 18, 2003 Posted September 18, 2003 Is there any reason you are using Load instead of the Form's contructor? To solve your problem you will probably have to create a separate Form in the contructor, or Load if you choose, making the Form's ClientSize the same size as the ListBox and setting the FormBorderStyle to None. Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.