Click here to Skip to main content
16,016,249 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Displaying time Pin
bhattiprolu28-Sep-07 0:24
bhattiprolu28-Sep-07 0:24 
GeneralRe: Displaying time Pin
Tom Deketelaere28-Sep-07 1:09
professionalTom Deketelaere28-Sep-07 1:09 
GeneralRe: Displaying time Pin
bhattiprolu28-Sep-07 2:12
bhattiprolu28-Sep-07 2:12 
GeneralRe: Displaying time Pin
Luc Pattyn28-Sep-07 2:36
sitebuilderLuc Pattyn28-Sep-07 2:36 
GeneralRe: Displaying time Pin
bhattiprolu28-Sep-07 3:23
bhattiprolu28-Sep-07 3:23 
GeneralRe: Displaying time Pin
Luc Pattyn28-Sep-07 3:59
sitebuilderLuc Pattyn28-Sep-07 3:59 
GeneralRe: Displaying time Pin
Dave Kreskowiak28-Sep-07 1:49
mveDave Kreskowiak28-Sep-07 1:49 
Questionhelp with keycode using plus key Pin
rexlizard27-Sep-07 15:59
rexlizard27-Sep-07 15:59 
I am relatively new with programming and am having some issues with the following code. It is basically a calculator where I have 3 line of numbers in textboxes LINE1, LINE2 and LINE3. When I hit the + key on my keyboard it will add the first two numbers and displays the answer in the textbox LINE1. However it also shows “+” at the end of the result ie ”45+”. How do I show the result "45" without showing the key that has been pressed. Also happens when I use the other keys
as well. ( / * - )

Any help is appreciated

Thanks

Martin


Public Class HELP

Dim I As Integer = 1
Dim ANS, X, Y, Z As Double

Private Sub LINE1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles LINE1.KeyDown
If e.KeyCode = Keys.Add Then ' 3 values entered. 1 for each line and the plus key is pressed
If I = 1 Then
Z = CDbl(LINE3.Text)
End If
I = 2
X = CDbl(LINE1.Text)
Y = CDbl(LINE2.Text)
ANS = X + Y ' Addition of Line1 and Line2 as would a calculator
LINE1.Text = ANS
LINE1.SelectionStart = LINE1.Text.Length
LINE1.Select() ' Why is ther a plus sign at the end of the answer
LINE2.Text = LINE3.Text
LINE3.Text = ""
End If
End Sub

End Class

AnswerRe: help with keycode using plus key Pin
The ANZAC27-Sep-07 16:12
The ANZAC27-Sep-07 16:12 
AnswerRe: help with keycode using plus key Pin
Luc Pattyn27-Sep-07 16:12
sitebuilderLuc Pattyn27-Sep-07 16:12 
GeneralRe: help with keycode using plus key Pin
rexlizard27-Sep-07 16:55
rexlizard27-Sep-07 16:55 
QuestionConcurency Issue Pin
twsted f827-Sep-07 15:24
twsted f827-Sep-07 15:24 
AnswerRe: Concurency Issue Pin
Dave Kreskowiak28-Sep-07 1:43
mveDave Kreskowiak28-Sep-07 1:43 
QuestionHow to get the value of numeric up down control Pin
Mekong River27-Sep-07 15:12
Mekong River27-Sep-07 15:12 
AnswerRe: How to get the value of numeric up down control Pin
Luc Pattyn27-Sep-07 16:13
sitebuilderLuc Pattyn27-Sep-07 16:13 
GeneralRe: How to get the value of numeric up down control Pin
Mekong River27-Sep-07 16:21
Mekong River27-Sep-07 16:21 
GeneralRe: How to get the value of numeric up down control Pin
Luc Pattyn28-Sep-07 0:38
sitebuilderLuc Pattyn28-Sep-07 0:38 
AnswerRe: How to get the value of numeric up down control Pin
Scott Dorman27-Sep-07 16:50
professionalScott Dorman27-Sep-07 16:50 
GeneralRe: How to get the value of numeric up down control Pin
Mekong River27-Sep-07 17:18
Mekong River27-Sep-07 17:18 
AnswerRe: How to get the value of numeric up down control Pin
Dave Kreskowiak28-Sep-07 1:39
mveDave Kreskowiak28-Sep-07 1:39 
QuestionBeginner ASP...VBScript Question Pin
T4AMD27-Sep-07 12:42
T4AMD27-Sep-07 12:42 
AnswerRe: Beginner ASP...VBScript Question Pin
Christian Graus27-Sep-07 15:07
protectorChristian Graus27-Sep-07 15:07 
QuestionMP3 structure Pin
haggenx27-Sep-07 12:36
haggenx27-Sep-07 12:36 
QuestionSaving and Loading forms from file? [modified] Pin
_Richard Faulkner_27-Sep-07 12:31
_Richard Faulkner_27-Sep-07 12:31 
AnswerRe: Saving and Loading forms from file? Pin
Paul Conrad30-Sep-07 13:41
professionalPaul Conrad30-Sep-07 13:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.