工具栏控件 [英] Toolbar control
本文介绍了工具栏控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用名为工具栏控件的控件。
我已经添加了5个按钮
现在我想添加一些命令到按钮1
当我将代码添加到工具栏点击事件然后它在每个按钮上播放
但我想只在按钮上播放该代码1我该怎么办
Thanx
Hi all,
I am using a control named toolbar control.
I have added 5 buttons to it
Now i want to add some commands to button 1
when i add code to toolbar click event then it played on every button
but i want to play that code only on button 1 how can i do
Thanx
推荐答案
你需要处理按钮的索引。
You need to handle the index of the button.
嗨!
在ToolBar1_Click事件中使用Select Case语句,如
Private Sub ToolBar1_Click()
选择案例ButtonCaption
案例新
电话相关功能
案例保存
呼叫相关功能
否则
呼叫相关功能
结束选择
结束次级
随着问候
Vijay。 R
Hi!
In the ToolBar1_Click event use the Select Case statement like
Private Sub ToolBar1_Click()
Select Case ButtonCaption
Case "New"
Call Related Function
Case "Save"
Call Related Function
Else
Call Related Function
End Select
End Sub
With Regards
Vijay. R
嗨!
在ToolBar1_Click事件中使用Select Case语句,如
Private Sub ToolBar1_Click()
选择案例ButtonCaption
。
。
Hi!
In the ToolBar1_Click event use the Select Case statement like
Private Sub ToolBar1_Click()
Select Case ButtonCaption
.
.
如果按钮没有标题怎么办?
What if the button has no caption ?
这篇关于工具栏控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文