Hi!
I have a round area which I want to be able to move the mouse over and fire
off events... how do I do that?
I have drawn a FillPie Graphics and I feel that there has to be a way of
getting to know if the mouse is over that area since I have the coordinates
to paint the Pie but I don't know where to start or what to look for really.
Best Regard
/Lars
Nov 21 '05
13 3155
Good stuff !, thats illuminating, its allways good to learn something new.!
Thanks
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:et******** ********@TK2MSF TNGP15.phx.gbl. .. OHM, But a Region (GraphicsPath really) can be circular!
Dim path As New System.Drawing. Drawing2D.Graph icsPath() path.AddEllipse (aRectangle)
So you could use either Region.IsVisibl e or GraphicsPath.Is Visible.
Borrowing your earlier code (untested):
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click Dim g As Graphics
g = pBox.CreateGrap hics
cp = New Point(pBox.Size .Width / 2, pBox.Size.Heigh t / 2)
g.DrawEllipse(N ew Pen(Color.Red), New Rectangle(cp.X - 10, cp.Y - 10, 20, 20)) End Sub
Private Sub pBox_MouseMove( ByVal sender As Object, ByVal e As System.Windows. Forms.MouseEven tArgs) Handles pBox.MouseMove Dim path As New System.Drawing. Drawing2D.Graph icsPath Dim cp As New Point(pBox.Size .Width / 2, pBox.Size.Heigh t / 2)
path.AddEllipse (New Rectangle(cp.X - 10, cp.Y - 10, 20, 20))
If path.IsVisible( e.X, e.Y) Then
Debug.WriteLine (e.X & " : " & e.Y)
End If
End Sub
I would probably keep a class instance variable for the outline of the
image being checked, the GraphicsPath above, then I would simply use this
variable in the MouseMove & Paint events. Depending on what the "area" is really
that the OP is wanting I would consider creating a derived control & set its Control.Region property to the shape desired (a round Button or round
Label for example).
Hope this helps Jay
"One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in
message news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. Yes but this is a circle, what you refer to is a rectangle test. I think the OP wanted to only fire events or trigger action at least when the mouse was inside a defined pie chart or ( circle )
--
OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message news:eu******** ******@TK2MSFTN GP10.phx.gbl... Hi,
Wouldnt region.isvisibl e be easier?
http://msdn.microsoft.com/library/de...sibletopic.asp
Ken --------------------- "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in
message news:uM******** ******@TK2MSFTN GP11.phx.gbl... No the answer is easier than that.
You take the centre of the client area and compute.
For example, if the radius is 10 your client area is 20,20. Then the centre point is 10,10. If x, or y is larger than the centre point + or - the mouse coordinates then this is out
Alternatively calculate the hypotenuse for any given point
H*H = A*A + O*O
Once you calculate the H = SQRT( A*A + O*O) you can compare this
against the Radius. to determin if the point is in.
--
OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Lars Netzel" <[stop_spam]@host.topdomain > wrote in message news:O%******** ********@TK2MSF TNGP11.phx.gbl. .. > Yes, it helps a little to understand how to get the posistion of the mouse > Cursor and compare with that op_Inequality but I'm not sure how to
get the > position to compare with... I mean, if I have the mouseCursor.. Do I need to > loop thru all the points within the Round Area and run the > op_inequality > test then, and how to I get the points for that Area...? > > /Lars > > > > > > > "Cor Ligthert" <no**********@p lanet.nl> skrev i meddelandet > news:uQ******** ********@TK2MSF TNGP09.phx.gbl. .. > > Lars, > > > > Did you ever see this nice sample I once have made in the past? > > > > It should have parts of your question. > > (it needs only a form and paste the code in) > > > > I hope you can use it? > > > > Cor > > > > \\\made by Cor Ligthert from ideas I got from Herfried. K. Wagner
and > Fergus > > Cooney > > Private WithEvents button1 As New Button > > Private mouseX, mouseY As Integer > > Private myMouseDown As Boolean > > Private Sub Form1_Load(ByVa l sender As System.Object, _ > > ByVal e As System.EventArg s) Handles MyBase.Load > > Dim g As New System.Drawing. Drawing2D.Graph icsPath > > g.AddString("HT H" & vbCrLf & "Cor", _ > > System.Drawing. FontFamily.Gene ricSansSerif, _ > > System.Drawing. FontStyle.Bold, 200, _ > > New Point(0, 0), _ > > System.Drawing. StringFormat.Ge nericDefault) > > Me.BackColor = Color.Red > > Me.Region = New System.Drawing. Region(g) > > g.Dispose() > > Me.AutoScaleBas eSize = New System.Drawing. Size(0, 0) > > Me.ClientSize = New System.Drawing. Size(500, 450) > > button1.BackCol or = System.Drawing. SystemColors.Ac tiveCaptionText > > button1.ForeCol or = System.Drawing. Color.Black > > button1.Locatio n = New System.Drawing. Point(425, 18) > > button1.Size = New System.Drawing. Size(20, 20) > > Me.Controls.Add (button1) > > button1.Text = "X" > > Me.Location = New System.Drawing. Point(50, 50) > > End Sub > > Private Sub Button1_Click(B yVal sender As Object, _ > > ByVal e As System.EventArg s) Handles button1.Click > > Me.Close() > > End Sub > > Private Sub Form1_MouseDown (ByVal sender As Object, ByVal _ > > e As System.Windows. Forms.MouseEven tArgs) Handles > > MyBase.MouseDow n > > myMouseDown = True > > mouseX = Cursor.Position .X - Me.Location.X > > mouseY = Cursor.Position .Y - Me.Location.Y > > End Sub > > Private Sub Form1_MouseMove (ByVal sender As Object, ByVal e _ > > As System.Windows. Forms.MouseEven tArgs) Handles
MyBase.MouseMov e > > Static LastCursor As Point > > Dim NowCursor As Point = New Point(Cursor.Po sition.X, > > Cursor.Position .Y) > > If Point.op_Inequa lity(NowCursor, LastCursor) Then > > If myMouseDown Then > > Me.Location = New System.Drawing. Point(Cursor.Po sition.X _ > > - mouseX, Cursor.Position .Y - mouseY) > > End If > > LastCursor = Cursor.Position > > End If > > End Sub > > Private Sub Form1_MouseUp(B yVal sender As Object, ByVal e As _ > > System.Windows. Forms.MouseEven tArgs) Handles MyBase.MouseUp > > myMouseDown = False > > End Sub > > /// > > > > > > "Lars Netzel" <[stop_spam]@host.topdomain > > > > Hi! > > > > > > I have a round area which I want to be able to move the mouse
over and > > fire > > > off events... how do I do that? > > > > > > I have drawn a FillPie Graphics and I feel that there has to be a way of > > > getting to know if the mouse is over that area since I have the > > coordinates > > > to paint the Pie but I don't know where to start or what to look > > > for > > really. > > > > > > Best Regard > > > /Lars > > > > > > > > > > > >
My Mistake,
Ken you were right and I was wrong.
Thanks
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:eu******** ******@TK2MSFTN GP10.phx.gbl... Hi,
Wouldnt region.isvisibl e be easier?
http://msdn.microsoft.com/library/de...sibletopic.asp
Ken --------------------- "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in
message news:uM******** ******@TK2MSFTN GP11.phx.gbl... No the answer is easier than that.
You take the centre of the client area and compute.
For example, if the radius is 10 your client area is 20,20. Then the centre point is 10,10. If x, or y is larger than the centre point + or - the mouse coordinates then this is out
Alternatively calculate the hypotenuse for any given point
H*H = A*A + O*O
Once you calculate the H = SQRT( A*A + O*O) you can compare this against
the Radius. to determin if the point is in.
--
OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Lars Netzel" <[stop_spam]@host.topdomain > wrote in message news:O%******** ********@TK2MSF TNGP11.phx.gbl. .. Yes, it helps a little to understand how to get the posistion of the
mouse Cursor and compare with that op_Inequality but I'm not sure how to get
the position to compare with... I mean, if I have the mouseCursor.. Do I
need to loop thru all the points within the Round Area and run the op_inequality test then, and how to I get the points for that Area...?
/Lars "Cor Ligthert" <no**********@p lanet.nl> skrev i meddelandet news:uQ******** ********@TK2MSF TNGP09.phx.gbl. .. Lars,
Did you ever see this nice sample I once have made in the past?
It should have parts of your question. (it needs only a form and paste the code in)
I hope you can use it?
Cor
\\\made by Cor Ligthert from ideas I got from Herfried. K. Wagner and Fergus Cooney Private WithEvents button1 As New Button Private mouseX, mouseY As Integer Private myMouseDown As Boolean Private Sub Form1_Load(ByVa l sender As System.Object, _ ByVal e As System.EventArg s) Handles MyBase.Load Dim g As New System.Drawing. Drawing2D.Graph icsPath g.AddString("HT H" & vbCrLf & "Cor", _ System.Drawing. FontFamily.Gene ricSansSerif, _ System.Drawing. FontStyle.Bold, 200, _ New Point(0, 0), _ System.Drawing. StringFormat.Ge nericDefault) Me.BackColor = Color.Red Me.Region = New System.Drawing. Region(g) g.Dispose() Me.AutoScaleBas eSize = New System.Drawing. Size(0, 0) Me.ClientSize = New System.Drawing. Size(500, 450) button1.BackCol or = System.Drawing. SystemColors.Ac tiveCaptionText button1.ForeCol or = System.Drawing. Color.Black button1.Locatio n = New System.Drawing. Point(425, 18) button1.Size = New System.Drawing. Size(20, 20) Me.Controls.Add (button1) button1.Text = "X" Me.Location = New System.Drawing. Point(50, 50) End Sub Private Sub Button1_Click(B yVal sender As Object, _ ByVal e As System.EventArg s) Handles button1.Click Me.Close() End Sub Private Sub Form1_MouseDown (ByVal sender As Object, ByVal _ e As System.Windows. Forms.MouseEven tArgs) Handles MyBase.MouseDow n myMouseDown = True mouseX = Cursor.Position .X - Me.Location.X mouseY = Cursor.Position .Y - Me.Location.Y End Sub Private Sub Form1_MouseMove (ByVal sender As Object, ByVal e _ As System.Windows. Forms.MouseEven tArgs) Handles MyBase.MouseMov e Static LastCursor As Point Dim NowCursor As Point = New Point(Cursor.Po sition.X, Cursor.Position .Y) If Point.op_Inequa lity(NowCursor, LastCursor) Then If myMouseDown Then Me.Location = New
System.Drawing. Point(Cursor.Po sition.X _ - mouseX, Cursor.Position .Y - mouseY) End If LastCursor = Cursor.Position End If End Sub Private Sub Form1_MouseUp(B yVal sender As Object, ByVal e As _ System.Windows. Forms.MouseEven tArgs) Handles MyBase.MouseUp myMouseDown = False End Sub ///
"Lars Netzel" <[stop_spam]@host.topdomain > > Hi! > > I have a round area which I want to be able to move the mouse over
and fire > off events... how do I do that? > > I have drawn a FillPie Graphics and I feel that there has to be a
way of > getting to know if the mouse is over that area since I have the coordinates > to paint the Pie but I don't know where to start or what to look for really. > > Best Regard > /Lars > >
OHM,
I would not (did not) say your were wrong! :-)
IMHO there are at least 3 ways to do every thing.
You just had a different way of seeing the problem & solving it. I used
GraphicsPath, Ken suggested Region. I also suggested creating a circular
control. I'm sure there are others, at least variations of what we all
suggested.
In case you were wondering to get a circular Region you need to start with a
circular GraphicsPath, which you pass to the constructor of the Region.
Just a thought
Jay
"One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in message
news:ee******** ********@TK2MSF TNGP11.phx.gbl. .. My Mistake,
Ken you were right and I was wrong.
Thanks
--
OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message news:eu******** ******@TK2MSFTN GP10.phx.gbl... Hi,
Wouldnt region.isvisibl e be easier?
http://msdn.microsoft.com/library/de...sibletopic.asp
Ken --------------------- "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in
message news:uM******** ******@TK2MSFTN GP11.phx.gbl... No the answer is easier than that.
You take the centre of the client area and compute.
For example, if the radius is 10 your client area is 20,20. Then the centre point is 10,10. If x, or y is larger than the centre point + or - the mouse coordinates then this is out
Alternatively calculate the hypotenuse for any given point
H*H = A*A + O*O
Once you calculate the H = SQRT( A*A + O*O) you can compare this against the Radius. to determin if the point is in.
--
OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Lars Netzel" <[stop_spam]@host.topdomain > wrote in message news:O%******** ********@TK2MSF TNGP11.phx.gbl. .. > Yes, it helps a little to understand how to get the posistion of the mouse > Cursor and compare with that op_Inequality but I'm not sure how to get the > position to compare with... I mean, if I have the mouseCursor.. Do I need to > loop thru all the points within the Round Area and run the > op_inequality > test then, and how to I get the points for that Area...? > > /Lars > > > > > > > "Cor Ligthert" <no**********@p lanet.nl> skrev i meddelandet > news:uQ******** ********@TK2MSF TNGP09.phx.gbl. .. > > Lars, > > > > Did you ever see this nice sample I once have made in the past? > > > > It should have parts of your question. > > (it needs only a form and paste the code in) > > > > I hope you can use it? > > > > Cor > > > > \\\made by Cor Ligthert from ideas I got from Herfried. K. Wagner and > Fergus > > Cooney > > Private WithEvents button1 As New Button > > Private mouseX, mouseY As Integer > > Private myMouseDown As Boolean > > Private Sub Form1_Load(ByVa l sender As System.Object, _ > > ByVal e As System.EventArg s) Handles MyBase.Load > > Dim g As New System.Drawing. Drawing2D.Graph icsPath > > g.AddString("HT H" & vbCrLf & "Cor", _ > > System.Drawing. FontFamily.Gene ricSansSerif, _ > > System.Drawing. FontStyle.Bold, 200, _ > > New Point(0, 0), _ > > System.Drawing. StringFormat.Ge nericDefault) > > Me.BackColor = Color.Red > > Me.Region = New System.Drawing. Region(g) > > g.Dispose() > > Me.AutoScaleBas eSize = New System.Drawing. Size(0, 0) > > Me.ClientSize = New System.Drawing. Size(500, 450) > > button1.BackCol or = System.Drawing. SystemColors.Ac tiveCaptionText > > button1.ForeCol or = System.Drawing. Color.Black > > button1.Locatio n = New System.Drawing. Point(425, 18) > > button1.Size = New System.Drawing. Size(20, 20) > > Me.Controls.Add (button1) > > button1.Text = "X" > > Me.Location = New System.Drawing. Point(50, 50) > > End Sub > > Private Sub Button1_Click(B yVal sender As Object, _ > > ByVal e As System.EventArg s) Handles button1.Click > > Me.Close() > > End Sub > > Private Sub Form1_MouseDown (ByVal sender As Object, ByVal _ > > e As System.Windows. Forms.MouseEven tArgs) Handles > > MyBase.MouseDow n > > myMouseDown = True > > mouseX = Cursor.Position .X - Me.Location.X > > mouseY = Cursor.Position .Y - Me.Location.Y > > End Sub > > Private Sub Form1_MouseMove (ByVal sender As Object, ByVal e _ > > As System.Windows. Forms.MouseEven tArgs) Handles MyBase.MouseMov e > > Static LastCursor As Point > > Dim NowCursor As Point = New Point(Cursor.Po sition.X, > > Cursor.Position .Y) > > If Point.op_Inequa lity(NowCursor, LastCursor) Then > > If myMouseDown Then > > Me.Location = New System.Drawing. Point(Cursor.Po sition.X _ > > - mouseX, Cursor.Position .Y - mouseY) > > End If > > LastCursor = Cursor.Position > > End If > > End Sub > > Private Sub Form1_MouseUp(B yVal sender As Object, ByVal e As _ > > System.Windows. Forms.MouseEven tArgs) Handles MyBase.MouseUp > > myMouseDown = False > > End Sub > > /// > > > > > > "Lars Netzel" <[stop_spam]@host.topdomain > > > > Hi! > > > > > > I have a round area which I want to be able to move the mouse over and > > fire > > > off events... how do I do that? > > > > > > I have drawn a FillPie Graphics and I feel that there has to be a way of > > > getting to know if the mouse is over that area since I have the > > coordinates > > > to paint the Pie but I don't know where to start or what to look > > > for > > really. > > > > > > Best Regard > > > /Lars > > > > > > > > > > > >
No worries, thanks Jay.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:OL******** ********@TK2MSF TNGP15.phx.gbl. .. OHM, I would not (did not) say your were wrong! :-)
IMHO there are at least 3 ways to do every thing.
You just had a different way of seeing the problem & solving it. I used GraphicsPath, Ken suggested Region. I also suggested creating a circular control. I'm sure there are others, at least variations of what we all suggested.
In case you were wondering to get a circular Region you need to start with
a circular GraphicsPath, which you pass to the constructor of the Region.
Just a thought Jay
"One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in
message news:ee******** ********@TK2MSF TNGP11.phx.gbl. .. My Mistake,
Ken you were right and I was wrong.
Thanks
--
OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message news:eu******** ******@TK2MSFTN GP10.phx.gbl... Hi,
Wouldnt region.isvisibl e be easier?
http://msdn.microsoft.com/library/de...sibletopic.asp
Ken --------------------- "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in
message news:uM******** ******@TK2MSFTN GP11.phx.gbl... No the answer is easier than that.
You take the centre of the client area and compute.
For example, if the radius is 10 your client area is 20,20. Then the centre point is 10,10. If x, or y is larger than the centre point + or - the mouse coordinates then this is out
Alternatively calculate the hypotenuse for any given point
H*H = A*A + O*O
Once you calculate the H = SQRT( A*A + O*O) you can compare this
against the Radius. to determin if the point is in.
--
OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Lars Netzel" <[stop_spam]@host.topdomain > wrote in message news:O%******** ********@TK2MSF TNGP11.phx.gbl. .. > Yes, it helps a little to understand how to get the posistion of the mouse > Cursor and compare with that op_Inequality but I'm not sure how to
get the > position to compare with... I mean, if I have the mouseCursor.. Do I need to > loop thru all the points within the Round Area and run the > op_inequality > test then, and how to I get the points for that Area...? > > /Lars > > > > > > > "Cor Ligthert" <no**********@p lanet.nl> skrev i meddelandet > news:uQ******** ********@TK2MSF TNGP09.phx.gbl. .. > > Lars, > > > > Did you ever see this nice sample I once have made in the past? > > > > It should have parts of your question. > > (it needs only a form and paste the code in) > > > > I hope you can use it? > > > > Cor > > > > \\\made by Cor Ligthert from ideas I got from Herfried. K. Wagner
and > Fergus > > Cooney > > Private WithEvents button1 As New Button > > Private mouseX, mouseY As Integer > > Private myMouseDown As Boolean > > Private Sub Form1_Load(ByVa l sender As System.Object, _ > > ByVal e As System.EventArg s) Handles MyBase.Load > > Dim g As New System.Drawing. Drawing2D.Graph icsPath > > g.AddString("HT H" & vbCrLf & "Cor", _ > > System.Drawing. FontFamily.Gene ricSansSerif, _ > > System.Drawing. FontStyle.Bold, 200, _ > > New Point(0, 0), _ > > System.Drawing. StringFormat.Ge nericDefault) > > Me.BackColor = Color.Red > > Me.Region = New System.Drawing. Region(g) > > g.Dispose() > > Me.AutoScaleBas eSize = New System.Drawing. Size(0, 0) > > Me.ClientSize = New System.Drawing. Size(500, 450) > > button1.BackCol or = System.Drawing. SystemColors.Ac tiveCaptionText > > button1.ForeCol or = System.Drawing. Color.Black > > button1.Locatio n = New System.Drawing. Point(425, 18) > > button1.Size = New System.Drawing. Size(20, 20) > > Me.Controls.Add (button1) > > button1.Text = "X" > > Me.Location = New System.Drawing. Point(50, 50) > > End Sub > > Private Sub Button1_Click(B yVal sender As Object, _ > > ByVal e As System.EventArg s) Handles button1.Click > > Me.Close() > > End Sub > > Private Sub Form1_MouseDown (ByVal sender As Object, ByVal _ > > e As System.Windows. Forms.MouseEven tArgs) Handles > > MyBase.MouseDow n > > myMouseDown = True > > mouseX = Cursor.Position .X - Me.Location.X > > mouseY = Cursor.Position .Y - Me.Location.Y > > End Sub > > Private Sub Form1_MouseMove (ByVal sender As Object, ByVal e _ > > As System.Windows. Forms.MouseEven tArgs) Handles
MyBase.MouseMov e > > Static LastCursor As Point > > Dim NowCursor As Point = New Point(Cursor.Po sition.X, > > Cursor.Position .Y) > > If Point.op_Inequa lity(NowCursor, LastCursor) Then > > If myMouseDown Then > > Me.Location = New System.Drawing. Point(Cursor.Po sition.X _ > > - mouseX, Cursor.Position .Y - mouseY) > > End If > > LastCursor = Cursor.Position > > End If > > End Sub > > Private Sub Form1_MouseUp(B yVal sender As Object, ByVal e As _ > > System.Windows. Forms.MouseEven tArgs) Handles MyBase.MouseUp > > myMouseDown = False > > End Sub > > /// > > > > > > "Lars Netzel" <[stop_spam]@host.topdomain > > > > Hi! > > > > > > I have a round area which I want to be able to move the mouse
over and > > fire > > > off events... how do I do that? > > > > > > I have drawn a FillPie Graphics and I feel that there has to be a way of > > > getting to know if the mouse is over that area since I have the > > coordinates > > > to paint the Pie but I don't know where to start or what to look > > > for > > really. > > > > > > Best Regard > > > /Lars > > > > > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paul Kaufman |
last post by:
What do I add to the style sheet to do this? Thanks.
-Paul, the CSS Newbie
|
by: Raj Chudasama |
last post by:
I have a controls similiar to the windows calculator. (Please press some
buttons on your calculator to see what i am talking about)
So when u hover over a button it will change the state (it changes to
different image)
if u click it will show pressed image etc
now the problem:
the calculator does the following
|
by: StriderBob |
last post by:
In a simple two form project, use a button on each form to Show() the other
form and Hide() the current form. Add MouseEnter and MouseLeave events to
both buttons so they change the image on each button when they are NOT
Clicked but the cursor enters their boundary.
This setup works fine. If the mouse cursor enters the button on the first
form the image changes and if the button is clicked the first form
disappears and the other form...
|
by: Fokke Nauta |
last post by:
Hi all,
I am searching for a script which does the following:
I have a frameset with two pages: left and right.
On the left page there is an image map. When I hover the mouse over a
certain area of the image map, I want to appear an image in the right page.
There are more area's on the image map. I want a specific picture to appear,
each one correlated to a specific area. Is there any scrip which can do
this?
|
by: Amy |
last post by:
I need some help.
I have this table with alternate row colors. Class gray and class
white. I have javascript that do highlight when mouseover row ... and
onclick to select row and highlight it with another color. Also created
a class called "Selected". You can only select a row at a time.
My problem is, if a row is preselected, when mouseover the selected
row, the selected color is screwed. Until you click on the selected row
once, the...
| |
by: Andy Baxter |
last post by:
hello,
I'm writing a panoramic image viewer in javascript. When the mouse is over
the image, I want it to be a crosshair (over most of the image), or a
hand/pointer (when it's over an image map region). The image map is
created in javascript, but doesn't set any 'cursor' style rules.
The problem I'm having is I have two images embedded inside two divs. The
outer div has style='... cursor:crosshair', but when I move over the image...
|
by: Spam Catcher |
last post by:
Hi all,
I'm having some trouble with the Mouse Hover/Leave events on a user
control.
Say I have a user control with a panel covering the whole control. In turn,
a label + picture box cover the panel.
If the mouse is anywhere over the user control, I want the background
colour to change.
|
by: kimiraikkonen |
last post by:
Hi,
I couldn't find a necessary class which shows when mouse hovers on a
link in Webbrowser control.
Think of there's a status bar(text), when mouse comes on a link, the
URL must be shown in this status bar.
How can i do this?
Thanks.
|
by: vidishasharma |
last post by:
Hi,
I have a windows from with few controls over it. Now I have to see if
the cursor goes outside the bounds of the windows form then I have to
close the form.
I added mouse leave for the form however as soon as the cursor goes on
any control over the form form_ MouseLeave is fired.
I want to this to be fired only if it goes outside the bounds of the
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |