*/
Written some cool source code? Upload it to Programmer's Heaven.
*/

View \frmOption.frm

Moron Luxation - DATA & Search

Submitted By: Unknown
Rating: (Not rated) (Rate It)


VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmOption
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Options"
   ClientHeight    =   4932
   ClientLeft      =   36
   ClientTop       =   276
   ClientWidth     =   5556
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4932
   ScaleWidth      =   5556
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtOporating
      Height          =   288
      Left            =   360
      TabIndex        =   18
      Text            =   "Text1"
      Top             =   4440
      Visible         =   0   'False
      Width           =   2532
   End
   Begin MSComDlg.CommonDialog cdialog
      Left            =   4560
      Top             =   480
      _ExtentX        =   677
      _ExtentY        =   677
      _Version        =   393216
   End
   Begin VB.CommandButton cmdCancel
      Cancel          =   -1  'True
      Caption         =   "&Cancel"
      Height          =   372
      Left            =   4680
      TabIndex        =   3
      Top             =   4440
      Width           =   852
   End
   Begin VB.CommandButton cmdOk
      Caption         =   "&OK"
      Default         =   -1  'True
      Height          =   372
      Left            =   3720
      TabIndex        =   2
      Top             =   4440
      Width           =   852
   End
   Begin TabDlg.SSTab TabSux
      Height          =   4332
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   5532
      _ExtentX        =   9758
      _ExtentY        =   7641
      _Version        =   393216
      Style           =   1
      TabHeight       =   420
      TabCaption(0)   =   "Advanced &Settings"
      TabPicture(0)   =   "frmOption.frx":0000
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "lblSearchByFolder"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "lblFileTypes"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "txtFileType"
      Tab(0).Control(2).Enabled=   0   'False
      Tab(0).Control(3)=   "cmdFileTypeEdit"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).Control(4)=   "cmdFileTypeSave"
      Tab(0).Control(4).Enabled=   0   'False
      Tab(0).Control(5)=   "cmdRestoreFileType"
      Tab(0).Control(5).Enabled=   0   'False
      Tab(0).Control(6)=   "cmdGenFileTypeCancel"
      Tab(0).Control(6).Enabled=   0   'False
      Tab(0).ControlCount=   7
      TabCaption(1)   =   "&By Folder"
      TabPicture(1)   =   "frmOption.frx":001C
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "optBFDefault"
      Tab(1).Control(0).Enabled=   0   'False
      Tab(1).Control(1)=   "optBFBrowseForFolder"
      Tab(1).Control(1).Enabled=   0   'False
      Tab(1).Control(2)=   "chkBFDeFolder"
      Tab(1).Control(2).Enabled=   0   'False
      Tab(1).Control(3)=   "txtBFDefFolder"
      Tab(1).Control(3).Enabled=   0   'False
      Tab(1).Control(4)=   "chkBFRight"
      Tab(1).Control(4).Enabled=   0   'False
      Tab(1).Control(5)=   "cmdBFBrowse"
      Tab(1).Control(5).Enabled=   0   'False
      Tab(1).Control(6)=   "cmdBFDieBrowser"
      Tab(1).Control(6).Enabled=   0   'False
      Tab(1).Control(7)=   "cmdDefChange"
      Tab(1).Control(7).Enabled=   0   'False
      Tab(1).ControlCount=   8
      TabCaption(2)   =   "&Database"
      TabPicture(2)   =   "frmOption.frx":0038
      Tab(2).ControlEnabled=   0   'False
      Tab(2).ControlCount=   0
      Begin VB.CommandButton cmdGenFileTypeCancel
         Caption         =   "&Cancel"
         Enabled         =   0   'False
         Height          =   252
         Left            =   2160
         TabIndex        =   17
         Top             =   3240
         Width           =   1212
      End
      Begin VB.CommandButton cmdRestoreFileType
         Caption         =   "&Restore Default File Types"
         Height          =   252
         Left            =   960
         TabIndex        =   16
         Top             =   3600
         Width           =   3612
      End
      Begin VB.CommandButton cmdFileTypeSave
         Caption         =   "&Save"
         Enabled         =   0   'False
         Height          =   252
         Left            =   3720
         TabIndex        =   15
         Top             =   3240
         Width           =   1212
      End
      Begin VB.CommandButton cmdFileTypeEdit
         Caption         =   "&Edit"
         Height          =   252
         Left            =   600
         TabIndex        =   14
         Top             =   3240
         Width           =   1212
      End
      Begin VB.TextBox txtFileType
         Enabled         =   0   'False
         Height          =   1692
         Left            =   480
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   13
         Text            =   "frmOption.frx":0054
         Top             =   1440
         Width           =   4572
      End
      Begin VB.CommandButton cmdDefChange
         Caption         =   "&Change"
         Enabled         =   0   'False
         Height          =   252
         Left            =   -73080
         TabIndex        =   10
         Top             =   2880
         Width           =   1332
      End
      Begin VB.CommandButton cmdBFDieBrowser
         Caption         =   "<<<Click Here"
         Height          =   252
         Left            =   -71280
         TabIndex        =   9
         Top             =   1320
         Width           =   1212
      End
      Begin VB.CommandButton cmdBFBrowse
         Caption         =   "<<<Click Here"
         Height          =   252
         Left            =   -71280
         TabIndex        =   8
         Top             =   960
         Width           =   1212
      End
      Begin VB.CheckBox chkBFRight
         Caption         =   "&Right Mouse button Popup Menu"
         Height          =   252
         Left            =   -74760
         TabIndex        =   7
         Top             =   3600
         Value           =   1  'Checked
         Width           =   2652
      End
      Begin VB.TextBox txtBFDefFolder
         Enabled         =   0   'False
         Height          =   288
         Left            =   -74760
         TabIndex        =   6
         Text            =   "c:\"
         Top             =   2520
         Width           =   5172
      End
      Begin VB.CheckBox chkBFDeFolder
         Caption         =   "Use Default Folder:"
         Height          =   252
         Left            =   -74760
         TabIndex        =   5
         Top             =   2160
         Width           =   1692
      End
      Begin VB.OptionButton optBFBrowseForFolder
         Caption         =   "&Use ""Browse For Folder Dialog"
         Height          =   252
         Left            =   -74760
         TabIndex        =   4
         Top             =   960
         Value           =   -1  'True
         Width           =   2652
      End
      Begin VB.OptionButton optBFDefault
         Caption         =   "Use &D.i.e.'s Folder Browser"
         Height          =   252
         Left            =   -74760
         TabIndex        =   1
         Top             =   1320
         Width           =   2532
      End
      Begin VB.Label lblFileTypes
         AutoSize        =   -1  'True
         Caption         =   "&File Types (Read Only -  Click Edit to Edit):"
         Height          =   192
         Left            =   840
         TabIndex        =   12
         Top             =   960
         Width           =   3000
      End
      Begin VB.Label lblSearchByFolder
         Caption         =   "Search By Folder:"
         Height          =   252
         Left            =   360
         TabIndex        =   11
         Top             =   600
         Width           =   1452
      End
   End
