VB Multiple Judgment How to Use It helps me to add points

Updated on technology 2024-04-07
13 answers
  1. Anonymous users2024-02-07

    First, read the text file into the variables. Then use the instr function.

  2. Anonymous users2024-02-06

    The problem description is not very clear, what are you adding, and where is it written? For example, writing to a database is different from writing to a text file, and there are big differences in the judgment conditions and writing methods.

    If it is a database, you can check whether the same data exists first, and then do different processing according to the results.

    If it's written to a file, it can be more complicated to determine.

  3. Anonymous users2024-02-05

    Save an additional array after each write, and make a judgment to compare the contents of the array the next time you write. If you write to a text box, you can compare the contents of the text box directly, without the need for an additional array.

  4. Anonymous users2024-02-04

    dim i as integer

    for i = 0 to - 1

    if "The name of your control" then 'me can be replaced with the form name of your control.

    msgbox "exists"

    eslemsgbox "does not exist"

    end if

    The name of the next control should be case-sensitive.

  5. Anonymous users2024-02-03

    There is a way to try this, load a winsock control on error resume next

    1234 'Test port 1234.

    if err=0 then msgbox "Port 1234 is now available"

  6. Anonymous users2024-02-02

    Hello, according to your description, or to judge whether the user has selected the list, this is completely achievable, and it is necessary to make a judgment when operating, and there will be an unexpected error when the user does not select the item. ** Below:

    private sub command1_click()if < 0 then

    msgbox "No items are selected"

    elsemsgbox "The selected one is the first" & "Item:" &end if

    end sub

    private sub form_load()for i = 0 to 10

    i & "1111111"

    nextend sub

  7. Anonymous users2024-02-01

    You can adjust the SelectedIndex property of the ListBox in the form's Form Load event.

    To monitor whether a user has manipulated a listbox, you should start with the click and keypress events.

  8. Anonymous users2024-01-31

    On the question of whether -1 is true or 1 is true, let me say a few words...

    In fact, in VB6, as long as it is non-zero, it can be regarded as true, and zero is flase, but if you do the "non" operation, the main thing is to strictly equal true to -1, for example, we write a function:

    function istrue() as boolean...end function

    When we use this function, we need to perform a "non" operation on its return value, for example:

    if not istrue then

    If it returns false, execute it here.

    .else if it returns true, execute it here.

    .end if

    In this case, only -1 and 0 can be non-arithmetic equal, and you can also try whether not -1 is =0 or not 0 is =-1

    In general, you just need to think of non-zero as true.

  9. Anonymous users2024-01-30

    No, what was said upstairs is not right.

    There is no very precise definition in VB.

    Generally true = -1

    false = 0

    But there are some controls inside.

    true = 1

    false = 0

    It doesn't matter, just change it yourself.

    dim b as boolean

    b = return value.

    This lets you know that it's true = -1

    false = 0

    But there are some controls that are true or false

  10. Anonymous users2024-01-29

    1 is true and 0 is false It is recognized in the programming world whether you return an int (integer).

  11. Anonymous users2024-01-28

    Upstairs is wrong, it's not the same as other languages in VB.

    true=-1

    false=0

    If you don't believe me, you can try it yourself.

    a=true

    msgbox a+1

    Let's see if it's =0

  12. Anonymous users2024-01-27

    Add an option control, copy-paste, and create a control group.

    For example, copy 6 ** as follows: private sub command1 click() for i = 0 to 5 if option1(i)value = true then msgbox option1(i).

    caption & "Selected" nextend sub

  13. Anonymous users2024-01-26

    Use too much. net, give me an idea, if it doesn't work, just go up. net bar.

    First, get the handle of IE, then monitor the process of IE, and when the process of IE pops up, you can judge the information of the pop-up window.

Related questions
25 answers2024-04-07

dim xlbook as

dim xlsheet as >>>More

6 answers2024-04-07

Here's what you can do to show yourself

Publish web articles. >>>More

8 answers2024-04-07

The vast majority of men generally like direct and simple girls, especially the woman who intends to live with her for the rest of her life, so in the process of dating girls, you should pay attention to the girl's ten small expressions, which may be able to capture the true thoughts of the girl's inner world. 1. The softness of the eyes when looking at you. If she looks at you with extremely ordinary eyes, it means that she has no special feelings for you, but if she always looks at you with very cheerful and pleasant eyes, it means that she has a good impression of you, maybe this is the opportunity given to you by God. >>>More

15 answers2024-04-07

In bodybuilding theory, RM is used to indicate the highest number of repetitions that can be done consecutively for a certain load. For example, if a practitioner can only lift a weight 5 times in a row, then the weight is 5RM. Beginners can do loads of 8 to 12RM, with each set doing around 8 to 12. >>>More

11 answers2024-04-07

Confucius once commented that "rotten wood cannot be carved, and the wall of dung cannot be destroyed." And this harsh comment was only due to Zai dozing off in class. It shows that Confucius also has a bias against students, but the spirit of digging into the bottom of the matter is worth learning from today's children. >>>More