home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 May
/
W2KPRK.iso
/
apps
/
crystal
/
disk18
/
Xvb383._
/
Xvb383.
Wrap
Text File
|
1999-08-23
|
3KB
|
104 lines
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
Begin VB.Form frmSource
Caption = "Source Code"
ClientHeight = 5685
ClientLeft = 1275
ClientTop = 1065
ClientWidth = 6585
LinkTopic = "Form1"
ScaleHeight = 5685
ScaleWidth = 6585
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "&Close"
Default = -1 'True
Height = 375
Left = 5235
TabIndex = 1
Top = 5205
Width = 1215
End
Begin RichTextLib.RichTextBox rtxtSource
Height = 4875
Left = 135
TabIndex = 0
Top = 135
Width = 6300
_ExtentX = 11113
_ExtentY = 8599
_Version = 327680
ScrollBars = 3
TextRTF = $"Source.frx":0000
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Attribute VB_Name = "frmSource"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private m_strFilename As String
Private m_blnChanged As Boolean
Public Sub Display(strFilename As String)
On Error GoTo Display_Exit
If strFilename = "" Then
rtxtSource.Locked = True
m_strFilename = App.Path & "\source\template.rtf"
Else
rtxtSource.Locked = False
m_strFilename = App.Path & "\source\" & strFilename & ".rtf"
If Dir(m_strFilename) = "" Then FileCopy App.Path & "\source\template.rtf", m_strFilename
End If
rtxtSource.filename = m_strFilename
m_blnChanged = False
Me.Show vbModal, frmOptions
Display_Exit:
End Sub
Private Sub cmdClose_Click()
If m_blnChanged Then
Select Case MsgBox("Save your changes to " & Me.rtxtSource.filename & "?", vbYesNoCancel, frmSource.Caption)
Case vbCancel
GoTo cmdClose_ClickExit
Case vbYes
rtxtSource.SaveFile m_strFilename
End Select
End If
Me.Hide
cmdClose_ClickExit:
End Sub
Private Sub Form_Load()
Center Me
End Sub
Private Sub Form_Resize()
rtxtSource.Left = 100
rtxtSource.Top = 100
rtxtSource.Width = Me.Width - 350
rtxtSource.Height = Me.Height - 1100
cmdClose.Left = Me.Width - 1500
cmdClose.Top = Me.Height - 850
End Sub
Private Sub rtxtSource_Change()
m_blnChanged = True
End Sub