home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Words-With206459582007.psc / frmChooseSong.frm < prev    next >
Text File  |  2007-05-08  |  6KB  |  200 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Begin VB.Form frmChooseSong 
  4.    Caption         =   "Choose A Song To Play"
  5.    ClientHeight    =   4140
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   6510
  9.    LinkTopic       =   "Form2"
  10.    ScaleHeight     =   4140
  11.    ScaleWidth      =   6510
  12.    StartUpPosition =   2  'CenterScreen
  13.    Begin VB.TextBox txtLyricLocalPath 
  14.       Height          =   375
  15.       Left            =   480
  16.       TabIndex        =   8
  17.       Top             =   3840
  18.       Visible         =   0   'False
  19.       Width           =   6015
  20.    End
  21.    Begin VB.CommandButton cmdPlay 
  22.       Caption         =   "Play"
  23.       Height          =   495
  24.       Left            =   480
  25.       TabIndex        =   7
  26.       Top             =   3360
  27.       Width           =   1575
  28.    End
  29.    Begin VB.TextBox txtSongName 
  30.       Height          =   375
  31.       Left            =   2520
  32.       TabIndex        =   6
  33.       Top             =   3360
  34.       Visible         =   0   'False
  35.       Width           =   3855
  36.    End
  37.    Begin MSComDlg.CommonDialog CommonDialog1 
  38.       Left            =   5760
  39.       Top             =   2760
  40.       _ExtentX        =   847
  41.       _ExtentY        =   847
  42.       _Version        =   393216
  43.    End
  44.    Begin VB.CommandButton cmdChooseLyric 
  45.       Caption         =   "Browse"
  46.       Height          =   375
  47.       Left            =   4320
  48.       TabIndex        =   5
  49.       Top             =   2220
  50.       Width           =   1455
  51.    End
  52.    Begin VB.TextBox txtLyricPath 
  53.       Height          =   375
  54.       Left            =   480
  55.       TabIndex        =   3
  56.       Top             =   2220
  57.       Width           =   3735
  58.    End
  59.    Begin VB.TextBox txtSongPath 
  60.       Height          =   375
  61.       Left            =   480
  62.       TabIndex        =   1
  63.       Top             =   900
  64.       Width           =   3735
  65.    End
  66.    Begin VB.CommandButton cmdChooseSong 
  67.       Caption         =   "Browse"
  68.       Height          =   375
  69.       Left            =   4320
  70.       TabIndex        =   0
  71.       Top             =   900
  72.       Width           =   1455
  73.    End
  74.    Begin VB.Label Label3 
  75.       BackStyle       =   0  'Transparent
  76.       Caption         =   "3- Press Play"
  77.       BeginProperty Font 
  78.          Name            =   "MS Sans Serif"
  79.          Size            =   12
  80.          Charset         =   178
  81.          Weight          =   700
  82.          Underline       =   0   'False
  83.          Italic          =   0   'False
  84.          Strikethrough   =   0   'False
  85.       EndProperty
  86.       Height          =   375
  87.       Left            =   480
  88.       TabIndex        =   9
  89.       Top             =   2880
  90.       Width           =   1695
  91.    End
  92.    Begin VB.Label Label2 
  93.       BackStyle       =   0  'Transparent
  94.       Caption         =   "2- Choose Lyric of the Song (TEXT File)"
  95.       BeginProperty Font 
  96.          Name            =   "MS Sans Serif"
  97.          Size            =   12
  98.          Charset         =   178
  99.          Weight          =   700
  100.          Underline       =   0   'False
  101.          Italic          =   0   'False
  102.          Strikethrough   =   0   'False
  103.       EndProperty
  104.       Height          =   375
  105.       Left            =   480
  106.       TabIndex        =   4
  107.       Top             =   1560
  108.       Width           =   5055
  109.    End
  110.    Begin VB.Label Label1 
  111.       BackStyle       =   0  'Transparent
  112.       Caption         =   "1- Choose Song (WAV Or MP3)"
  113.       BeginProperty Font 
  114.          Name            =   "MS Sans Serif"
  115.          Size            =   12
  116.          Charset         =   178
  117.          Weight          =   700
  118.          Underline       =   0   'False
  119.          Italic          =   0   'False
  120.          Strikethrough   =   0   'False
  121.       EndProperty
  122.       Height          =   375
  123.       Left            =   480
  124.       TabIndex        =   2
  125.       Top             =   240
  126.       Width           =   4455
  127.    End
  128. End
  129. Attribute VB_Name = "frmChooseSong"
  130. Attribute VB_GlobalNameSpace = False
  131. Attribute VB_Creatable = False
  132. Attribute VB_PredeclaredId = True
  133. Attribute VB_Exposed = False
  134. Dim SongName
  135. Private Sub cmdChooseSong_Click()
  136. On Error GoTo 10
  137. CommonDialog1.Filter = "WaveFiles|*.wav;|MP3|*.mp3;|ALLFiles|*.*"
  138. CommonDialog1.Action = 1
  139. txtSongPath.Text = CommonDialog1.filename
  140. Dim pos
  141. pos = 0
  142. For i = 1 To Len(txtSongPath.Text) - 1
  143. If Mid(txtSongPath.Text, i, 1) = "\" Then
  144. pos = i
  145. End If
  146. Next i
  147. SongName = Mid(txtSongPath.Text, pos + 1)
  148. SongName = Left(SongName, Len(SongName) - 4)
  149. txtSongName.Text = SongName
  150. Exit Sub
  151. 10:
  152. MsgBox "You did not choose any Song"
  153. Exit Sub
  154. End Sub
  155.  
  156. Private Sub cmdChooseLyric_Click()
  157. CommonDialog1.Filter = "TextFiles|*.txt;|AllFiles|*.*"
  158. CommonDialog1.Action = 1
  159. txtLyricPath.Text = CommonDialog1.filename
  160. Dim Source, Destination
  161. Source = CommonDialog1.filename
  162. Clipboard.SetText Source
  163. Destination = App.Path & "\Lyrics\" & SongName & ".txt"
  164. Dim MyFile
  165. MyFile = Dir(Destination)
  166. If MyFile = "" Then
  167. FileCopy Source, Destination
  168. txtLyricLocalPath = Destination
  169. Exit Sub
  170. Else
  171. GoTo 10
  172. End If
  173. 10:
  174. Dim Z
  175. Z = MsgBox(Destination & " already Exist-Replace?", vbYesNo)
  176.     If Z = vbYes Then
  177.     'Kill Destination
  178.     FileCopy Source, Destination
  179.     txtLyricLocalPath = Destination
  180.     Else
  181.     Exit Sub
  182.     End If
  183.  
  184. End Sub
  185.  
  186. Private Sub cmdPlay_Click()
  187. Form1.Show
  188. Me.Hide
  189. End Sub
  190.  
  191. Private Sub Form_Load()
  192. frmChooseSong.Icon = LoadPicture(App.Path & "\Dorami2.ico")
  193. frmChooseSong.BackColor = RGB(242, 195, 255)
  194.  
  195. End Sub
  196.  
  197. Private Sub Form_Unload(Cancel As Integer)
  198. End
  199. End Sub
  200.