Category : BASIC Source Code
Archive   : VINST8.ZIP
Filename : FEXISTS.FRM

 
Output of file : FEXISTS.FRM contained in archive : VINST8.ZIP
VERSION 2.00
Begin Form File_Exists
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "File Already Exists...."
ClipControls = 0 'False
ControlBox = 0 'False
ForeColor = &H00FF0000&
Height = 4680
Left = 1680
LinkTopic = " "
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4284
ScaleWidth = 7488
Top = 1320
Width = 7560
Begin CommandButton Command4
Caption = "Copy Over"
Height = 435
Left = 3720
TabIndex = 2
Top = 3630
Width = 1215
End
Begin CommandButton Command3
Caption = "Abort"
Height = 435
Left = 5400
TabIndex = 3
Top = 3630
Width = 1215
End
Begin CommandButton Command2
Caption = "Rename"
Height = 435
Left = 2250
TabIndex = 1
Top = 3630
Width = 1215
End
Begin CommandButton Command1
Caption = "Skip"
Height = 435
Left = 810
TabIndex = 0
Top = 3630
Width = 1215
End
Begin Label LblDestVer
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "LblDestVer"
Height = 255
Left = 1560
TabIndex = 10
Top = 2280
Visible = 0 'False
Width = 4305
End
Begin Label LblSourceVer
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "LblSourceVer"
Height = 255
Left = 1560
TabIndex = 9
Top = 960
Visible = 0 'False
Width = 4305
End
Begin Label Label5
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "This is the file you are about to install:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H000000FF&
Height = 285
Left = 300
TabIndex = 6
Top = 1620
Width = 6855
End
Begin Label Label4
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "Label4 -- This label shows time/date of install file"
ForeColor = &H00000000&
Height = 285
Left = 210
TabIndex = 7
Top = 1980
Width = 7020
End
Begin Label Label3
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "Do you want to Skip this file, Rename the old file, Copy over the file, or Abort the installation?"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H000000FF&
Height = 435
Left = 1080
TabIndex = 8
Top = 2880
Width = 5325
End
Begin Label Label2
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "Label2 -- This label shows time/date of file on user's disk"
ForeColor = &H00000000&
Height = 285
Left = 210
TabIndex = 5
Top = 660
Width = 7020
End
Begin Label Label1
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "This file exists on the destination Drive:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H000000FF&
Height = 285
Left = 300
TabIndex = 4
Top = 300
Width = 6855
End
End
DefInt A-Z

Option Explicit

Sub Command1_Click ()
gSkip% = True
gTmpCopyOver% = False
Unload File_Exists
End Sub

Sub Command2_Click ()
File_Exists.Visible = False
gTmpCopyOver% = False
File_Exists.Visible = False
Load Rename_File
CenterForm Rename_File
Rename_File.Show MODAL
Unload File_Exists
End Sub

Sub Command3_Click ()
gCancelCommand% = True
gTmpCopyOver% = False
Unload File_Exists
End Sub

Sub Command4_Click ()
gTmpCopyOver% = True
Unload File_Exists
End Sub

Sub Form_Load ()

Dim DestFile$, SourceData$, DestData$

DestFile$ = gRenPath$ & gRenFile$
GetTimeDate gTmpSource$, DestFile$, SourceData$, DestData$, gTmpSize&

On Error Resume Next
File_Exists.Label4.FontSize = 9.75
File_Exists.Label4.Caption = gTmpSource$ & Space$(5) & SourceData$
File_Exists.Label4.Refresh

File_Exists.Label2.FontSize = 9.75
File_Exists.Label2.Caption = gRenPath$ & gRenFile$ & Space$(5) & DestData$
File_Exists.Label2.Refresh
On Error GoTo 0

gSkip% = False

BackColor = RGB(BKGNDGRAY, BKGNDGRAY, BKGNDGRAY)
gFrameWidth% = DEFAULTWIDTH


' -----------------------------------------------------
' Set fonts based on Windows version
' -----------------------------------------------------
On Error Resume Next
File_Exists.FontName = gFontName$
Me.Command1.FontName = gFontName$
Me.Command2.FontName = gFontName$
Me.Command3.FontName = gFontName$
Me.Command4.FontName = gFontName$
Me.Label1.FontName = gFontName$
Me.Label2.FontName = gFontName$
Me.Label3.FontName = gFontName$
Me.Label4.FontName = gFontName$
Me.Label5.FontName = gFontName$
On Error GoTo 0

End Sub

Sub Form_Paint ()
HighLight File_Exists.Label1, CTLRAISED
HighLight File_Exists.Label3, CTLRAISED
HighLight File_Exists.Label5, CTLRAISED
End Sub

Sub GetTimeDate (SourceFile$, DestFile$, SourceData$, DestData$, SourceFileSize&)
Dim FileData As OFSTRUCT

Dim x%, sMonth%, sDay%, sYear%, dMonth%, dDay%, dYear%
Dim sHour%, sMinute%, dHour%, dMinute%, Ret%, FileNum%

Dim sSize&, dSize&

Dim sDate$, dDate$, sTime$, dTime$


' ------------------------------------------------------
' Get file data on source file
' ------------------------------------------------------
x% = OpenFile%(SourceFile$, FileData, OF_EXIST)

sMonth% = ((FileData.r1 And &H7FFF) \ 32) And &HF
sDay% = FileData.r1 And &H1F
sYear% = (FileData.r1 And &H7FFF) \ 512 + 80
sDate$ = LTrim$(Str$(sMonth%)) & "/" & LTrim$(Str$(sDay%)) & "/" & LTrim$(Str$(sYear%))

sHour% = (FileData.r2 And &H7FFF) \ 2048
sMinute% = ((FileData.r2 And &H7FFF) \ 32) And &H3F
sTime$ = LTrim$(Str$(sHour%)) & ":" & LTrim$(Str$(sMinute%))

' ------------------------------------------------------
' Get the file size
' ------------------------------------------------------
sSize& = SourceFileSize&
SourceData$ = sDate$ & Space$(3) & sTime$


' ------------------------------------------------------
' Get file data on destination file, if it exists
' ------------------------------------------------------
x% = OpenFile%(DestFile$, FileData, OF_EXIST)

If x = -1 Then ' File doesn't exist
Ret% = True
Exit Sub
End If

dMonth% = ((FileData.r1 And &H7FFF) \ 32) And &HF
dDay% = FileData.r1 And &H1F
dYear% = (FileData.r1 And &H7FFF) \ 512 + 80
dDate$ = LTrim$(Str$(dMonth%)) & "/" & LTrim$(Str$(dDay%)) & "/" & LTrim$(Str$(dYear%))

dHour% = (FileData.r2 And &H7FFF) \ 2048
dMinute% = ((FileData.r2 And &H7FFF) \ 32) And &H3F
dTime$ = LTrim$(Str$(dHour%)) & ":" & LTrim$(Str$(dMinute%))

' ------------------------------------------------------
' get the file size
' ------------------------------------------------------
FileNum% = FreeFile
Open SourceFile$ For Binary As #FileNum%
dSize& = LOF(FileNum%)
Close #FileNum%
DestData$ = dDate$ & Space$(3) & dTime$


End Sub



  3 Responses to “Category : BASIC Source Code
Archive   : VINST8.ZIP
Filename : FEXISTS.FRM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/