English 中文(简体)
• 如何在2008年视觉基础中形成动态的文本箱
原标题:How to make a dynamic textbox in visual basic 2008

2008年,我是新鲜事,正试图申请计算体积(化学)。

下面是方程式(非化学)

              M1V1=M2V2

如果M1和M2为Molarity,V1,V2为数量(所有变量)。

为此,我提出了四个文本箱和一个纽州。 现在,如果提供其他三个价值观,我只能找到一个变数的M2

页: 1

              M2=(M1V1)/V2

i 想知道,如何使这一应用更具活力

lets say i want to find

   M1,M2,V1 or V2 any of these,just providing the other three values

我认为,如果能提供其他信息,但我会知道如何做到这一点。

预先感谢您的帮助

问题回答

我将以这种方式处理此事。

我将列举我的四个文本箱:

txtM1
txtM2
txtV1
txtV2

then

Create:

 Private Sub textbox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtM1.TextChanged, txtM2.TextChanged, txtV1.TextChanged, txtV2.TextChanged
               Select Case True
        Case txtM1.Text <> "" AndAlso _
             txtV1.Text <> "" AndAlso _
             txtV2.Text <> ""
            txtM2.Text = CInt((txtM1.Text * txtV1.Text) / txtV2.Text)
        Case txtM2.Text <> "" AndAlso _
             txtV1.Text <> "" AndAlso _
             txtV2.Text <> ""
            txtM1.Text = "Your formula for M1"
        Case txtM1.Text <> "" AndAlso _
             txtM2.Text <> "" AndAlso _
             txtV1.Text <> ""
            txtV2.Text = "Your formula for V2"
        Case txtM1.Text <> "" AndAlso _
             txtM2.Text <> "" AndAlso _
             txtV2.Text <> ""
            txtV1.Text = "Your formula for V1"
    End Select        End Sub




相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签