• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Old form still display winforms c#

Resolved: Old form still display winforms c#

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I implement a form for handle excel file when click button “Start”. Event click Start button:
showFormSelectLanguage method display dialog for select language:
ShowDialogNotFoundSheet function for check sheet excel exist:
Event click confirm select language button at Select language form:
Event click Close button for close DialogNotFoundSheet form:
CheckSheetFile method:
Issue: When I click Close button at DialogNotFoundSheet form. Then FormSelectLanguage from still display. It repeats. How can resolve it? Expected 2 forms can close Thanks!
Update: All References btnImport_Click: References btnImport_Click
UI: FormSelectLanguage DialogNotFoundSheet

Answer:

I don’t exactly know what you did with btnImport_Click, but if your purpose is to disable the function of a button at a time and to enable it at another time, actually you don’t have to register or unregister the click event, you can simply set button’s Enabled propety.
My guess of the reason of this loop is that you have called += btnImport_Click many times, but -= btnImport_Click is never (or less) run.
For instance if you do:
Each time btnImport is clicked, btnImport_Click will get invoked twice.

If you have better answer, please add a comment about this, thank you!

c# winforms
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Openlayers: Update clusters depending on filter (geometryFunction)

24/03/2023

Resolved: Getting ‘502 Bad Gateway’ while deploying Springboot app in EKS

24/03/2023

Resolved: Why is NGINX’s $request_uri empty?

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.