Insert/Overwrite mode

How can I detect the state or mode of the Insert key?

Whether the current state is Insert or Overwrite?

(VB 2005)

[135 byte] By [TENware] at [2008-2-25]
# 1
I think in the statusbar you see something but you can see the status on the shape of the cursor. The normal think one is for insert, the fat one for overwrite.
ralf_oop at 2007-9-25 > top of Msdn Tech,Visual Studio Orcas,Visual Basic Express Orcas...
# 2

Various functions for getting the status of various keyboard states and the Local time on the machine

My.Computer.Keyboard.NumLock
My.Computer.Keyboard.CapsLock
My.Computer.Keyboard.ScrollLock

and the following should get you the insert key status

Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Integer) As Integer
Const VBKeyInsert As Integer = 45

' Get the current state of the Insert key / Overstrike
Function GetInsertKey() As Boolean
GetInsertKey = GetKeyState(VBKeyInsert)
End Function

Hope that gets you going.
spotty at 2007-9-25 > top of Msdn Tech,Visual Studio Orcas,Visual Basic Express Orcas...

Visual Studio Orcas

Site Classified