If you want a very basic VB question bank program, please help me make one

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

    Revised at 22:25 on March 8.

    1. First make a word document, draw a ** in it, one grid per line, put the text of the title and ** in the same grid, one line per question, do not leave blank lines, and then save it in the project directory and name it "Title." doc”;

    2. Find "Microsoft Word Object Library" in the [Project]-[Reference] menu and tick it, and then paste it as follows**:

    private sub command1_click() 'Topic button.

    dim rnum as integer 'The number of questions is stored, i.e., the number of rows.

    dim n as integer 'Holds random numbers.

    falsevisible = true 'Display the Word document.

    Topic. doc" 'Open the document.

    rnum = . 'Get the number of rows.

    n = int(rnd * rnum) +1 'Calculate random numbers.

    1).select 'Select a random square.

    Copy everything in the grid, including **.

    documenttype:=wdnewblankdocument 'Create a blank document.

    wdpastedefault) 'Paste the content of the assignment.

    windows("Topic. doc").activate

    Close the original document.

    end with

    end sub

    private sub command2_click() 'This button must be pressed before you can select the next question.

    on error resume next

    Quit Word

    true false

    end sub

  2. Anonymous users2024-02-06

    It is recommended to put the text, **path in the database, and then randomly select the data record, extract the text and **information, and display it on the interface, which is more efficient than word, I used vb to operate office files, the efficiency is very low, the speed is very slow, and the problem in word is not easy to solve.

    The idea of using a database.

    1。Use ADO to connect to an access database.

    3。Using a random function, select a question in the database record, and the text can be displayed directly in txt, and connect the picbox to the question**.

  3. Anonymous users2024-02-05

    Topic. doc is better with a database.

  4. Anonymous users2024-02-04

    i is the value of i (which is the last value of i that does not enter the loop body, i.e. printed).

    The i value of i=i+1 becomes Huawei

    The value of j=j-i is 10-2-4-6-8-10=-20

  5. Anonymous users2024-02-03

    The caption property of the command1 button is set to:"Open the file"

    Select the checkmark via Menu --> Engineering --> Widget: Microsoft Common Dialog Control: as shown below

    Add a generic dialog box and set the properties accordingly:

    The name is set to:"cd1"

    dialogtitle is set to:"Open the file"

    filter is set to:"All files (*.)Text (*.)txt)|*txt"

    private sub command1_click()end sub

    Basically according to the requirements of your question, if you don't understand, ask again!

Related questions
6 answers2024-04-06

i=1,j=1:x(1,1)=x(0,0)+1+1=2i=1,j=2:x(1,2)=x(0,1)+1+2=3...

i=1,j=5:(x,5)=x(0,4)+1+6=6--- >>>More

3 answers2024-04-06

Two commandbuttons, two lables, two texts"

private sub command1_click()r = >>>More

25 answers2024-04-06

There are so many things to say about this world, whether it is heaven or earth, about the vastness of the universe, the mysterious oceans, the puzzling architectural marvels, and the creatures that live in this space. >>>More

5 answers2024-04-06

Basically, it can be understood that the left is radical and the right is conservative and backward. This kind of thing is all talking about each other and attacking each other. There are no obvious criteria for differentiation and judgment.