开发者

how to prompt the user before form load event fires in windows forms application using c#?

开发者 https://www.devze.com 2023-03-08 04:58 出处:网络
i want to prompt the user to enter his number to get the details from data开发者_如何学运维base before the form Load event fire in windows forms application using c#?

i want to prompt the user to enter his number to get the details from data开发者_如何学运维base before the form Load event fire in windows forms application using c#?

can anyone please tell me how to implement this?

thanks in advance.


Put it into the Main method of Program.cs.

You can show a winform or dialog in the Main method before you run your main application. This allows the user to enter some data and you can then act on that before running your main form.

I have an application that can start in one of two ways. I display a selector window from Main. The user selects from the options and I collect that when the selector form closes.

I then start my main form taking account of that. This would also allow you to start different forms depending on the user input if you wish


Write your code in program.cs or in constructor of form

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号