C How to make a winform program not open again after 100 times?

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

    Set a variable that starts at 0 and compares it to 100 when opening the program, and +1 each time you open it. When the variable is less than 100, run the command and run the form. When the variables reach or exceed 100, you can exit the form.

    Addendum: It's really hard to find such examples, but it's not that hard. You can try to do it yourself and write something by yourself. First, you can exercise your hands-on ability. Second, you can solve similar problems yourself in the future.

  2. Anonymous users2024-02-06

    Is it to open this exe program? If so, use other temporary storage media such as txt, then check the counter after running, and if it is less than 100, open it again (with shellexecute).

  3. Anonymous users2024-02-05

    There must be a counter that can be written in the text, written in the database, written in the registry, and read it as soon as it is started, and it can be used if it is less than the maximum value, and it will automatically exit.

  4. Anonymous users2024-02-04

    It's best to write an encrypted file like ini, and if ini deletes it, the program won't run, heh

  5. Anonymous users2024-02-03

    I'll give you an address and see for yourself. The man wrote well. I'm not going to copy it.

  6. Anonymous users2024-02-02

    I think the first floor is very reasonable, and if the data is too large, it will be a little slower. A simple Hoffman compression algorithm can be used. Unzip to a place, the name is random, and the storage location is also random.

    When the operation is complete, compress back to the original file and update it. Then delete the temporary files. If you don't think the data is large, you can dig into it and load it into memory and turn it into XML or other data structures.

  7. Anonymous users2024-02-01

    Destroy the access format,After double-clicking the file, you first get the file path,Format dispersion and decoding back to generate a temporary file (normal access format),Then operate this temporary or vertical file,When you close it, you delete this temporary file。

  8. Anonymous users2024-01-31

    Click on the smart triangle mark of the gridview,In the sitting corner of the pop-up window, there is a checkbox for Huifan to cancel the automatic generation of fields,Remove the hook to cancel the automatic generation from the paragraph,There are various columns that can be added at the top of the left,The bottom one is the template column,Click add to feast on Bizito。

  9. Anonymous users2024-01-30

    You can set the password on the MDB database of Access.

  10. Anonymous users2024-01-29

    Check if the corresponding dll is indeed available

    I've encountered this before, and it's mostly the case that the program component opens and closes immediately.

  11. Anonymous users2024-01-28

    For example: f2 f = new f2();

    ShowDialog opens the modal form.

    There are still questions hi me.

  12. Anonymous users2024-01-27

    In an event, such as a stand-alone event, hit **:new showformname()showdialog()

  13. Anonymous users2024-01-26

    In this file, change the new form1 of the start in main to the name of the form you need to start.

  14. Anonymous users2024-01-25

    There are many ways to do this, such as in.

  15. Anonymous users2024-01-24

    The main entry point to the application. ///

  16. Anonymous users2024-01-23

    What you should want is a singleton pattern, define a form class that inherits from the system's form class, and define it as a singleton pattern.

    **Not verified, I wrote it blindly.

    public sealed class formonly:formpublic static formonly getinstance()

    When called. formonly form=

  17. Anonymous users2024-01-22

    Put a configuration file, there is a flag in the configuration file, and judge whether the program is running by judging the status of the flag.

  18. Anonymous users2024-01-21

    Look at the prompt, it seems that the program to be executed is too large, the memory is insufficient, you check the memory size of the computer, and there is a virtual memory size adjustment in the try.

  19. Anonymous users2024-01-20

    Put the **file in the debug directory and then in the settings**, and you're good to go.

  20. Anonymous users2024-01-19

    With the configuration file,config file.

    Go and store the path of your **.

    Once inside, the load event will first read your config file.

  21. Anonymous users2024-01-18

    Write to the configuration file or database, read the corresponding information every time the program runs.

Related questions
7 answers2024-04-14

Use cmd's timer to shut down.

private void button1_click(object sender, eventargs e) >>>More

10 answers2024-04-14

while (m_isreceiving)

The interface is stuck with DoEvents >>>More

11 answers2024-04-14

If the file is not installed correctly or you have deleted it, you can check it under Windows System32. If that's the case, you can copy a copy from someone else's computer, put it in the directory above, and double-click on a chm file, so that you can select the program and select the c: windows, so that the chm file and the association are restored. >>>More

8 answers2024-04-14

I haven't studied how to select this problem after finding it.,I don't know if richTextBox can be implemented.,If it's just a search, it shouldn't be difficult.。