End
Attribute VB_Name = "frmOption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub chkBFDeFolder_Click()
If chkBFDeFolder.Value = 1 Then
cmdDefChange.Enabled = True
Else
cmdDefChange.Enabled = False
End If
End Sub

Private Sub cmdBFBrowse_Click()
     Dim sFolder As String
     sFolder = GetFolder(hwnd)
     If Len(sFolder) > 0 Then
     Else
     End If
End Sub
Private Sub cmdBFDieBrowser_Click()
frmFolderBrowser.Show
End Sub

Private Sub cmdCancel_Click()
Me.Hide
End Sub

Private Sub cmdDefChange_Click()
     Dim sFolder As String
     sFolder = GetFolder(hwnd)
     If Len(sFolder) > 0 Then
     txtBFDefFolder.Text = sFolder
     Else
          MsgBox "No folder selected!", , "D.i.e. Moron Luxation"
     End If
     On Error Resume Next
     txtBFDefFolder.Text = sFolder
End Sub

Private Sub cmdFileTypeSave_Click()
On Error Resume Next
If MsgBox("Are you 100% sure you wish to save?" & vbCrLf & vbCrLf & "Please Note: A mistake will cause damage to this program!!!" & vbCrLf & vbCrLf & "If the 'Locate By Folder' page won't work, Click on 'Restore Default File Types' on the" & vbCrLf & "'General Setting' tab in the 'Options' page...", vbQuestion + vbYesNo + vbDefaultButton2, "D.i.e. Moron Luxation") = vbYes Then
Dim f As Integer
f = FreeFile
Open (App.Path & "\FileType.dat") For Output As #f
Print #f, txtFileType.Text
Close #f
End If
End Sub
Private Sub cmdGenFileTypeCancel_Click()
txtFileType.Enabled = False
cmdFileTypeSave.Enabled = False
cmdFileTypeEdit.Enabled = True
cmdGenFileTypeCancel.Enabled = False
End Sub



Private Sub cmdOk_Click()
SaveAll
End Sub
Private Sub cmdFileTypeEdit_Click()
On Error Resume Next
txtFileType.Enabled = True
cmdFileTypeSave.Enabled = True
cmdGenFileTypeCancel.Enabled = True
cmdFileTypeEdit.Enabled = False
End Sub
Private Sub cmdRestoreFileType_Click()
Dim f As Integer
f = FreeFile
Open (App.Path & "\FileType.dat") For Output As #f
Print #f, "*.mp3;*.mu3;*.wav;*.mid;*.mp2;*.pls;*.mp1;*.voc;*.cda;*.it;*.s3m;*.stm;*.wma;*.vqf"
Close #f
End Sub

Private Sub Form_Load()
Dim i As Integer
  On Error Resume Next
    i = FreeFile
Open App.Path & "\FileType.dat" For Input As #i
    txtFileType.Text = Input(LOF(i), i)
Close #i
End Sub
Private Sub SaveAll()
Dim i                    As Integer
Dim RightVal(0 To 1)      As String
Dim DefOpt(0 To 1)        As String
Dim DeFolder(0 To 4)    As String
Dim DefBrowse(0 To 6)     As String
RightVal(i) = chkBFRight.Value
DefOpt(i) = chkBFDeFolder.Value
DeFolder(i) = txtBFDefFolder.Text
DefBrowse(i) = optBFDefault.Value
txtOporating.Text = RightVal(i) & "," & DefOpt(i) & "," & DeFolder(i) & "," & DefBrowse(i)
Dim f As Integer
f = FreeFile
Open (App.Path & "\DATA.die") For Output As #f
Print #f, txtOporating.Text
Close #f
Me.Hide
End Sub

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.