Jump to content

Visual studio help

TheEpicDuck
Go to solution Solved by Naeaes,

There's two buttons there. When you hover over first button, it'll show the second and hide the first. When you hover over the second, it'll show the first and hide the second. Like so:

 

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Button2.Visible = False
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.MouseEnter
        Button2.Visible = True
        Button1.Visible = False
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.MouseEnter
        Button1.Visible = True
        Button2.Visible = False
    End Sub
End Class

I ignored the middle button. That's just a Msgbox("Your message here.", ,"Title here")

 I think this is done using the "OnMouseHover" function.

 

Here is an example:

 

Private Sub Button1_Hover(sender As Object, e As EventArgs) Handles Button1.MouseHover

Dim b as Button1_Hover

b.left = 100 'pixels from the left of the screen
b.top = 110 'pixels from the top of the screen
b.text = "click for free money"

End Sub

 

This doesn't do everything the GIF shows but it's a good starting point

Link to comment
Share on other sites

Link to post
Share on other sites

There's two buttons there. When you hover over first button, it'll show the second and hide the first. When you hover over the second, it'll show the first and hide the second. Like so:

 

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Button2.Visible = False
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.MouseEnter
        Button2.Visible = True
        Button1.Visible = False
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.MouseEnter
        Button1.Visible = True
        Button2.Visible = False
    End Sub
End Class

I ignored the middle button. That's just a Msgbox("Your message here.", ,"Title here")

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×