VERSION 5.00 Begin VB.Form ImportWindow BackColor = &H00FFFFFF& BorderStyle = 4 'Fixed ToolWindow Caption = "Import To..." ClientHeight = 4215 ClientLeft = 45 ClientTop = 315 ClientWidth = 4680 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 4215 ScaleWidth = 4680 StartUpPosition = 2 'CenterScreen Begin VB.ListBox lstProfiles Height = 2790 Left = 120 TabIndex = 3 Top = 720 Width = 4455 End Begin VB.CommandButton butCancel Caption = "&Cancel" Height = 375 Left = 120 Style = 1 'Graphical TabIndex = 2 Top = 3720 Width = 1575 End Begin VB.CommandButton butOk Caption = "&Ok" Height = 375 Left = 3240 Style = 1 'Graphical TabIndex = 1 Top = 3720 Width = 1335 End Begin VB.Label FileType Height = 255 Left = 1800 TabIndex = 5 Top = 3600 Visible = 0 'False Width = 1335 End Begin VB.Label OldFile Height = 255 Left = 1800 TabIndex = 4 Top = 3960 Visible = 0 'False Width = 1335 End Begin VB.Label lblInfo BackStyle = 0 'Transparent Caption = "Which bot userfile do you wish to have the file to be imported to be used in." BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 120 TabIndex = 0 Top = 120 Width = 4455 End Begin VB.Shape Shape2 BackColor = &H00C0FFFF& BackStyle = 1 'Opaque BorderStyle = 0 'Transparent Height = 615 Left = 0 Top = 0 Width = 4815 End End Attribute VB_Name = "ImportWindow" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub butCancel_Click() frmAdvanced.SetFocus Unload Me End Sub Private Sub butOk_Click() Dim ToFile As String Dim Response As Integer Response = MsgBox("Note, '" & OldFile.Caption & "' will overwrite the existing " & FileType & " configuration file." & vbCrLf & vbCrLf & "Are you sure you wish to overwrite existing settings?", vbYesNoCancel + vbQuestion, "Overwrite prompt") ' if didn't say yes, stop here If Response = vbNo Then Exit Sub If Response = vbCancel Then Exit Sub ' :: = lstProfile item for main profile If InStr(lstProfiles, "::") Then ToFile = App.Path & "\windrop\" & "Main" & FileType Else ToFile = App.Path & "\windrop\" & lstProfiles & FileType End If If LCase(ToFile) <> LCase(OldFile.Caption) Then On Error Resume Next Kill ToFile FileCopy OldFile, ToFile End If Me.Visible = False MsgBox "Successfully imported channel file '" & OldFile & "' to " & Parse(lstProfiles, "::", ""), vbInformation + vbOKOnly, "Import Channel File" frmAdvanced.SetFocus Unload Me End Sub Private Sub Form_Load() lstProfiles.AddItem ":: Shared Bot Userfiles ::" lstProfiles.ListIndex = 0 Dim Counter As Integer Dim OldLI As Integer OldLI = Window.lstProfile.ListIndex For Counter = 0 To Window.lstProfile.ListCount - 1 Window.lstProfile.ListIndex = Counter lstProfiles.AddItem Window.lstProfile Next Counter Window.lstProfile.ListIndex = OldLI Me.Icon = xsplash.Icon butOk.Picture = xsplash.button.Picture butCancel.Picture = xsplash.button.Picture End Sub