开发者

VB Calling Parent form's Methods in a usercontrol

control that contains a button. the user control is placed on my main form. when the button on the user control开发者_Go百科 is clicked I need to to call a method that is located in the mainform.vb


You don't call a method in the parent form, instead you raise an event which the parent form has a handler for. Here is a real simple example of what you do. Here, here and here are a few more related examples.


simply define the method as public and call it from any form...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