How does VB write a program to prevent multiple of them from running at the same time? Urgent!!!!!!!

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

    The score is a bit high, I wonder if I misunderstood?

    private sub form_load()if then end

    end sub

    It seems that the answer on the first floor is the correct solution, learned!

  2. Anonymous users2024-02-06

    No matter which drive letter you put in, you can detect whether it is turned on or not!

    private function enum1() as stringdim wmi

    set wmi = getobject("winmgmts:")set objs = "win32_process")for each obj in objs

    enum1 = enum1 + chr(13) +chr(10)

    nextend function

    private sub form_load()dim progress as variantdim i as integer

    static num as integerprogress = split(enum1, vbcrlf)for i = 1 to ubound(progress) -1if progress(i) = "" then 'Here""Change the name of the file you made to exe.

    num = num + 1

    if num > 1 then

    msgbox "The program is on! "

    endend if

    end if

    nextend sub

  3. Anonymous users2024-02-05

    When the program starts, try to create a file with a specific name in the root directory of the C drive, if the creation is successful, the program continues to run, and open the file in an exclusive way, if the creation fails, it means that other programs have locked the file, and the program does not continue.

  4. Anonymous users2024-02-04

    Enumerate the process first, and then determine the window type and window name.

    Once everything is met, sendmessage

    A custom message to the process (you must set this custom message first), if there is a return, it clicks it (if it does not return, it means that it is not your own process), the source code is not with you, and the idea is like this.

  5. Anonymous users2024-02-03

    Is it possible to use the timer control to achieve simultaneous monitoring?

    private sub timer1_timer()call wsksock(1,ips(1))end sub

    private sub timer2_timer()call wsksock(2,ips(2))end sub

    private sub timer3_timer()call wsksock(3,ips(3))end sub

    private sub form_load()= true

    5000 'Monitor every 5 seconds.

    true 5000 'Monitor every 5 seconds.

    end sub

  6. Anonymous users2024-02-02

    You're running sequentially, and you're trying to implement a multi-threaded program, but you can't do this, and VB6 is also quite difficult.

  7. Anonymous users2024-02-01

    VB should not be able to do multithreading.

  8. Anonymous users2024-01-31

    I don't know what your wsksock is like.

    But you said it should be monitored at the same time. It seems like it can.

  9. Anonymous users2024-01-30

    You open a document the normal way

  10. Anonymous users2024-01-29

    Win8 and Win10 have split-screen browsing, which can divide a window into multiple without interfering with each other.

  11. Anonymous users2024-01-28

    Right-click on the taskbar to arrange windows.

Related questions
8 answers2024-04-13

Light diet recipes.

Light and refreshing celery. >>>More

6 answers2024-04-13

Mr. Lu Xun once said that there is no road in the world, and when there are more people walking, there will be a road. There is no so-called road, these roads are we have to go out in order to achieve a certain goal, once a person succeeds, then everyone will know that this is a way, how can this be done, so it becomes a road, and in the vast river of history, all things have been covered by the great magician of time, the reason why we know these histories, is that we modern people to research, written by archaeologists, And what we do is often because of a fleeting thought, or forced to do it, and through a certain way to do it, sometimes we will make an earth-shattering event, so history, people write it, because someone does it, so there will be the so-called history, life is like a play, every second is in the live broadcast, time will not come back, today the sun will rise, tomorrow will rise up, but that is not today's sun, today's sun has disappeared forever, Every minute and every second we have spent cannot be repeated, we are using our lives to write a gorgeous script, write a wonderful script, maybe your life is not so vigorous, but he is unique, he is the history of only one person, he does not need to be read by all people, because there will be people who are willing to appreciate him to come, with the heart ** the script of your life, we are writing our own history book, better than the so-called Three Kingdoms, historical records, Han Shu Hou Han Shu and so on, Each of us is writing the book in Mr. Lu Xun's mouth, the swan song of the historian, and the rhymeless separation.

5 answers2024-04-13

1. Advertorial positioning.

Before you start writing this, you need to know who you're working for. What are the needs? Why do you need it? >>>More

10 answers2024-04-13

shell ("shutdown -s -t 360") 'It means that it will turn off after 360 seconds. >>>More

5 answers2024-04-13

We should learn from this little boy's mother, his mother wants a tightrope, and before you know it, you know that this is his mother's love! For the sake of her children, she can sit up by herself.