本文介绍了Visual Studio刷新表单,以另一种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个名为frmmain和frmpopup的窗体。 frmpopup表单将数据添加到数据库和frmmain listview中。点击名为btnadd的按钮时。我需要在frmpopup表单上的btnadd按钮中刷新frmmain,所以当frmpopup关闭时。它将刷新frmmain加载表单,因此它将再次加载frmmain,我的数据将显示在列表视图中



我尝试过:



单击构建按钮时为frmmain格式btnadd



  Dim  popup  As  frmpopup 
popup = frmpopup

popup.ShowDialog(

popup.Dispose()
frmmain.refresh





i需要刷新frmmain格式

解决方案

I have 2 windows forms called frmmain and frmpopup. The frmpopup form is adding data into the database and to the frmmain listview. When clicking on button called btnadd. I need to refresh the frmmain with in the btnadd button on the frmpopup form, so when frmpopup closes. it will refresh the frmmain load form , so it will load the frmmain again and my data will show in the listview

What I have tried:

this is in frmmain form when clicking the build in button btnadd

Dim popup As frmpopup
    popup = New frmpopup

       popup.ShowDialog(Me)

       popup.Dispose()
        frmmain.refresh 



i need to refresh the frmmain form

解决方案


这篇关于Visual Studio刷新表单,以另一种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-23 11:46