*/
Are you blogging on PH? Get your free blog.
*/

View \Form1.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"
Begin VB.Form ByFolder
   Caption         =   "D.i.e. Moron Luxation"
   ClientHeight    =   4944
   ClientLeft      =   48
   ClientTop       =   276
   ClientWidth     =   3696
   DrawStyle       =   1  'Dash
   FillColor       =   &H80000007&
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MinButton       =   0   'False
   ScaleHeight     =   4944
   ScaleWidth      =   3696
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdADD
      Caption         =   "&Add To DataBase"
      Height          =   252
      Left            =   960
      TabIndex        =   6
      Top             =   4680
      Width           =   1812
   End
   Begin VB.CheckBox chkfullPath
      Caption         =   "Check1"
      Height          =   252
      Left            =   120
      TabIndex        =   5
      Top             =   4680
      Visible         =   0   'False
      Width           =   3372
   End
   Begin VB.OptionButton Option1
      Caption         =   "Option1"
      Height          =   252
      Left            =   120
      TabIndex        =   4
      Top             =   5400
      Visible         =   0   'False
      Width           =   3372
   End
   Begin VB.OptionButton chkBrow
      Caption         =   "chkBrow"
      Height          =   252
      Left            =   120
      TabIndex        =   3
      Top             =   5040
      Visible         =   0   'False
      Width           =   3252
   End
   Begin VB.CommandButton cmdPlay
      Caption         =   "&Play Selected"
      Enabled         =   0   'False
      Height          =   372
      Left            =   1920
      TabIndex        =   2
      Top             =   4320
      Width           =   1212
   End
   Begin VB.Timer Timer1
      Interval        =   1
      Left            =   2160
      Top             =   2880
   End
   Begin MSComDlg.CommonDialog cd1
      Left            =   3240
      Top             =   3720
      _ExtentX        =   677
      _ExtentY        =   677
      _Version        =   393216
      Color           =   5
      Flags           =   1
      FontBold        =   -1  'True
      FontItalic      =   -1  'True
      FontStrikeThru  =   -1  'True
      FontUnderLine   =   -1  'True
   End
   Begin VB.FileListBox File1
      Height          =   4296
      Hidden          =   -1  'True
      Left            =   120
      Pattern         =   "*.non"
      TabIndex        =   1
      ToolTipText     =   "Songs Available..."
      Top             =   120
      Width           =   3492
   End
   Begin VB.CommandButton cmdFolder
      Caption         =   "&Browse"
      Height          =   372
      Left            =   600
      TabIndex        =   0
      ToolTipText     =   "Click here to Browse for database folder"
      Top             =   4320
      Width           =   1332
   End
   Begin VB.Menu mnuFile
      Caption         =   "&File"
      Visible         =   0   'False
      Begin VB.Menu mnuPlay
         Caption         =   "&Play Song"
      End
      Begin VB.Menu mnuAddtoDB
         Caption         =   "&Add Song to DataBase"
      End
      Begin VB.Menu mnuSep
         Caption         =   "-"
      End
      Begin VB.Menu mnuOptions
         Caption         =   "&File Box Options"
         Begin VB.Menu mnuBack
            Caption         =   "Set &Back Color"
         End
         Begin VB.Menu mnuFore
            Caption         =   "Set &Fore Color"
         End
         Begin VB.Menu mnuSep2
            Caption         =   "-"
         End
         Begin VB.Menu mnuFont
            Caption         =   "Select &Font"
         End
      End
      Begin VB.Menu mnuSep3
         Caption         =   "-"
      End
      Begin VB.Menu mnuEnd
         Caption         =   "&Quit"
      End
   End
End
Attribute VB_Name = "ByFolder"
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
Dim BrowStyle As Boolean
Dim longpath As Boolean

Private Sub cmdADD_Click()
mnuAddtoDB_Click
End Sub

