?
Solved

Windows.Forms.Cursor.Hide()

Posted on 2009-04-14
2
Medium Priority
?
536 Views
Last Modified: 2012-08-13
in Form2_Load i use Windows.Forms.Cursor.Hide()

then ..

on Form2_Load

Windows.Forms.Cursor.Show()

so far so good .. now i want the cursor hidden again when a close button on form2 is pressed or a user hits close button in the FormBorder..

On Event: Form2_Closing : Windows.Forms.Cursor.Hide()

This Event should be trigger both when the close button is hit on the FormBorder as wel on the when Button1 on Form2 is clicked ..

For some reason this is not working




Private Setup_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
       
      Windows.Forms.Cursor.Hide()
 
    End Sub
 
 
    Private Sub Setup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
        Windows.Forms.Cursor.Show()
 
    End Sub
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 
        Me.Close()
 
    End Sub

Open in new window

0
Comment
Question by:Amien90
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
Daniel Reynolds earned 1500 total points
ID: 24143183
Perhaps you need to set a global cursor state flag and then when the first form gets the focus back, check the cursor status flag and set it appropriately.
0
 

Author Comment

by:Amien90
ID: 24151302
Windows.Forms.Cursor.Hide() is the global cursus state flag i think. Whats the event is fired right afte form1 gets back in focus?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question