/home/wpollock1/public_html/VB/InvisibleBtnForm.vb

' Invisible Button Technique Demo
' this project shows how to put the initial focus on an "invisible"
' button (one with a width of zero).  It will appear that no control
' has the focus initially.  this is especially useful when the control
' that logically should have the lowest TabIndex is a RadioButton.
'
' Once the invisible button loses the focus, we want to remove it from
' the tab cycle (otherwise a user might get confused).
'
' Written 2/2010 by Wayne Pollock, Tampa Florida USA

Public Class InvisibleBtnForm
    Private Sub InvisibleBtn_LostFocus(ByVal sender As Object, _
        ByVal e As System.EventArgs) Handles InvisibleBtn.LostFocus
        ' Make sure this button never gets the focus again:
        InvisibleBtn.TabStop = False
    End Sub

    Private Sub ExitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitBtn.Click
        Me.Close()
    End Sub

    Private Sub InvisibleBtnForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' When the form is loaded (made visible) the RTF styled text is
        ' loaded from the named Resource, which was created using WordPad
        ' and added to the project's resources vial the Project's Properties page
        ' (added an existing file "InvisBtnText.rtf"):
        RichTextBox1.Rtf = My.Resources.InvisBtnText
    End Sub
End Class