Private Sub cmdFolder_Click()
If BrowStyle = False Then
     Dim sFolder As String
     sFolder = GetFolder(hwnd)
     If Len(sFolder) > 0 Then
     File1.Path = sFolder
     Else
     End If
     File1.Path = sFolder
   If File1.ListCount = 0 Then
    MsgBox "There Are No Songs Available in The Selected Folder...", vbExclamation, "D.i.e. Moron Luxation"
   End If
Else
frmFolderBrowser.Show
End If
End Sub

Private Sub cmdPlay_Click()
mnuPlay_Click
End Sub
Private Sub File1_DblClick()
If mnuPlay.Enabled = True Then
Call ShellExecute(hwnd, "Open", File1.FileName, "", File1.Path, 1)
End If
End Sub
Private Sub File1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If frmOption.chkBFRight.Value = 1 Then
 If Button = vbRightButton Then
  Me.PopupMenu Me.mnuFile
 End If
End If
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
    File1.Pattern = Input(LOF(i), i)
Close #i
On Error Resume Next
  Me.Picture = LoadPicture(App.Path & "\Skinz\bf.gif")
End Sub
Private Sub Form_Resize()
 If Me.Width <= 4000 Then
  Me.Width = 4000
 End If
 If Me.Height <= 3000 Then
  Me.Height = 3000
 End If
 On Error Resume Next
 File1.Width = Me.Width - 350
 File1.Height = Me.Height - cmdFolder.Height - 850
 cmdFolder.Top = File1.Height + 250
 cmdFolder.Left = (Me.Width / 2) - cmdFolder.Width
 cmdPlay.Top = cmdFolder.Top
 cmdPlay.Left = cmdFolder.Left + cmdPlay.Width + 200
 cmdADD.Left = cmdFolder.Left + 500
 cmdADD.Top = cmdFolder.Top + cmdFolder.Height
End Sub
Private Sub Form_Unload(Cancel As Integer)
Timer1.Enabled = False
frmMain.Show
End Sub

Private Sub mnuAddtoDB_Click()
Dim TrueName
Dim SingerName
TrueName = InputBox("Enter Song Title:", "Add Song To DATABASE")
If TrueName = "" Then TrueName = "Unknown"
SingerName = InputBox("Enter the Band or the Singer name:", "Add Song To DATABASE")
If SingerName = "" Then SingerName = "Unknown"
Open (App.Path & "\FullPath.dtb") For Append As #1
  Write #1, File1.Path & "\" & File1.FileName
  Close #1
Open (App.Path & "\SONG.dtb") For Append As #2
  Write #2, TrueName
  Close #2
Open (App.Path & "\BAND.dtb") For Append As #3
  Write #3, SingerName
  Close #3

End Sub

Private Sub mnuBack_Click()
    cd1.ShowColor
    File1.BackColor = cd1.Color
End Sub
Private Sub mnuEnd_Click()
 Unload Me
End Sub

Private Sub mnuFont_Click()
On Error Resume Next
 cd1.ShowFont
 File1.FontName = cd1.FontName
 File1.FontSize = cd1.FontSize
 File1.FontItalic = cd1.FontItalic
 File1.FontStrikethru = cd1.FontStrikethru
 File1.FontUnderline = cd1.FontUnderline
End Sub

Private Sub mnuFore_Click()
 cd1.ShowColor
 File1.ForeColor = cd1.Color
End Sub

Private Sub mnuPlay_Click()
 On Error Resume Next
 Call ShellExecute(hwnd, "Open", File1.FileName, "", File1.Path, 1)
End Sub

Private Sub Timer1_Timer()
On Error Resume Next
If File1.FileName = "" Then
mnuPlay.Enabled = False
cmdPlay.Enabled = False
mnuAddToDb.Enabled = False
cmdADD.Enabled = False
Else
cmdPlay.Enabled = True
mnuPlay.Enabled = True
mnuAddToDb.Enabled = True
cmdADD.Enabled = True
End If
If chkBrow.Value = False Then
BrowStyle = False
Else
BrowStyle = True
End If
If chkfullPath.Value = 1 Then
longpath = True
Else
longpath = False
End If
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.