mouse hover

4 posts, 0 answers
  1. Moe
    Moe avatar
    21 posts
    Member since:
    Jan 2018

    Posted 09 Sep 2019 Link to this post

    Hi Admin,

     

    MouseHover - I want to open the one of form and  once the mouse is moved away the form closes

    Please tell to me how to do like that?

     

    Thanks,

    Moe

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3559 posts

    Posted 10 Sep 2019 Link to this post

    Hello, Moe,

    If I understand your requirement correctly, you want to close the form once the user moves the mouse outside the form's bounds. For this purpose, you can refer to the following Stack Overflow thread which is quite useful on this topic: https://stackoverflow.com/questions/15974258/close-application-when-mouse-leaves-form

    However, if it is not the exact requirement, please give us some more details about the exact requirement that you are trying to achieve. Thus, we would be able to think about a suitable solution and assist you further. Thank you in advance.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

     

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Moe
    Moe avatar
    21 posts
    Member since:
    Jan 2018

    Posted 10 Sep 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi Dess,

     

    I have one radgridview. When I do mouse hover of the row , I want to open other form(FrmProcess). After mouse move out , I want to close the form(FrmProcess). I saw alot of mouseover event function other topic . But this event is not useful for me. I want mousehover event function.

     

    Thanks

    Moe

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3559 posts

    Posted 11 Sep 2019 Link to this post

    Hello, Moe,

    In order to achieve your goal, you can handle the MouseMove event that RadGridView offers and detect what is the visual cell element under the mouse. Store the last hovered row and if it changes indicate the another row is hovered. You can find below a sample code snippet. Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify it in a way which suits your requirements best:

            GridViewRowInfo lastHoveredRow = null;
    
            private void radGridView1_MouseMove(object sender, MouseEventArgs e)
            {
                GridCellElement cellElement = this.radGridView1.ElementTree.GetElementAtPoint(e.Location) as GridCellElement;
                if (cellElement != null)
                {
                    if (lastHoveredRow != null)
                    {
                        if (lastHoveredRow != cellElement.RowInfo)
                        {
                            Console.WriteLine("Out >> " + lastHoveredRow.Index);
    
                            Console.WriteLine("In >> " + cellElement.RowInfo.Index);
    
                        }
                    } 
                    lastHoveredRow = cellElement.RowInfo; 
                }
            }

    I hope this information helps.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top