home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmPrevCode
- Caption = "Code Preview"
- ClientHeight = 4176
- ClientLeft = 1380
- ClientTop = 1608
- ClientWidth = 5172
- Height = 4548
- Left = 1332
- LinkTopic = "Form1"
- MinButton = 0 'False
- ScaleHeight = 4176
- ScaleWidth = 5172
- Top = 1284
- Width = 5268
- Begin SSPanel panStatBar
- Align = 1 'Align Top
- BackColor = &H00C0C0C0&
- Font3D = 0 'None
- Height = 372
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 5172
- Begin SSRibbon gpbToolBar
- BackColor = &H00C0C0C0&
- BevelWidth = 0
- Height = 264
- Index = 3
- Left = 1140
- Outline = 0 'False
- PictureDn = FRMPREVC.FRX:0000
- PictureDnChange = 1 'Dither 'PictureUp' Bitmap
- PictureUp = FRMPREVC.FRX:0182
- RoundedCorners = 0 'False
- Top = 60
- Width = 288
- End
- Begin SSRibbon GroupPush3D2
- BackColor = &H00C0C0C0&
- BevelWidth = 0
- Height = 252
- Left = 1920
- Outline = 0 'False
- PictureDnChange = 1 'Dither 'PictureUp' Bitmap
- RoundedCorners = 0 'False
- Top = 60
- Width = 372
- End
- Begin SSRibbon gpbToolBar
- BackColor = &H00C0C0C0&
- BevelWidth = 0
- Height = 264
- Index = 2
- Left = 696
- Outline = 0 'False
- PictureDn = FRMPREVC.FRX:0304
- PictureDnChange = 1 'Dither 'PictureUp' Bitmap
- PictureUp = FRMPREVC.FRX:0486
- RoundedCorners = 0 'False
- Top = 60
- Width = 288
- End
- Begin SSRibbon gpbToolBar
- BackColor = &H00C0C0C0&
- BevelWidth = 0
- Height = 264
- Index = 1
- Left = 408
- Outline = 0 'False
- PictureDn = FRMPREVC.FRX:0608
- PictureDnChange = 1 'Dither 'PictureUp' Bitmap
- PictureUp = FRMPREVC.FRX:078A
- RoundedCorners = 0 'False
- Top = 60
- Width = 288
- End
- Begin SSRibbon gpbToolBar
- BackColor = &H00C0C0C0&
- BevelWidth = 0
- Height = 264
- Index = 0
- Left = 120
- Outline = 0 'False
- PictureDn = FRMPREVC.FRX:090C
- PictureDnChange = 1 'Dither 'PictureUp' Bitmap
- PictureUp = FRMPREVC.FRX:0A8E
- RoundedCorners = 0 'False
- Top = 60
- Width = 288
- End
- End
- Begin TextBox txtCodeView
- Height = 3672
- Left = 60
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 0
- Text = "Text1"
- Top = 420
- Width = 4752
- End
- Option Explicit
- Sub Form_Load ()
- Dim pstrMsgBoxIni As String
- Dim pstrTemp As String
- Dim pintTop As Integer
- Dim pintLeft As Integer
- Dim pintWidth As Integer
- Dim pintHeight As Integer
- screen.MousePointer = 11
- ' Setup the tool bar for deffrent screen sizes
- panStatBar.Height = gpbToolBar(0).Height + 120
- ' Get the app's ini file and location
- pstrMsgBoxIni = MakePath((app.Path), app.EXEName & ".ini")
- ' Place and size form according to what is in the ini file
- ' If no info in the ini file center form on MsgBxGen form
- pstrTemp = ReadIni("Code Preview", "Width", "No", pstrMsgBoxIni)
- If pstrTemp = "No" Then
- Call CenterOnForm(MsgBxGen, frmPrevCode)
- Else
- pintWidth = Val(pstrTemp)
- pintHeight = Val(ReadIni("Code Preview", "Height", Str(screen.Height / 2), pstrMsgBoxIni))
- Me.Width = pintWidth
- Me.Height = pintHeight
- pintTop = Val(ReadIni("Code Preview", "Top", Str((screen.Height - Me.Height) / 2), pstrMsgBoxIni))
- pintLeft = Val(ReadIni("Code Preview", "Left", Str((screen.Width - Me.Width) / 2), pstrMsgBoxIni))
- Me.Move pintLeft, pintTop
- End If
- screen.MousePointer = 0
- End Sub
- Sub Form_Resize ()
- txtCodeView.Move 0, panStatBar.Height, frmPrevCode.ScaleWidth, frmPrevCode.ScaleHeight - panStatBar.Height
- End Sub
- Sub Form_Unload (Cancel As Integer)
- Dim pstrMsgBoxIni As String
- ' Get the app's ini file and location
- pstrMsgBoxIni = MakePath((app.Path), app.EXEName & ".ini")
- ' Save size and pos info
- Call SaveIni("Code Preview", "Top", Trim(Str(Me.Top)), pstrMsgBoxIni)
- Call SaveIni("Code Preview", "Left", Trim(Str(Me.Left)), pstrMsgBoxIni)
- Call SaveIni("Code Preview", "Height", Trim(Str(Me.Height)), pstrMsgBoxIni)
- Call SaveIni("Code Preview", "Width", Trim(Str(Me.Width)), pstrMsgBoxIni)
- End Sub
- Sub gpbToolBar_Click (Index As Integer, Value As Integer)
- If Value = 0 Then ' If button down
- Select Case Index
- Case 0 ' Cut
- ' If nothing selected do not cleer clipboard
- If txtCodeView.SelText <> "" Then
- ' Copy selected text to Clipboard.
- ClipBoard.SetText txtCodeView.SelText
- ' Delete selected text.
- txtCodeView.SelText = ""
- End If
- Case 1 ' Copy
- ' If nothing selected do not cleer clipboard
- If txtCodeView.SelText <> "" Then
- ' Copy selected text to Clipboard.
- ClipBoard.SetText txtCodeView.SelText
- End If
- Case 2 ' Paste
- ' Place text from Clipboard into active control.
- txtCodeView.SelText = ClipBoard.GetText()
- Case 3 ' Close
- Me.Hide
- End Select
- Else
- gpbToolBar(Index).Value = 0
- End If
- End Sub
-