
Signature
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
Hi again OHM,
thanks for the below suggestion I tried this and it didn't work or
didn't work consistantly.. what I've eventually done - and this is a
little clumsy - but is now working the way I want is the following:
Created a custom control button in which I put the following
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean
Select Case CType(msg.WParam.ToInt32, Keys)
Case Keys.Enter
bln_enterKeyPressed = True
Return True
Case Else
bln_enterKeyPressed = False
Return MyBase.ProcessCmdKey(msg, keyData)
End Select
End Function
Public ReadOnly Property EnterKeyPressed() As Boolean
Get
Return bln_enterKeyPressed
End Get
End Property
Basically doesn't respond to the enter key but the property records
that the
enter key was pressed & then in the form that the custom control
button sits on:-
Private Sub cc_TabPageButton_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles cc_TabPageButton.KeyUp
If e.KeyCode = Keys.Tab Then ' - ignore the tabkey as the user
will have tabbed to the control
Else
If cc_TabPageButton.EnterKeyPressed Then
ButtonDualHandler()
End If
End If
End Sub
Private Sub cc_TabPageButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cc_TabPageButton.Click
ButtonDualHandler()
End Sub
Thanks again for your replies, they helped to point me in the right
direction
Regards
Suzanne
> What I have discovered is that if you trap the keyPress/Down/Upo events,
> they never get fired on a Tab Page. If you disable the Causes Validation on
> the TabControl ( not the Tab Pages ), pressing the Enter key has the effect
> of firing the Buttons_Click Event.
>
> HTH
One Handed Man \( OHM - Terry Burns \) - 11 Oct 2004 16:40 GMT
Good Idea, It would be good to get an explaination for this behaviour
though. I suggest that you repost the question having been through the
excercise, perhaps one of the other regulars can come up with an
explaination as to how this should work, or why it works the way it does,
because frankly Im at a loss with this one.

Signature
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
> Hi again OHM,
>
[quoted text clipped - 58 lines]
>>
>> HTH