Tab Key Not Working - Wierd! 
Author Message
 Tab Key Not Working - Wierd!

Hi Bharat,

I created a VB.Net program of type Class Library.

Here's the pertinant code from the Class Library:

<ComClass(NetForms.ClassId, NetForms.InterfaceId, NetForms.EventsId)> _

Public Class NetForms

#Region "COM GUIDs"

' These GUIDs provide the COM identity for this class

' and its COM interfaces. If you change them, existing

' clients will no longer be able to access the class.

Public Const ClassId As String = "B6CC7260-3603-4123-B48D-39BB38B9B951"

Public Const InterfaceId As String = "FE5C28CB-E7F6-408C-A3F7-AD4B9B3C8C7B"

Public Const EventsId As String = "068B5173-B529-41C5-A406-60855CE52E01"

#End Region

Public Sub New()

MyBase.New()

End Sub

Public Sub ShowPO(ByVal PoID As Integer)

'note PoID = Integer, which is VB6 LONG

Dim fPO As New frmPO(MyErrh)

fPO.POID = CLng(PoID)

fPO.Show()

End Sub

From VB6, I do:

Private moSudsNet As Object
    Set moSudsNet = CreateObject("SudsNet.NetForms")

and to show the .Net form:

    moSudsNet.ShowPO lPOID

The .Net form is a plain windows form with a few combo boxes, labels and
text boxes.  The tab order works until a textbox gets the focus.

If you need, I'll put together some sample projects (one in VB6, one in
VBNet)
that will duplicate the problem, in case my explanation here is not clear.

Regards,
    Selden



Quote:
> Are you testing this class inside another .NET windows application or in
> VB6?
> Can you give me brief description to repro this issue?

> Thanks!
> Bharat Patel
> Microsoft, Visual Basic .NET

> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Please reply to newsgroups only. Thanks.



Sat, 29 Jan 2005 05:03:20 GMT  
 Tab Key Not Working - Wierd!
Hi Selden,

I tested this out and I found the reason why it happens. When you use Show
method of the form, the form opens nonmodally and thus there is no windows
message loop associated with it. If you use ShowDialog method instead of
Show, the form opens modally and the Tab keys work fine as expected. In
this case a new message loop for the windows form gets created. Can you
open the Form Modally?

Thanks!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.              



Sun, 30 Jan 2005 01:53:26 GMT  
 Tab Key Not Working - Wierd!
While I am in no way commenting on your specific solution to the
original problem, I do wish to question the general modality question
that MS is so keen on.

IMHO MS products make far and away too much use of modal windows -
they are generally quite irritating to work with. For example, editing
any Stored Procedure in Sql Server's Enterprise Manager results in a
modal window, thereby preventing any other (possibly related) stored
procedure, or table design, window from being opened. Many dialogues
throughout Windows 2000 are also modal - and, IMHO, usually quite
unnecessarily. One wonderful example of really powerful software is
Directory Opus, which is a replacement for Explorer. Even when the
Customize option is chosen (in order to change menus, toolbars, etc.)
the application continues to allow any other window to be opened, so
you can gauge the results of your tinkering as you go. I know of no MS
product that works like this.

--
Paul Thornett



Quote:
> I tested this out and I found the reason why it happens. When you
use Show
> method of the form, the form opens nonmodally and thus there is no
windows
> message loop associated with it. If you use ShowDialog method
instead of
> Show, the form opens modally and the Tab keys work fine as expected.
In
> this case a new message loop for the windows form gets created. Can
you
> open the Form Modally?



Sun, 30 Jan 2005 15:05:37 GMT  
 Tab Key Not Working - Wierd!
Hi,

Thanks for your comment and feedback. This seems like a useful suggestion;
however, I would suggest you to send your feedback directly  to

Thanks!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.              



Sun, 30 Jan 2005 21:31:45 GMT  
 Tab Key Not Working - Wierd!
That worked!  It also solved the problem where TAB was not
moving the focus from cell to cell in the datagrid.  Thanks!


Tue, 01 Feb 2005 23:18:34 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. tab-key navigation not working

2. SOLUTION - Arrow / Navigation keys / TAB not Working in Visual Basic

3. TAB Enter key not working in VB OCX

4. TAB key not working with ActiveX Document in IE

5. tab-key navigation not working

6. Tab key not working in IE4

7. TAB key not working with ActiveX Document in IE

8. TAB key not working with ActiveX Document in IE

9. Capturing Tab key and Shift-Tab key

10. DBGrid Delete Key function not working on some DBGrids while it works on others

11. tab and arrow keys don't work after debugging

12. WHY DID THE TAB KEY STOP WORKING?

 

 
Powered by phpBB® Forum Software