强制按钮事件? [英] Force button event?

查看:53
本文介绍了强制按钮事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我有一个带有几个按钮的表格。


如果用户点击一个我想让它拨打点击()另一个事件

按钮。


在VB6中,这很容易但是他们已经在.NET中改变了它。


我们不能这样做:再打电话给mybutton_click()吗?


谢谢,

Adam Honek

解决方案

Adam Honek写道:

你好,

我有一个带有几个按钮的表格。
<如果用户点击一个我想让它调用另一个
按钮的Click()事件。

在VB6中,这很容易,但他们已经改变了它。 NET。

我们不能这样做:再打电话给mybutton_click()了吗?
谢谢,
Adam Honek




你试过使用Handles Button2.Click


-


Daniel

Windows 2000 / NT中的MCSE,MCP + I,MCP


--------------------------------------

从我的邮箱地址中删除第二个马德里联系我。


是的但它不会工作。


现在我有这样的事情:


如果e.KeyCode = Keys.Enter那么


处理btnX.Click()


结束如果


亚当


" Daniel" <哒**** @ madridmadridsoleado.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP14.phx.gbl ...

Adam Honek写道:

你好,

我有一个带有几个按钮的表格。

如果用户点击一个我希望它调用另一个
按钮的Click()事件。

在VB6中,这很容易,但他们已经在.NET中对其进行了更改。

可以''我们只是这样做:再打电话给mybutton_click()了吗?
谢谢,
Adam Honek



你试过使用Handles Button2.Click吗?

-

Daniel
MCSE,MCP + I,Windows 2000 / NT中的MCP

------- -------------------------------
从我的邮箱地址中删除第二个马德里,与我联系。



Adam,

myButton.PerformClick可能就是您所需要的。


Kerry Moorman

" Adam Honek"写道:

你好,

我有一个带有几个按钮的表格。

如果用户点击一个我希望它调用另一个
按钮的Click()事件。

在VB6中,这很容易,但他们已经在.NET中对其进行了更改。

可以''我们只是这样做:再打电话给mybutton_click()了吗?
谢谢,
Adam Honek



Hello,

I have a form with several buttons.

If a user clicks on one I want it to call the Click() event of another
button.

In VB6 this is very easy but they''ve changed it in .NET.

Can''t we just do: call mybutton_click() anymore?

Thanks,
Adam Honek

解决方案

Adam Honek wrote:

Hello,

I have a form with several buttons.

If a user clicks on one I want it to call the Click() event of another
button.

In VB6 this is very easy but they''ve changed it in .NET.

Can''t we just do: call mybutton_click() anymore?

Thanks,
Adam Honek



have you tried using "Handles Button2.Click"

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.


Yes but it won''t work.

Right now I have something like this:

If e.KeyCode = Keys.Enter Then

handles btnX.Click()

End If

Adam

"Daniel" <da****@madridmadridsoleado.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...

Adam Honek wrote:

Hello,

I have a form with several buttons.

If a user clicks on one I want it to call the Click() event of another
button.

In VB6 this is very easy but they''ve changed it in .NET.

Can''t we just do: call mybutton_click() anymore?

Thanks,
Adam Honek



have you tried using "Handles Button2.Click"

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.



Adam,

myButton.PerformClick might be what you need.

Kerry Moorman
"Adam Honek" wrote:

Hello,

I have a form with several buttons.

If a user clicks on one I want it to call the Click() event of another
button.

In VB6 this is very easy but they''ve changed it in .NET.

Can''t we just do: call mybutton_click() anymore?

Thanks,
Adam Honek



这篇关于强制按钮事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