PC Event As Per Date Programmed in MS Visual Basic 6

PC Event As Per Date Programmed in MS Visual Basic 6                                                   Download : http://areptone.in/download/DateVB6/ARHeater.rar

This programmed is written in Microsoft Visual Basic-6 for deleting a file & stop working a Software on a particular Date as mention in the programmed.

Option Explicit

Dim Q, North

Dim A As String

Private Sub Timer1_Timer()

‘Label1.Caption = Date

If Dir(“C:\Soft”, vbDirectory) = vbNullString Then MkDir (“C:\Soft”)              Chech & Make A Directory

North = Shell(“cmd /c copy /y D:\Heater\Heater.exe C:\Soft\”, vbHide)        Copy File in the Directory

Q = 0

If Date = “1/26/2019” Then GoTo X1 Else

If Date = “2/23/2019” Then GoTo X2 Else

If Date = “3/31/2019” Then GoTo X3 Else

If Date = “4/28/2019” Then GoTo X4 Else

If Date = “5/31/2019” Then GoTo X5 Else

If Date = “6/30/2019” Then GoTo X6 Else

If Date = “7/28/2019” Then GoTo X7 Else

If Date = “8/31/2019” Then GoTo X8 Else

If Date = “9/29/2019” Then GoTo X9 Else

If Date = “10/27/2019” Then GoTo X10 Else

If Date = “11/30/2019” Then GoTo X11 Else

If Date = “12/29/2019” Then GoTo X12 Else

If Date = “11/25/2019” Then GoTo X11 Else

If Date = “12/30/2019” Then GoTo X12 Else

If Date = “12/8/2018” Then GoTo X12 Else

If Date = “11/18/2018” Then GoTo X12 Else

A = Dir(“D:\Heater\Heater.exe”)                                                  Check File in the Directory

If Len(A) = 0 Then GoTo QU Else GoTo FRun                           (No Zero)  If File Found GoTo File RUN

‘*****************************************                                          (Zero)     If File Not Found GoTo QUITE

X1: ‘Label1.Caption = “1-OK”

Q = 1

GoTo Z

X2: ‘Label1.Caption = “2-OK”

Q = 1

GoTo Z

X3: ‘Label1.Caption = “3-OK”

Q = 1

GoTo Z

X4: ‘Label1.Caption = “4-OK”

Q = 1

GoTo Z

X5: ‘Label1.Caption = “5-OK”

Q = 1

GoTo Z

X6: ‘Label1.Caption = “6-OK”

Q = 1

GoTo Z

X7: ‘Label1.Caption = “7-OK”

Q = 1

GoTo Z

X8: ‘Label1.Caption = “8-OK”

Q = 1

GoTo Z

X9: ‘Label1.Caption = “9-OK”

Q = 1

GoTo Z

X10: ‘Label1.Caption = “10-OK”

Q = 1

GoTo Z

X11: ‘Label1.Caption = “11-OK”

Q = 1

GoTo Z

X12: ‘Label1.Caption = “12-OK”

Q = 1

GoTo Z

‘*****************************************

FRun:                                                                                     Normal Condition RUN the File

If Q = 0 Then Shell (“D:\Heater\Heater.exe”)

Timer1.Enabled = False

GoTo QU

‘*****************************************

Z:

If Q = 0 Then GoTo Normal Else GoTo Action                       Take Action

Normal:

‘******************************************

A = Dir(“D:\Heater\Heater.exe”)                                              Check File in the Directory

If Len(A) = 0 Then GoTo Zero Else GoTo One                       Take Action

‘******************************************

Zero:   ‘FND (FILE NOT FOUND)

Timer1.Enabled = False

GoTo QU

Action:

‘******************************************

A = Dir(“D:\Heater\Heater.exe”)                                                Check File in the Directory

If Len(A) = 0 Then GoTo Zero Else GoTo One

Label3.Caption = “WARNNING – Windows File Error”

GoTo QU

‘******************************************

One:    ‘FDEL (FILE DELETE)                                                   Delete A File

Timer1.Enabled = False

Kill “D:\Heater\Heater*.*”

Shell (“Shutdown -S”)

‘******************************************

QU:                                                                                            LAST QUITE

Unload Me

End Sub

‘******************************************

Private Sub Label3_Click()

Unload Me

End

End Sub

End Of Programme

Thanks

Adeeb Raza

About adeebraza1236

I am an electronic instrumentation engineer by profession but I am working as a design engineer. I can design electronic hardware interface circuits for computer based security system, Computer based industrial control system for automation and process control Etc. My Interests: Electronics Circuit designing with PCB Designing, Computer software development using VB & C , PC based security system, Designing LED Lights, UPS, Inverter Etc
This entry was posted in Adeeb Raza, Allahabad, Books, Computers and Internet, Education, News and politics, Uncategorized, Visual Basic 6 Code. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s