fotini Posted August 26, 2003 Posted August 26, 2003 How can I change the ForeColor of a button when the mouse passes over this button? Quote la grecque
Datahighway Posted August 26, 2003 Posted August 26, 2003 Hi Fotini, i have found a example for you. ' Visual Basic Private Sub ImageButton1_Click(ByVal sender As System.Object, _ ByVal e As System.Web.UI.ImageClickEventArgs) _ Handles ImageButton1.Click Dim msg as String = "" Dim x As Integer = e.X Dim y As Integer = e.Y ' The button graphic is assumed to be 100x100 pixels. ' This checks coordinates against predetermined values that ' make up quadrants of the picture. If x >= 50 And y >= 50 Then msg = "Southeast" ElseIf x >= 50 And y < 50 Then msg = "Northeast" ElseIf x < 50 And y >= 50 Then msg = "Southwest" ElseIf x < 50 And y < 50 Then msg = "Northwest" End If Label1.Text = msg ' Display results End Sub I hope it helps Regards Datahighway Quote
Datahighway Posted August 26, 2003 Posted August 26, 2003 (edited) Hi i have found a better Solution. <script id=clientEventHandlersJS language=javascript> <!-- function Form1_onmouseover() { ' insert here you Code } //--> Insert this in the <form > onmouseover="return Form1_onmouseover()" Edited August 26, 2003 by Datahighway Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.