|
-
Sep 28th, 2003, 11:27 AM
#1
Thread Starter
Lively Member
VB namespace to use or not to use ?
I am confused whether I should use any functions provided by microsoft.visualbasic namespace. This issue came about as I needed to check the ASCII character of the key pressed and used chr() function, this is a visualbasic namespace function and I noted also a line Microsoft.VisualBasic in the imports section.
My aim is that to make sure that
1. I do not use any VB.dll files.
2. Installation requires only the net framework
3. xcopy installations will be possible.
4. Do not have any incompatibility issues in the future.
Is it possible and is it advisable to not use any function which is microsoft.visualbasic name space.
Thanks
-
Sep 28th, 2003, 11:29 AM
#2
I wonder how many charact
Its possible, its up to you whether or not to use it. I don't use it myself.
-
Sep 28th, 2003, 11:36 AM
#3
Also a note using the VB namespace you can still accomplish 1-3, only 4 is questionable and it is possible that there will be no future problems (unless you plan to use Mono later).
-
Sep 28th, 2003, 12:32 PM
#4
Thread Starter
Lively Member
What will be the replacement for chr(). What will be the coding for something similar to the following:-
Private Sub txtConfPW_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtConfPW.KeyPress
If e.KeyChar = Chr(13) Or e.KeyChar = Chr(27) Then
Me.Close()
End If
End Sub
This is part of password confirmation screen where I want to cloase the screen if 'Enter' or 'Esc' is pressed.
-
Sep 28th, 2003, 02:05 PM
#5
-
Sep 28th, 2003, 05:12 PM
#6
Sleep mode
If you don't want to use Char function , do this :
VB Code:
If Asc(e.KeyChar()) = 13 Or Asc(e.KeyChar()) = 27 Then
Me.Close()
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|