Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Use Enter Key As Tab

3 posts in DataWindow .NET Last posting was on 2004-09-16 15:30:02.0Z
Rajiv Gupta Posted on 2004-09-16 07:12:55.0Z
Sender: 290d.41493bd9.1804289383@sybase.com
From: Rajiv Gupta
Newsgroups: sybase.public.datawindow.net
Subject: Use Enter Key As Tab
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41493cf7.2914.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 16 Sep 2004 00:12:55 -0700
X-Trace: forums-1-dub 1095318775 10.22.241.41 (16 Sep 2004 00:12:55 -0700)
X-Original-Trace: 16 Sep 2004 00:12:55 -0700, 10.22.241.41
Lines: 6
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:380
Article PK: 124809

Being a VB programmer I am very happy with DW.NET
how do I use the Enter key to move from one column to
another in the DW.Net control as many of my users are more
comfortable with this instead of using the tab key

thanks


dfish Posted on 2004-09-16 12:06:55.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Use Enter Key As Tab
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <41497d1a.40927029@forums.sybase.com>
References: <41493cf7.2914.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
X-Original-NNTP-Posting-Host: vpn-dub-022.sybase.com
X-Original-Trace: 16 Sep 2004 05:14:22 -0700, vpn-dub-022.sybase.com
Lines: 33
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Sep 2004 04:54:44 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Sep 2004 05:06:55 -0700
X-Trace: forums-1-dub 1095336415 10.22.108.75 (16 Sep 2004 05:06:55 -0700)
X-Original-Trace: 16 Sep 2004 05:06:55 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:383
Article PK: 124810

I don't have this working properly yet but here is how I think it
should work.

In the DataWindowKeyDown event I have the following code:

If e.KeyValue = CInt(Keys.Enter) Then
SendKeys.Send("{Tab}")
End If

This works fine on a Freeform DataWindow but on a tabular DataWindow
it tabs to the next column but also scrolls to the next row.

I'll keep working on it but in the meantime if anyone else finds a
solution please post it here.

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 16 Sep 2004 00:12:55 -0700, Rajiv Gupta wrote:

>Being a VB programmer I am very happy with DW.NET
>how do I use the Enter key to move from one column to
>another in the DW.Net control as many of my users are more
>comfortable with this instead of using the tab key
>
>thanks


dfish Posted on 2004-09-16 15:30:02.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Use Enter Key As Tab
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <4149ada4.53351615@forums.sybase.com>
References: <41493cf7.2914.1681692777@sybase.com> <41497d1a.40927029@forums.sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
X-Original-NNTP-Posting-Host: vpn-dub-022.sybase.com
X-Original-Trace: 16 Sep 2004 08:37:30 -0700, vpn-dub-022.sybase.com
Lines: 76
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Sep 2004 08:17:50 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Sep 2004 08:30:02 -0700
X-Trace: forums-1-dub 1095348602 10.22.108.75 (16 Sep 2004 08:30:02 -0700)
X-Original-Trace: 16 Sep 2004 08:30:02 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:384
Article PK: 124812

I must have gotten up to early this morning. After thinking about it
for a while I realized that the enter key was probably still being
processed so it was moving to the next row and then the tab key was
being processed.

So the solution is to stop the enter key from being processed. Here is
how I did it:

Add a method to the form that overrides the ProcessCmdKey method:

Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean
If msg.WParam.ToInt32() = CInt(Keys.Enter) Then
SendKeys.Send("{Tab}")
Return True
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function 'ProcessCmdKey

In the DataWindowKeyDown event call that method:

Private Sub DWC1_DataWindowKeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles DWC1.DataWindowKeyDown
Dim msg As New System.Windows.Forms.Message

ProcessCmdKey(msg, Keys.Enter)

End Sub

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 16 Sep 2004 05:06:55 -0700, dfish@_no_spam_sybase.com (Dave Fish

[Team Sybase]) wrote:

>I don't have this working properly yet but here is how I think it
>should work.
>
>In the DataWindowKeyDown event I have the following code:
>
> If e.KeyValue = CInt(Keys.Enter) Then
> SendKeys.Send("{Tab}")
> End If
>
>This works fine on a Freeform DataWindow but on a tabular DataWindow
>it tabs to the next column but also scrolls to the next row.
>
>I'll keep working on it but in the meantime if anyone else finds a
>solution please post it here.
>
>Regards,
>Dave Fish
>Sybase
>
>TeamSybase blogs: http://www.teamsybase.net/blogs
>
>DataWindow.NET code examples available on CodeXchange:
>http://datawindownet.codexchange.sybase.com
>
>On 16 Sep 2004 00:12:55 -0700, Rajiv Gupta wrote:
>
>>Being a VB programmer I am very happy with DW.NET
>>how do I use the Enter key to move from one column to
>>another in the DW.Net control as many of my users are more
>>comfortable with this instead of using the tab key
>>
>>thanks
>