Use VB to write simple programs to empty the document menu

zhaozj2021-02-11  237

The document menu is stored in the shortcuts we have recently used, and the directory it is in Windows 95 (or Windows 98) installed the Recent directory in the directory. When we don't need these shortcuts, we can empty the document menu.

There are two ways to empty the document menu. Method 1: Select "Start Menu → Settings → Task Bar and Start Menu" (or right click on the taskbar to select "Properties"), pop up the "taskbar properties", then select "Start Menu Programs → Clear". Method 2: Select the C: / PWIN95 / Recess directory in the resource manager (assuming your Windows 95 installed in the C: / PWIN95 directory), then select all the files in the Recent Directory and delete them.

Unfortunately, these two methods are troublesome, can there be a simple way, just a mouse to complete the empty document menu? Try with the steps:

1. Create a new project in Visual Basic 5.0.

2. Type the following code in the Code window:

Private sub flow_load ()

'If the document menu is not empty

IF DIR ("C: / PWIN95 / Recent /*.*") <> "" "

Kill ("C: / PWIN95 / Recent /*.")

MsgBox "Document menu is emptied!", Vbokonly, "Clear"

Unload form1

Else

Msgbox "Document menu is empty!", Vbokonly, "emptying"

Unload form1

END IF

End Sub

Note: Please change the C: / PWIN95 in the above program to your Directory in your Windows 95 (or Windows 98).

3. Save the project as "Empty Document .vbp" and select "File → Generate Clear Document .exe"

4. Put the generated empty document. EXE on the desktop or start menu.

This way you can use a simple method to complete the task of the empty documentation menu.

If you use Windows98, you can also put empty documents. EXE in the planned task in order to automate the function of automatically emptying the document menu.

转载请注明原文地址:https://www.9cbs.com/read-4392.html

New Post(0)