For some reason I forgot about this. But when you launch an application, I know about having an icon for the form, but I forgot about having an icon for the application so that when it runs it has your icon on the task bar.
To do this its real simple. Just go to the Project Properties. Click on the Application Tab (it is probably the default selection). Then select "Icon:" and browse to in icon that you would lile. That's it.
You could so something in the MouseMove, MouseEnter, MouseLeave events, but I like this solution below. It uses a Timer and the on the Timer Click events it can determine if a control has Focus. In the situation below, I have two controls that are within a splitcontainer. when I mouse over the control, I want that control to have focus. For some reason it wasn't happening, and this code below takes care of that situation. I also had to use the PointToScreen call because the Controls are within the splitContainer and I wasn't getting the proper position otherwise.
Private WithEvents mTimer As Timer
Public Sub New()
' This call is required by the Windows Form Designer.
' Add any initialization after the InitializeComponent() call.
mTimer = New Timer()
mTimer.Interval = 200
mTimer.Enabled = True
Private Sub mTimer_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles mTimer.Tick
Dim CursorPosition As Point = PointToScreen(Cursor.Position)
Dim Control1Bounds As New Rectangle(ImageContainer1.PointToScreen(Control1.Location), Control1.Size)
Dim Control2Bounds As New Rectangle(ImageContainer2.PointToScreen(Control2.Location), Control1.Size)
If Control1Bounds.Contains(CursorPosition) Then
ElseIf Control2Bounds.Contains(CursorPosition) Then
You can use the Me.ActiveControl property, additionally if a control is withing another control you can call this property from the control. For Example if you have a SplitContainer which has another control in it you can do the following:
If Me.ActiveContainer Is SplitContainer1 Then
If SplitContainer1.ActiveControl Is MyControl1 Then
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.Modifiers = Keys.Control Then If e.KeyCode = Whatever key ou want End If End If End Sub
I got this message when plugging in my ipod to my computer.
The solution seems to be this (at least it worked for me): 1. I clicked ok, then waited for the sync to complete. It appears that despite the message it still syncs but slowly and sometimes not all the files are synced with this error. I then unplugged my ipod and closed itunes. 2. Go to Control Panel > Administrative Tools > Services. Select 'Apple Mobile Device' and on the left side click 'Stop the service'. After it has stopped then select 'Start the service'. Then try opening iTunes again (I just plugged in my ipod back in and that launched itunes)