下面的代码不起作用,错误表明方法ValidateSettings
没有与代理'Delgate Sub SettingChangingEventHandler(sender as Object, e as SettingChangingEventArgs)
'兼容的签名
将鼠标悬停在[...] AddressOf ValidateSettings
上时显示此错误>
Private Sub ValidateSettings(sender As Object, e As SettingChangingEventArgs)
End Sub
Private Sub frm_Settings_Load(sender As Object, e As EventArgs) Handles MyBase.Load
AddHandler My.Settings.SettingChanging, AddressOf ValidateSettings
PropertyGrid_Settings.SelectedObject = My.Settings
CenterToParent()
End Sub
下面的代码不起作用,错误表明方法ValidateSettings没有与delgate'Delgate Sub SettingChangingEventHandler(sender as Object,e as ...
解决方案是将Imports System.Configuration
添加到类中,如对原始帖子的评论所指出的。