1

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

This is the process:

  1. If this button is clicked: cmdUpdateBooking
  2. This button will appear: cmdUpdate

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

ɐsɹǝʌ ǝɔıʌ
  • 4,440
  • 3
  • 35
  • 56
Brooksie
  • 27
  • 8

2 Answers2

1

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

Set cmdUpdate.Visible property to True on your cmdUpdateBooking Click event

Private Sub cmdUpdateBooking_Click(sender As System.Object, e As System.EventArgs) Handles cmdUpdateBooking.Click
    cmdUpdate.Visible = True
End Sub
ɐsɹǝʌ ǝɔıʌ
  • 4,440
  • 3
  • 35
  • 56
0

I don't think it matter if it's win, web, wpf or some other GUI for this answer. You set the cmdUpdate's visibility to false at design time, and on the click event handler of the second button you change it to true.

However if you want a code example you need to tell us if it's web, win, wpf or something else.

Zohar Peled
  • 79,642
  • 10
  • 69
  • 121
  • The code is not working: cmdUpdate.Visible = False If cmdUpdateBooking.Yes = Then cmdUpdate.Visible = True End If – Brooksie May 06 '15 at 11:37