How VB generates a TEXTBOX at the push of a button

Updated on healthy 2024-05-23
10 answers
  1. Anonymous users2024-02-11

    Add two buttons to the form: command1, command2, and a text box: text1, and then set the index property of text1 to 0 in the properties window

    private sub command1 click() Click to add a text box one at a time.

    dim i as long

    i =load text1(i)

    text1(i).visible = truetext1(i).zorder

    text1(i).move text1(0).left + text1(0).width * i

    end sub

    private sub command2 click() Click to delete one text box at a time.

    dim i as long

    i = - 1

    if i > 0 then unload text1(i)end sub

    Note: text1(0) is placed on the form at design time and cannot be deleted.

  2. Anonymous users2024-02-10

    textbox tb = new textbox;

    As for deleting, you can delete it directly or hide

  3. Anonymous users2024-02-09

    Haha, there's still a problem, step on me, increase adoption.

  4. Anonymous users2024-02-08

    'Copy the contents of the text box to the clipboard.

    Paste the contents of the clipboard into the text box.

  5. Anonymous users2024-02-07

    Copy: private sub command1 click().'to the focus.

    0 'Sets the selected start position = len('Sets the selected length.

    Clear the contents of the clipboard.

    Copy the selected text to the clipboard.

    end sub

    Paste: private sub command2 click()=

    end sub

  6. Anonymous users2024-02-06

    private sub command1_click()randomize

    upperbound = 100

    lowerbound = 1

    int((upperbound - lowerbound + 1) *rnd + lowerbound)

    end sub

    where upperbound is the maximum value of the random number and lowerbound is the minimum value of the random number. You can set it up yourself.

  7. Anonymous users2024-02-05

    Chinese: 85 Mathematics: 90 English, 45 Biology, 93

    The data format is not standard.

    Either there is a separator or no separator. If there is a separator, it should also be uniform, using commas or spaces, or Chinese semicolons or English semicolons.

    Zhang Zhichen: Please explain.

  8. Anonymous users2024-02-04

    mid (text, start position, end position).

  9. Anonymous users2024-02-03

    The first button event is written.

    dim strrnd as string

    dim i as integer

    for i = 1 to 20 'Generate 20 random numbers.

    strrnd = strrnd & str(int(50 * rnd + 1))

    nexttextbox1 = trim(strrnd) 'Place the generated 20 random numbers into the first text box.

    The second button event is written.

    dim strrnd as string

    dim i as integer

    dim j as integer

    dim arrystr() as string

    dim strnew as string

    arrystr = split(trim(textbox1), " ") 'Split the value of textbox1 into an array.

    for i = 0 to ubound(arrystr) 'Sort the values in the array using the bubble method.

    for j = 0 to ubound(arrystr) -1

    if int(arrystr(j)) int(arrystr(j + 1)) then

    strnew = arrystr(j + 1)

    arrystr(j + 1) = arrystr(j)

    arrystr(j) = strnew

    end if

    next j

    next i

    strrnd = ""

    for i = 0 to ubound(arrystr)

    strrnd = strrnd & " " & arrystr(i) 'Concatenate the values in an array into a string.

    nexttextbox2 = trim(strrnd) 'Displays the sorted values in the text box.

  10. Anonymous users2024-02-02

    You can write a loop!

    For example: for i=1 to 50

    next i

    Doesn't that add up to 50?

Related questions
11 answers2024-05-23

Take a look for yourself, too lazy to write, a group of people in the Du Niang library.

13 answers2024-05-23

On the first floor, your method generates an array of controls that can't respond to events.

7 answers2024-05-23

It is recommended to go to a big hospital. The online ones are not quite accurate. Traditional Chinese medicine says, looking, asking, listening, and cutting. If you just say that, how can you guarantee that what you say is accurate. And how do you know if someone else is saying the right thing. Rushing to the doctor is likely to exacerbate the condition and miss the best time.

20 answers2024-05-23

If such a button existed, I don't think I would have pressed it, because I couldn't explain if I could love each other with all my heart. >>>More

11 answers2024-05-23

option explicit

dim x as control >>>More