Use VB "crack" with time limit

zhaozj2021-02-08  229

Use VB "crack" with time limit

Zhang Sheng

Do you often encounter a time limit program? I am particularly displaced by lazy people, but I pity in the shame, I have to repeatedly modify the system date and make myself a few times of this software - it is hard! So use "AnyDay32", but unfortunately it is too much trouble; then use "time backfall", it is not easy to use, and - actually there is BUGS! ... look like I have to do "VB Software DIY".

First, the problem is

There are time-limited programs to rely on the detection system date during the startup process, and then compare the test period (placed in the registry or special document), if the trial period is arriving, if the trial period is arriving, You may be a certain mark in the registry so that the next program is not available.

Second, solve problems

We can generally use such programs by modifying system time, of course, this "Dafa" may be invalid after they have made expired signs; there are also some programs to detect refinement to hours, then we can only change time. .

Third, the ideas and precautions in DIY

We can first modify the system dates in our own procedure, then start the corresponding time limit, after a period of time, change the system date back.

Note: In the waiting process of waiting for the external program to detect the system date, the system date has changed, then the system date we will return will be wrong! So we have to perform certain detection to prevent such errors from occurring.

Fourth, start software DIY

Here we use the Access database for software to make software compilation.

Design of the table in the database:

Field name

Types of

length

Note

Program name

TEXT

20

The logo of the program to facilitate management

starting program

TEXT

255

Actual start-up program

Start date

Date / time

8

System date should be changed back

Forms and controls:

name

Types of

Set

Form1

Form

BorderStyle = 1

Command1

Command

CAPTION = "Execute (& R)"

Command2

Command

CAPTION = "Exit (& Q)"

CHECK1

Checkbox

CAPTION = "Automatically turn off this software after starting the program"

Timer1

Timer

Enabled = false; interval = 5000

Data1

Data

DatabaseName = database path and name

Recordsource = Data table name

CommonDialog1

CommonDialog

Filter = "Please select the program you want to start (*. *)"

DBGRID1

DBGRID

Allowaddnew = true; allowdelete = true; DataSource = DATA1

Commondialog and DBGRID controls require additional load, which also requires a certain database mount and settings in the DBGRID attribute page, and is selected in the "button" in the "layout" in its property page.

The following is the source code of this small software:

Option expedition

'Start the API function definition of external applications

Private declare function shellexecute lib "shell32.dll" alias "shellexecutea" _

(Byval Hwnd as long, byval lpoperty as string, byval lpfile as string, _

Byval LPDirectory as string, byval nshowcmd as ring) AS Longdim Olddate As Date 'Save System Date

Private submmand1_click ()

If not data1.recordset.eof the 'does not move if the database is adding a record

Date = DATA1.Recordset (2) 'Change system time

Call Shellexecute (0, VBnullstring, Data1.Recordset (1), VBnullString, VBnullString, VBOK) Starts an external program

ME.enabled = false 'Shielding other operations

Timer1.enabled = true 'starts the delay memory

END IF

End Sub

Private sub fascist2_click ()

End 'Turn off the system

End Sub

Private sub DBGRID1_BEFOREUPDATE (CANCEL AS Integer)

If msgbox ("Record change?", Vbyesno vbquestion <> vbyes the cancel = true 'to update database control

End Sub

Private sub DBGRID1_BUTTONCLICK (Byval ColIndex As Integer)

ON Error Goto Erdeal 'Open Error Monitoring

Commondialog1.cancelerror = True 'System dialog error control

Commondialog1.showopen 'Open System Dialog

If CommonDialog1.filename <> "" Then DBGrid1.Text = CommonDialog1.filename 'to start writing the program information

Errdeal:

End Sub

Private sub flow_load ()

OldDate = Date 'Save System Time

Call Parameter 'Getting the parameters at the time of system startup

End Sub

Private sub timer1_timer () 'Five seconds after recovery

IF Format (Time, "HH: mm: SS") <"00:00:05" Then Olddate = Olddate 1 'Prevent date recovery errors in close zero

Date = OldDate 'Restore System Time

ME.enabled = true 'Restores normal operation

Timer1.enabled = false 'shielded delay memory

If Check1.Value = 1 THEN END 'Turns off the system

End Sub

Private sub parameter () 'system parameter processing

IF command <> "" "

'Find the corresponding startup program

Data1.Recordsource = "SELECT * from [startprogram] where [program name] = '" & trim (commim) & "'"

Data1.refresh

IF not (data1.recordset.eof and data1.recordset.bof) THEN

Me.hide 'Hide this system

Check1.value = 1 'Set the display

Command1_click 'activates the implementation event of the system

Else

'Didn't find it

Msgbox "No This starter!", 16, me.caption 'error prompt

End 'close

END IF

END IF

End Sub

Five, small knot

This small software can initiate a plurality of time-limited programs, or by command parameters (format: program name to be launched) once a program can be used to make a corresponding shortcut (similar to anyday32), let You can use it with confidence.

The program is completed, but you need your improvement and moistening, encounter problems, solved - I am a software DIY!

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

New Post(0)