Connecting Tech Pros Worldwide Help | Site Map

Convert subroutine

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 25th, 2007, 03:05 PM
Galil
Guest
 
Posts: n/a
Default Convert subroutine

I have a subroutine I need to convert from vb.net 2005 to visual C++
( .net 2005)
The function only allows specific characters to be typed into a
textbox. the backspace and 0 -9.

Private Sub textbox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Select Case Asc(e.KeyChar) <-- Is this function available in C+
+?
Case 8, 48 To 57
e.Handled = False
Case Else
e.Handled = True
End Select
End Sub

Could someone convert this into C++?
Thank you


  #2  
Old September 25th, 2007, 03:15 PM
Jim Mack
Guest
 
Posts: n/a
Default Re: Convert subroutine

Please trim comp.lang.basic... from the reply list. It's a VB6 group,
not a .NET group.


Galil wrote:
Quote:
I have a subroutine I need to convert from vb.net 2005 to visual C++
( .net 2005)
The function only allows specific characters to be typed into a
textbox. the backspace and 0 -9.
>
Private Sub textbox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Select Case Asc(e.KeyChar) <-- Is this function available
in C+ +?
Case 8, 48 To 57
e.Handled = False
Case Else
e.Handled = True
End Select
End Sub
>
Could someone convert this into C++?
Thank you
  #3  
Old September 25th, 2007, 04:45 PM
=?UTF-8?B?RXJpayBXaWtzdHLDtm0=?=
Guest
 
Posts: n/a
Default Re: Convert subroutine

On 2007-09-25 17:04, Galil wrote:
Quote:
I have a subroutine I need to convert from vb.net 2005 to visual C++
( .net 2005)
The function only allows specific characters to be typed into a
textbox. the backspace and 0 -9.
>
Private Sub textbox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Select Case Asc(e.KeyChar) <-- Is this function available in C+
+?
Case 8, 48 To 57
e.Handled = False
Case Else
e.Handled = True
End Select
End Sub
To pure C++? Probably not since it is a method used together with .Net
Windows Forms classes. For more help ask in a group for the .Net
framework, such as microsoft.public.dotnet.framework.windowsforms.

--
Erik Wikström
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.