public class EditControlHook : IDisposable
Public Class EditControlHook
Implements IDisposable
Dim instance As EditControlHook
public ref class EditControlHook : IDisposable
type EditControlHook =
class
interface IDisposable
end
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Friend WithEvents EditControlHook As New EditControlHook
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Capture the Edit-Menu messages for TextBox1 and TextBox2
Me.EditControlHook.Controls = {Me.TextBox1, Me.TextBox2}
' Enable the Hook
Me.EditControlHook.Enabled = True
End Sub
Private Sub Form1_FormClosing() Handles MyBase.FormClosing
Me.EditControlHook.Dispose()
End Sub
Private Sub EditControlHook_Copy(ByVal sender As Object, ByVal e As EventArgs) _
Handles EditControlHook.Copy
MessageBox.Show(String.Format("Text copied in control: {0}", DirectCast(sender, Control).Name))
End Sub
Private Sub EditControlHook_Cut(ByVal sender As Object, ByVal e As EventArgs) _
Handles EditControlHook.Cut
MessageBox.Show(String.Format("Text cutted in control: {0}", DirectCast(sender, Control).Name))
End Sub
Private Sub EditControlHook_Paste(ByVal sender As Object, ByVal e As EventArgs) _
Handles EditControlHook.Paste
MessageBox.Show(String.Format("Text pasted in control: {0}", DirectCast(sender, Control).Name))
End Sub
Private Sub EditControlHook_Delete(ByVal sender As Object, ByVal e As EventArgs) _
Handles EditControlHook.Delete
MessageBox.Show(String.Format("Text deleted in control: {0}", DirectCast(sender, Control).Name))
End Sub
Private Sub EditControlHook_Undo(ByVal sender As Object, ByVal e As EventArgs) _
Handles EditControlHook.Undo
MessageBox.Show(String.Format("Text undone in control: {0}", DirectCast(sender, Control).Name))
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
EditControlHook | Initializes a new instance of the EditControlHook class. |
Controls | Gets or sets the edit-controls that will notify for windows messages. |
Enabled | Gets or sets a value indicating whether this EditControlHook is enabled. |
Dispose | Releases all the resources used by this instance. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Copy | Occurs when the text of the control is copied. |
Cut | Occurs when the text of the control is cutted. |
Delete | Occurs when the text of the control is deleted. |
Paste | Occurs when the text of the control is pasted. |
Undo | Occurs when the text of the control is undone. |
CanConvertTo |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
CanConvertToT |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions) |
IsDisposable |
Determines whether the specified object is a disposable type
(i.e., it implements IDisposable interface).
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
ThrowIfNullTException |
Throws the specified exception if the source object is null.
(Defined by ObjectExtensions) |