如果单击另一个按钮,则显示按钮 [英] Show button if another button is clicked

查看:60
本文介绍了如果单击另一个按钮,则显示按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能非常简单,但是如果单击另一个按钮,则需要显示一个按钮.我正在使用Visual Studio.

This is probably very simple, but I need a button to appear if another button is clicked. I am using Visual studio.

这是过程:

  1. 如果单击此按钮: cmdUpdateBooking
  2. 此按钮将出现: cmdUpdate

很抱歉提出一个非常简单的问题.编码示例将很有帮助.

Sorry to ask a very simple question. A coded example would be helpful.

推荐答案

在表单 Load 事件上将 cmdUpdate.Visible 属性设置为 False

Set cmdUpdate.Visible property to False on your Form Load event

   Private Sub YourFormName_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        cmdUpdate.Visible = False
    End Sub

cmdUpdateBooking Click 事件

Private Sub cmdUpdateBooking_Click(sender As System.Object, e As System.EventArgs) Handles cmdUpdateBooking.Click
    cmdUpdate.Visible = True
End Sub

这篇关于如果单击另一个按钮,则显示按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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