i have started system calculater in vb.net using process.start() method but i want to retrive it s value in textbox , how can i do that

Recommended Answers

All 4 Replies

Perhaps you'd like to emply 'mates8.dll' (in the attached file there is an example). There needs to be a reference to the dll and the imports statement. Then, you may parse simple expressions calling the Expression.parseExpression method.


Imports m8 = mates8

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
             Dim expr As m8.Expression = m8.Expression.parseExpression(tBoxExpression.Text)
            tBoxResult.Text = expr.ToString
        Catch ex As Exception

        End Try
    End Sub
End Class

You can do it using AutoIt (free). If you create the AutoItX object within your program you can get the value in the calculator by

calc = "Calculator"

If aut.WinExists(calc) Then
    result = aut.WinGetText(calc)
    MsgBox(calc & " window not found")
End If
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.