Resources related to Hiding and showing a windows form

前端 未结 1 1214
感动是毒
感动是毒 2021-01-26 00:46

I have a form which has a picturebox and after clicking on a button another form will appear with a picture box containing the exact same picture. I use this line of code:

相关标签:
1条回答
  • 2021-01-26 01:46

    I'm not quite following why you need to hide and show the form. Are you just trying to get the form to refresh? If so, just call:

    Application.DoEvents()
    

    or else you can try invalidating your control:

    Image1.Invalidate()
    

    That should cause your form to update. You shouldn't need to hide and show again. If this isn't your issue, let me know in more detail what your problem is.

    0 讨论(0)
提交回复
热议问题