home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / mp3_player619833142002.psc / frmMP1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-03-14  |  32.0 KB  |  1,054 lines

  1. VERSION 5.00
  2. Object = "{22D6F304-B0F6-11D0-94AB-0080C74C7E95}#1.0#0"; "MSDXM.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form frmMP1 
  5.    BorderStyle     =   0  'None
  6.    ClientHeight    =   3195
  7.    ClientLeft      =   1545
  8.    ClientTop       =   1605
  9.    ClientWidth     =   4680
  10.    ControlBox      =   0   'False
  11.    Icon            =   "frmMP1.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   3195
  15.    ScaleWidth      =   4680
  16.    Begin VB.Timer tmrMove 
  17.       Left            =   840
  18.       Top             =   2160
  19.    End
  20.    Begin VB.HScrollBar VSvolume 
  21.       Height          =   255
  22.       Left            =   1320
  23.       TabIndex        =   13
  24.       Top             =   1080
  25.       Visible         =   0   'False
  26.       Width           =   1215
  27.    End
  28.    Begin MSComDlg.CommonDialog CD 
  29.       Left            =   1800
  30.       Top             =   1440
  31.       _ExtentX        =   847
  32.       _ExtentY        =   847
  33.       _Version        =   393216
  34.    End
  35.    Begin VB.PictureBox imgState 
  36.       AutoRedraw      =   -1  'True
  37.       AutoSize        =   -1  'True
  38.       BorderStyle     =   0  'None
  39.       Height          =   105
  40.       Left            =   120
  41.       Picture         =   "frmMP1.frx":038A
  42.       ScaleHeight     =   105
  43.       ScaleWidth      =   180
  44.       TabIndex        =   5
  45.       Top             =   360
  46.       Width           =   180
  47.    End
  48.    Begin VB.Timer tmrPT 
  49.       Interval        =   400
  50.       Left            =   120
  51.       Top             =   2160
  52.    End
  53.    Begin VB.Image imgVisOn 
  54.       Height          =   210
  55.       Left            =   2280
  56.       Picture         =   "frmMP1.frx":04C8
  57.       Top             =   2400
  58.       Visible         =   0   'False
  59.       Width           =   645
  60.    End
  61.    Begin VB.Image imgVisOff 
  62.       Height          =   210
  63.       Left            =   2280
  64.       Picture         =   "frmMP1.frx":0C42
  65.       Top             =   2760
  66.       Visible         =   0   'False
  67.       Width           =   645
  68.    End
  69.    Begin VB.Image imgVis 
  70.       Height          =   210
  71.       Left            =   3120
  72.       Picture         =   "frmMP1.frx":13BC
  73.       Top             =   840
  74.       Width           =   645
  75.    End
  76.    Begin VB.Image imgEnd 
  77.       Height          =   150
  78.       Left            =   4440
  79.       Picture         =   "frmMP1.frx":1B36
  80.       ToolTipText     =   "Exit"
  81.       Top             =   0
  82.       Width           =   150
  83.    End
  84.    Begin VB.Image imgLogo 
  85.       Height          =   240
  86.       Left            =   4320
  87.       Picture         =   "frmMP1.frx":1CB8
  88.       ToolTipText     =   "General Options"
  89.       Top             =   2880
  90.       Width           =   240
  91.    End
  92.    Begin VB.Image imgAuto 
  93.       Height          =   210
  94.       Left            =   720
  95.       Picture         =   "frmMP1.frx":2042
  96.       ToolTipText     =   "AutoLoad Options"
  97.       Top             =   840
  98.       Width           =   720
  99.    End
  100.    Begin VB.Image imgRand 
  101.       Height          =   210
  102.       Left            =   1800
  103.       Picture         =   "frmMP1.frx":2864
  104.       ToolTipText     =   "Randomize Toggle"
  105.       Top             =   840
  106.       Width           =   540
  107.    End
  108.    Begin VB.Image imgPL 
  109.       Height          =   210
  110.       Left            =   2520
  111.       Picture         =   "frmMP1.frx":2E8E
  112.       ToolTipText     =   "Playlist Toggle"
  113.       Top             =   840
  114.       Width           =   375
  115.    End
  116.    Begin VB.Image imgRandOn 
  117.       Height          =   210
  118.       Left            =   480
  119.       Picture         =   "frmMP1.frx":32F8
  120.       Top             =   2520
  121.       Visible         =   0   'False
  122.       Width           =   540
  123.    End
  124.    Begin VB.Image imgRandOff 
  125.       Height          =   210
  126.       Left            =   480
  127.       Picture         =   "frmMP1.frx":3922
  128.       Top             =   2760
  129.       Visible         =   0   'False
  130.       Width           =   540
  131.    End
  132.    Begin VB.Image imgPlOn 
  133.       Height          =   210
  134.       Left            =   1320
  135.       Picture         =   "frmMP1.frx":3F4C
  136.       Top             =   2520
  137.       Visible         =   0   'False
  138.       Width           =   375
  139.    End
  140.    Begin VB.Image imgPlOff 
  141.       Height          =   210
  142.       Left            =   1320
  143.       Picture         =   "frmMP1.frx":43B6
  144.       Top             =   2760
  145.       Visible         =   0   'False
  146.       Width           =   375
  147.    End
  148.    Begin VB.Label Label2 
  149.       AutoSize        =   -1  'True
  150.       BackStyle       =   0  'Transparent
  151.       Caption         =   "Volume"
  152.       BeginProperty Font 
  153.          Name            =   "Comic Sans MS"
  154.          Size            =   8.25
  155.          Charset         =   0
  156.          Weight          =   400
  157.          Underline       =   0   'False
  158.          Italic          =   0   'False
  159.          Strikethrough   =   0   'False
  160.       EndProperty
  161.       ForeColor       =   &H0000FF00&
  162.       Height          =   225
  163.       Left            =   3000
  164.       TabIndex        =   15
  165.       Top             =   1440
  166.       Width           =   540
  167.    End
  168.    Begin VB.Image imgVol 
  169.       Height          =   105
  170.       Left            =   2880
  171.       Picture         =   "frmMP1.frx":4820
  172.       Stretch         =   -1  'True
  173.       Top             =   1320
  174.       Width           =   225
  175.    End
  176.    Begin VB.Label lblVol 
  177.       BackStyle       =   0  'Transparent
  178.       BorderStyle     =   1  'Fixed Single
  179.       Height          =   135
  180.       Left            =   2640
  181.       TabIndex        =   14
  182.       Top             =   1320
  183.       Width           =   1215
  184.    End
  185.    Begin VB.Image imgSlideUD 
  186.       Height          =   480
  187.       Left            =   1800
  188.       Picture         =   "frmMP1.frx":4BCA
  189.       Top             =   1320
  190.       Visible         =   0   'False
  191.       Width           =   480
  192.    End
  193.    Begin VB.Label lblBottom 
  194.       BackStyle       =   0  'Transparent
  195.       Height          =   255
  196.       Left            =   0
  197.       TabIndex        =   12
  198.       Top             =   3000
  199.       Width           =   4695
  200.    End
  201.    Begin VB.Label lblSide 
  202.       BackStyle       =   0  'Transparent
  203.       Caption         =   ":"
  204.       Height          =   3255
  205.       Left            =   4440
  206.       TabIndex        =   11
  207.       Top             =   0
  208.       Width           =   255
  209.    End
  210.    Begin VB.Image imgMin 
  211.       Height          =   150
  212.       Left            =   4200
  213.       Picture         =   "frmMP1.frx":4ED4
  214.       ToolTipText     =   "Minimize"
  215.       Top             =   0
  216.       Width           =   150
  217.    End
  218.    Begin VB.Label Label1 
  219.       AutoSize        =   -1  'True
  220.       BackStyle       =   0  'Transparent
  221.       Caption         =   "Balance"
  222.       BeginProperty Font 
  223.          Name            =   "Comic Sans MS"
  224.          Size            =   8.25
  225.          Charset         =   0
  226.          Weight          =   400
  227.          Underline       =   0   'False
  228.          Italic          =   0   'False
  229.          Strikethrough   =   0   'False
  230.       EndProperty
  231.       ForeColor       =   &H0000FF00&
  232.       Height          =   225
  233.       Left            =   360
  234.       TabIndex        =   9
  235.       Top             =   1440
  236.       Width           =   600
  237.    End
  238.    Begin VB.Image imgBal 
  239.       Height          =   105
  240.       Left            =   120
  241.       Picture         =   "frmMP1.frx":5056
  242.       Stretch         =   -1  'True
  243.       Top             =   1320
  244.       Width           =   225
  245.    End
  246.    Begin VB.Label lblBal 
  247.       BackStyle       =   0  'Transparent
  248.       BorderStyle     =   1  'Fixed Single
  249.       Height          =   135
  250.       Left            =   120
  251.       TabIndex        =   8
  252.       Top             =   1320
  253.       Width           =   1215
  254.    End
  255.    Begin VB.Label lblDisp 
  256.       AutoSize        =   -1  'True
  257.       BackStyle       =   0  'Transparent
  258.       Caption         =   "Center"
  259.       BeginProperty Font 
  260.          Name            =   "Comic Sans MS"
  261.          Size            =   8.25
  262.          Charset         =   0
  263.          Weight          =   400
  264.          Underline       =   0   'False
  265.          Italic          =   0   'False
  266.          Strikethrough   =   0   'False
  267.       EndProperty
  268.       ForeColor       =   &H000000FF&
  269.       Height          =   225
  270.       Left            =   0
  271.       TabIndex        =   7
  272.       Top             =   360
  273.       Visible         =   0   'False
  274.       Width           =   510
  275.    End
  276.    Begin VB.Label lblST 
  277.       AutoSize        =   -1  'True
  278.       BackColor       =   &H00FF8080&
  279.       ForeColor       =   &H0000FFFF&
  280.       Height          =   195
  281.       Left            =   840
  282.       TabIndex        =   6
  283.       Top             =   360
  284.       Visible         =   0   'False
  285.       Width           =   45
  286.    End
  287.    Begin VB.Image imgNotch 
  288.       Height          =   135
  289.       Left            =   1080
  290.       Picture         =   "frmMP1.frx":5400
  291.       Top             =   600
  292.       Width           =   450
  293.    End
  294.    Begin VB.Label lblBar 
  295.       BackStyle       =   0  'Transparent
  296.       BorderStyle     =   1  'Fixed Single
  297.       Height          =   135
  298.       Left            =   0
  299.       TabIndex        =   3
  300.       Top             =   600
  301.       Width           =   4695
  302.    End
  303.    Begin VB.Image imgSlide 
  304.       Height          =   480
  305.       Left            =   3960
  306.       Picture         =   "frmMP1.frx":57AA
  307.       Top             =   2640
  308.       Visible         =   0   'False
  309.       Width           =   480
  310.    End
  311.    Begin VB.Image imgPause 
  312.       Height          =   105
  313.       Left            =   1800
  314.       Picture         =   "frmMP1.frx":5AB4
  315.       ToolTipText     =   "Pause"
  316.       Top             =   360
  317.       Width           =   180
  318.    End
  319.    Begin VB.Image imgFF 
  320.       Height          =   105
  321.       Left            =   2520
  322.       Picture         =   "frmMP1.frx":5BF2
  323.       ToolTipText     =   "Fast Forward"
  324.       Top             =   360
  325.       Width           =   180
  326.    End
  327.    Begin VB.Image imgPlay 
  328.       Height          =   105
  329.       Left            =   2160
  330.       Picture         =   "frmMP1.frx":5D30
  331.       ToolTipText     =   "Play"
  332.       Top             =   360
  333.       Width           =   180
  334.    End
  335.    Begin VB.Image imgPrev 
  336.       Height          =   105
  337.       Left            =   720
  338.       Picture         =   "frmMP1.frx":5E6E
  339.       ToolTipText     =   "Previous"
  340.       Top             =   360
  341.       Width           =   180
  342.    End
  343.    Begin VB.Image imgRW 
  344.       Height          =   105
  345.       Left            =   1080
  346.       Picture         =   "frmMP1.frx":5FAC
  347.       ToolTipText     =   "Rewind"
  348.       Top             =   360
  349.       Width           =   180
  350.    End
  351.    Begin VB.Image imgStop 
  352.       Height          =   105
  353.       Left            =   1440
  354.       Picture         =   "frmMP1.frx":60EA
  355.       ToolTipText     =   "Stop"
  356.       Top             =   360
  357.       Width           =   180
  358.    End
  359.    Begin VB.Image imgNext 
  360.       Height          =   105
  361.       Left            =   2880
  362.       Picture         =   "frmMP1.frx":6228
  363.       ToolTipText     =   "Next"
  364.       Top             =   360
  365.       Width           =   180
  366.    End
  367.    Begin VB.Label lblPT 
  368.       Alignment       =   1  'Right Justify
  369.       BackStyle       =   0  'Transparent
  370.       Caption         =   "0:00 / 0:00"
  371.       BeginProperty Font 
  372.          Name            =   "LcdD"
  373.          Size            =   8.25
  374.          Charset         =   0
  375.          Weight          =   700
  376.          Underline       =   0   'False
  377.          Italic          =   0   'False
  378.          Strikethrough   =   0   'False
  379.       EndProperty
  380.       ForeColor       =   &H00FF8080&
  381.       Height          =   165
  382.       Left            =   3480
  383.       TabIndex        =   2
  384.       Top             =   360
  385.       Width           =   1095
  386.    End
  387.    Begin VB.Label lblPlaying 
  388.       AutoSize        =   -1  'True
  389.       BackStyle       =   0  'Transparent
  390.       Caption         =   "Welcome 
  391.       BeginProperty Font 
  392.          Name            =   "LcdD"
  393.          Size            =   9.75
  394.          Charset         =   0
  395.          Weight          =   400
  396.          Underline       =   0   'False
  397.          Italic          =   0   'False
  398.          Strikethrough   =   0   'False
  399.       EndProperty
  400.       ForeColor       =   &H0000FF00&
  401.       Height          =   195
  402.       Left            =   0
  403.       TabIndex        =   1
  404.       Top             =   120
  405.       Width           =   765
  406.    End
  407.    Begin MediaPlayerCtl.MediaPlayer MP 
  408.       Height          =   615
  409.       Left            =   360
  410.       TabIndex        =   0
  411.       Top             =   18000
  412.       Width           =   2055
  413.       AudioStream     =   -1
  414.       AutoSize        =   0   'False
  415.       AutoStart       =   0   'False
  416.       AnimationAtStart=   -1  'True
  417.       AllowScan       =   -1  'True
  418.       AllowChangeDisplaySize=   -1  'True
  419.       AutoRewind      =   0   'False
  420.       Balance         =   0
  421.       BaseURL         =   ""
  422.       BufferingTime   =   5
  423.       CaptioningID    =   ""
  424.       ClickToPlay     =   -1  'True
  425.       CursorType      =   0
  426.       CurrentPosition =   -1
  427.       CurrentMarker   =   0
  428.       DefaultFrame    =   ""
  429.       DisplayBackColor=   0
  430.       DisplayForeColor=   16777215
  431.       DisplayMode     =   0
  432.       DisplaySize     =   4
  433.       Enabled         =   -1  'True
  434.       EnableContextMenu=   -1  'True
  435.       EnablePositionControls=   -1  'True
  436.       EnableFullScreenControls=   0   'False
  437.       EnableTracker   =   -1  'True
  438.       Filename        =   ""
  439.       InvokeURLs      =   -1  'True
  440.       Language        =   -1
  441.       Mute            =   0   'False
  442.       PlayCount       =   1
  443.       PreviewMode     =   0   'False
  444.       Rate            =   1
  445.       SAMILang        =   ""
  446.       SAMIStyle       =   ""
  447.       SAMIFileName    =   ""
  448.       SelectionStart  =   -1
  449.       SelectionEnd    =   -1
  450.       SendOpenStateChangeEvents=   -1  'True
  451.       SendWarningEvents=   -1  'True
  452.       SendErrorEvents =   -1  'True
  453.       SendKeyboardEvents=   0   'False
  454.       SendMouseClickEvents=   0   'False
  455.       SendMouseMoveEvents=   0   'False
  456.       SendPlayStateChangeEvents=   -1  'True
  457.       ShowCaptioning  =   0   'False
  458.       ShowControls    =   -1  'True
  459.       ShowAudioControls=   -1  'True
  460.       ShowDisplay     =   0   'False
  461.       ShowGotoBar     =   0   'False
  462.       ShowPositionControls=   -1  'True
  463.       ShowStatusBar   =   0   'False
  464.       ShowTracker     =   -1  'True
  465.       TransparentAtStart=   0   'False
  466.       VideoBorderWidth=   0
  467.       VideoBorderColor=   0
  468.       VideoBorder3D   =   0   'False
  469.       Volume          =   0
  470.       WindowlessVideo =   0   'False
  471.    End
  472.    Begin VB.Image imgBGmain 
  473.       Height          =   2655
  474.       Left            =   0
  475.       Picture         =   "frmMP1.frx":6366
  476.       Stretch         =   -1  'True
  477.       Top             =   600
  478.       Width           =   4695
  479.    End
  480.    Begin VB.Label lblMNU 
  481.       BackStyle       =   0  'Transparent
  482.       BorderStyle     =   1  'Fixed Single
  483.       Height          =   135
  484.       Left            =   0
  485.       TabIndex        =   10
  486.       Top             =   0
  487.       Width           =   4695
  488.    End
  489.    Begin VB.Label lblBGtop 
  490.       BackColor       =   &H00000000&
  491.       Height          =   615
  492.       Left            =   0
  493.       TabIndex        =   4
  494.       Top             =   0
  495.       Width           =   4695
  496.    End
  497.    Begin VB.Menu mnuSystemTray 
  498.       Caption         =   "File"
  499.       Visible         =   0   'False
  500.       Begin VB.Menu mnuShow 
  501.          Caption         =   "Show Player"
  502.       End
  503.       Begin VB.Menu mnuNext 
  504.          Caption         =   "Next Song"
  505.       End
  506.       Begin VB.Menu mnuPrev 
  507.          Caption         =   "Previous Song"
  508.       End
  509.       Begin VB.Menu mnuExit 
  510.          Caption         =   "Quit"
  511.       End
  512.    End
  513.    Begin VB.Menu mnuBG 
  514.       Caption         =   "BG"
  515.       Visible         =   0   'False
  516.       Begin VB.Menu mnuPic 
  517.          Caption         =   "Change Back Picture"
  518.       End
  519.    End
  520. Attribute VB_Name = "frmMP1"
  521. Attribute VB_GlobalNameSpace = False
  522. Attribute VB_Creatable = False
  523. Attribute VB_PredeclaredId = True
  524. Attribute VB_Exposed = False
  525. Dim CooRD As POINT_TYPE, MOVEok As Boolean 'move object/setting variables
  526. Dim MOVE2ok As Boolean, MOVE3ok As Boolean
  527. Dim SPOTx, SPOTy, MOVE4ok As Boolean
  528. Dim MOVE5ok As Boolean, MOVE6ok As Boolean
  529. Dim theCOMM 'command line arguement
  530. Dim hmixer  As Long
  531. Dim volCtrl As MIXERCONTROL ' Waveout volume control.
  532. Dim micCtrl As MIXERCONTROL ' Microphone volume control.
  533. Private Sub Form_Load()
  534. On Error Resume Next
  535. VIZZY = False
  536. theCOMM = Trim(Command$)
  537. If Dir$(App.Path & "\dat\mp1.dat") = "" Then 'first time using/create default setting files
  538.     MkDir App.Path & "\dat"
  539.     Open App.Path & "\dat\mp1.dat" For Output As #1
  540.     Close #1
  541.     Open App.Path & "\dat\mp2.dat" For Output As #1
  542.         Print #1, "True"
  543.         Print #1, "False"
  544.         Print #1, ""
  545.         Print #1, 4275
  546.         Print #1, 1785
  547.         Print #1, 0
  548.         Print #1, 5229
  549.         Print #1, 1
  550.     Close #1
  551. End If
  552. Call FileOP("openauto")
  553. lblPlaying.Caption = "Welcome to the RyRy Media Player   
  554.    Welcome to the RyRy Media Player   
  555. Call FileOP("loadprog")
  556. If RANDY = True Then
  557.     imgRand.Picture = imgRandOn.Picture
  558.     imgRand.Picture = imgRandOff.Picture
  559. End If
  560. If PLon = True Then
  561.     imgPL.Picture = imgPlOn.Picture
  562.     lblBottom.Caption = ":"
  563.     imgPL.Picture = imgPlOff.Picture
  564. End If
  565. imgBal.Left = (((BALLY + 6000) * (lblBal.Width - imgBal.Width)) / 12000) + lblBal.Left
  566. Call StateColor
  567. Call GoSystemTray
  568. bOK = fGetVolumeControl(hmixer, _
  569.         MIXERLINE_COMPONENTTYPE_DST_SPEAKERS, _
  570.         MIXERCONTROL_CONTROLTYPE_VOLUME, volCtrl)
  571. ' If the function successfully gets the volume control,
  572. ' the maximum and minimum values are specified by
  573. ' lMaximum and lMinimum. Use them to set the scrollbar.
  574. If bOK Then
  575.     With VSvolume
  576.         .Max = volCtrl.lMinimum
  577.         .Min = volCtrl.lMaximum \ 2
  578.         .SmallChange = 1000
  579.         .LargeChange = 1000
  580.     End With
  581. End If
  582. ' Get the microphone volume control.
  583. bOK = fGetVolumeControl(hmixer, _
  584.         MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE, _
  585.         MIXERCONTROL_CONTROLTYPE_VOLUME, micCtrl)
  586. End Sub
  587. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  588. Static lngMsg As Long
  589.   Static blnFlag As Boolean
  590.   Dim Result As Long
  591. lngMsg = X / Screen.TwipsPerPixelX
  592.   If blnFlag = False Then
  593.         blnFlag = True
  594.         Select Case lngMsg
  595.         'doubleclick
  596.         Case WM_LBUTTONDBLCLICK
  597.           Me.Show
  598.         'right-click
  599.         Case WM_RBUTTONUP
  600.           Result = SetForegroundWindow(Me.HWnd)
  601.           Me.PopupMenu mnuSystemTray
  602.         End Select
  603.         blnFlag = False
  604.   End If
  605. End Sub
  606. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  607.     VBGTray.cbSize = Len(VBGTray)
  608.     VBGTray.HWnd = Me.HWnd
  609.     VBGTray.uId = vbNull
  610.     Call Shell_NotifyIcon(NIM_DELETE, VBGTray)
  611. End Sub
  612. Private Sub Form_Resize()
  613. 'move location of controls and such
  614. If frmMP1.WindowState = 0 Then
  615.     lblBar.Width = frmMP1.Width - 500
  616.     lblBar.Left = (frmMP1.Width - 100) / 2 - lblBar.Width / 2
  617.     lblBGtop.Width = frmMP1.Width
  618.     imgBGmain.Width = frmMP1.Width
  619.     imgBGmain.Height = frmMP1.Height - 600
  620.     lblPT.Left = frmMP1.Width - 1170
  621.     imgLogo.Top = frmMP1.Height - 340
  622.     imgLogo.Left = frmMP1.Width - 390
  623.     imgEnd.Left = frmMP1.Width - 270
  624.     imgMin.Left = imgEnd.Left - 240
  625.     lblMNU.Width = frmMP1.Width
  626.     lblSide.Left = frmMP1.Width - lblSide.Width / 2
  627.     lblSide.Height = frmMP1.Height
  628.     lblBottom.Top = frmMP1.Height - lblBottom.Height / 2
  629.     lblBottom.Width = frmMP1.Width
  630. End If
  631. End Sub
  632. Private Sub Form_Unload(Cancel As Integer)
  633. Call FileOP("quit") 'save settings
  634. End Sub
  635. Private Sub imgAuto_Click()
  636. frmMP3.Show 'autoload options
  637. End Sub
  638. Private Sub imgBal_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  639. MOVE2ok = True 'set up to change balance
  640. frmMP1.MouseIcon = imgSlide.Picture
  641. frmMP1.MousePointer = 99
  642. imgState.Visible = False
  643. lblDisp.Visible = True
  644. tmrMove.Interval = 10
  645. End Sub
  646. Private Sub imgBal_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  647. MOVE2ok = False 'stop balance changes
  648. frmMP1.MousePointer = 0
  649. If BALLY > -300 And BALLY < 300 Then BALLY = 0
  650. lblDisp.Visible = False
  651. imgState.Visible = True
  652. tmrMove.Interval = 0
  653. End Sub
  654. Private Sub imgBGmain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  655. If Button = 2 Then frmMP1.PopupMenu mnuBG 'show change background
  656. End Sub
  657. Private Sub imgEnd_Click()
  658. If VIZZY = True Then Unload Base 'unload the visual or the prog will crash ;o)
  659. Unload frmMP1 'close program(see form_unload)
  660. End Sub
  661. Private Sub imgFF_Click()
  662. On Error Resume Next 'fast forward
  663. If MP.CurrentPosition < MP.SelectionEnd - 5 Then MP.CurrentPosition = MP.CurrentPosition + 5
  664. End Sub
  665. Private Sub imgLogo_Click()
  666. frmMP5.Show 'show general options
  667. End Sub
  668. Private Sub imgMin_Click()
  669. If PLon = True Then Unload frmMP2 'minimize to system tray
  670. Me.Hide
  671. End Sub
  672. Private Sub imgNext_Click()
  673. Call PlayNext
  674. End Sub
  675. Private Sub imgNotch_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  676. MOVEok = True 'set up to change song position
  677. frmMP1.MouseIcon = imgSlide.Picture
  678. frmMP1.MousePointer = 99
  679. imgState.Visible = False
  680. lblST.Visible = True
  681. End Sub
  682. Private Sub imgNotch_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  683. On Error Resume Next
  684. MP.CurrentPosition = ((imgNotch.Left - lblBar.Left) / (lblBar.Width - imgNotch.Width)) * MP.SelectionEnd
  685. MOVEok = False
  686. frmMP1.MousePointer = 0
  687. lblST.Visible = False
  688. imgState.Visible = True
  689. End Sub
  690. Private Sub imgPause_Click()
  691. On Error Resume Next 'pause
  692. If MP.PlayState = mpPaused Then
  693.     MP.Play
  694.     imgState.Picture = imgPlay.Picture
  695.     Call StateColor
  696.     MP.Pause
  697.     imgState.Picture = imgPause.Picture
  698.     Call StateColor
  699. End If
  700. End Sub
  701. Private Sub imgPL_Click()
  702. If PLon = True Then 'show/hide playlist
  703.     Unload frmMP2
  704.     imgPL.Picture = imgPlOff.Picture
  705.     PLon = True
  706.     imgPL.Picture = imgPlOn.Picture
  707.     Call FileOP("showpl")
  708. End If
  709. End Sub
  710. Private Sub imgPlay_Click()
  711. On Error Resume Next
  712. If MP.PlayState = mpPaused Then
  713.     MP.Play
  714.     imgState.Picture = imgPlay.Picture
  715.     Call StateColor
  716.     Exit Sub
  717. End If
  718. If MP.PlayState = mpPlaying Then Exit Sub
  719. If currSONG > 0 Then currSONG = currSONG - 1
  720. Call PlayNext
  721. imgState.Picture = imgPlay.Picture
  722. Call StateColor
  723. End Sub
  724. Private Sub imgPrev_Click()
  725. currSONG = currSONG - 2 'previous song
  726. Call PlayNext
  727. End Sub
  728. Private Sub imgRand_Click()
  729. If RANDY = True Then 'random on/off
  730.     RANDY = False
  731.     imgRand.Picture = imgRandOff.Picture
  732.     RANDY = True
  733.     imgRand.Picture = imgRandOn.Picture
  734. End If
  735. End Sub
  736. Private Sub imgRW_Click()
  737. On Error Resume Next
  738. If MP.CurrentPosition < 5 Then MP.CurrentPosition = 0
  739. If MP.CurrentPosition > 5 Then MP.CurrentPosition = MP.CurrentPosition - 5
  740. End Sub
  741. Private Sub imgStop_Click()
  742. On Error Resume Next 'stop
  743. MP.Stop
  744. imgState.Picture = imgStop.Picture
  745. Call StateColor
  746. End Sub
  747. Private Sub imgVis_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  748. On Error Resume Next
  749. If VIZZY = False Then
  750.     VIZZY = True
  751.     imgVis.Picture = imgVisOn.Picture
  752.     Load Base
  753.     VIZZY = False
  754.     imgVis.Picture = imgVisOff.Picture
  755.     Unload Base
  756. End If
  757. End Sub
  758. Private Sub imgVol_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  759. MOVE6ok = True 'set up to change volume
  760. imgState.Visible = False
  761. lblDisp.Visible = True
  762. frmMP1.MouseIcon = imgSlide.Picture
  763. frmMP1.MousePointer = 99
  764. tmrMove.Interval = 10
  765. End Sub
  766. Private Sub imgVol_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  767. MOVE6ok = False
  768. lblDisp.Visible = False
  769. imgState.Visible = True
  770. frmMP1.MousePointer = 0
  771. tmrMove.Interval = 0
  772. End Sub
  773. Private Sub lblBottom_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  774. MOVE5ok = True 'resize form downward
  775. frmMP1.MouseIcon = imgSlideUD.Picture
  776. frmMP1.MousePointer = 99
  777. tmrMove.Interval = 10
  778. End Sub
  779. Private Sub lblBottom_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  780. MOVE5ok = False
  781. frmMP1.MousePointer = 0
  782. tmrMove.Interval = 0
  783. End Sub
  784. Private Sub lblMNU_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  785. SPOTx = X 'set up to move main form
  786. SPOTy = Y
  787. MOVE3ok = True
  788. tmrMove.Interval = 10
  789. End Sub
  790. Private Sub lblMNU_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  791. MOVE3ok = False
  792. tmrMove.Interval = 0
  793. End Sub
  794. Private Sub lblSide_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  795. MOVE4ok = True 'resize form to the right
  796. frmMP1.MouseIcon = imgSlide.Picture
  797. frmMP1.MousePointer = 99
  798. tmrMove.Interval = 10
  799. End Sub
  800. Private Sub lblSide_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  801. MOVE4ok = False
  802. frmMP1.MousePointer = 0
  803. tmrMove.Interval = 0
  804. End Sub
  805. Private Sub mnuExit_Click()
  806. Unload frmMP1
  807. End Sub
  808. Private Sub mnuNext_Click()
  809. Call PlayNext
  810. End Sub
  811. Private Sub mnuPic_Click()
  812. On Error Resume Next 'change background picture
  813. CD.Filter = "Picture Files|*.bmp;*.jpg;*.gif|All Files|*.*"
  814. CD.ShowOpen
  815. BGfile = CD.FileName
  816. If BGfile <> "" Then imgBGmain.Picture = LoadPicture(BGfile)
  817. End Sub
  818. Private Sub mnuPrev_Click()
  819. currSONG = currSONG - 2
  820. Call PlayNext
  821. End Sub
  822. Private Sub mnuShow_Click()
  823. Me.Show
  824. End Sub
  825. Private Sub MP_EndOfStream(ByVal Result As Long)
  826. Call PlayNext 'end of song...play the next one
  827. End Sub
  828. Private Sub tmrMove_Timer()
  829. 'change settings
  830. If MOVE2ok = True Then 'balance
  831.     GetCursorPos CooRD
  832.     imgBal.Left = CooRD.X * Screen.TwipsPerPixelX - frmMP1.Left - lblBal.Left - imgBal.Width / 2
  833.     If imgBal.Left < lblBal.Left Then imgBal.Left = lblBal.Left
  834.     If imgBal.Left > lblBal.Left + lblBal.Width - imgBal.Width Then imgBal.Left = lblBal.Left + lblBal.Width - imgBal.Width
  835.     BALLY = ((imgBal.Left - lblBal.Left) * 12000 / (lblBal.Width - imgBal.Width)) - 6000
  836.     MP.Balance = BALLY
  837.     If BALLY > -300 And BALLY < 300 Then lblDisp.Caption = "Center"
  838.     If BALLY <= -300 Then lblDisp.Caption = "Left " & Int(100 * BALLY / -6000) & "%"
  839.     If BALLY >= 300 Then lblDisp.Caption = "Right " & Int(100 * BALLY / 6000) & "%"
  840. End If
  841. If MOVE3ok = True Then 'move form
  842.     GetCursorPos CooRD
  843.     frmMP1.Left = CooRD.X * Screen.TwipsPerPixelX - SPOTx
  844.     frmMP1.Top = CooRD.Y * Screen.TwipsPerPixelY - SPOTy
  845.     If PLon = True Then
  846.         If SNAPPED = 1 Then
  847.             frmMP2.Left = frmMP1.Left + frmMP1.Width
  848.             frmMP2.Top = frmMP1.Top
  849.         ElseIf SNAPPED = 2 Then
  850.             frmMP2.Left = frmMP1.Left
  851.             frmMP2.Top = frmMP1.Top + frmMP1.Height
  852.         ElseIf SNAPPED = 3 Then
  853.             frmMP2.Left = frmMP1.Left - frmMP2.Width
  854.             frmMP2.Top = frmMP1.Top
  855.         End If
  856.     End If
  857. End If
  858. If MOVE4ok = True Then 'resize to right
  859.     GetCursorPos CooRD
  860.     frmMP1.Width = CooRD.X * Screen.TwipsPerPixelX - frmMP1.Left
  861. End If
  862. If MOVE5ok = True Then 'resize downward
  863.     GetCursorPos CooRD
  864.     frmMP1.Height = CooRD.Y * Screen.TwipsPerPixelY - frmMP1.Top
  865. End If
  866. If MOVE6ok = True Then 'volume
  867.     GetCursorPos CooRD
  868.     imgVol.Left = CooRD.X * Screen.TwipsPerPixelX - frmMP1.Left - imgVol.Width / 2
  869.     If imgVol.Left < lblVol.Left Then imgVol.Left = lblVol.Left
  870.     If imgVol.Left > lblVol.Left + lblVol.Width - imgl.Width - 6GWidth / 2
  871.     If imgVol.LefPWidth - imgl.Width -ol.LePrivad + lbidth 0s)d.Width - imgl.Width - 6GWidth / 2
  872.     If imgVol.LefPWidth - imgl.Wi -6etn6dth/ 2
  873. i6etn6dtILcRD.X * Screen.TwipsPE
  874. EntIf imgVofPWidth - "E
  875. th - ipsPE
  876. EntIiurrSONG- imgBi3    9l.WidthD-= True
  877. frmMP1.MousePointer = 0
  878. tdVol.Left > = True Then 'balance
  879.     GetCursorPos CooRD
  880.     imgBal.Left = CooRD.X * Screen.TwipsPerPixelXle = True
  881. frmMP1.Ms Single, Y As Single)
  882. MO = True
  883. frmMP1.Ms Single, sBI4aGimgl.Width - t.h = CooR le)
  884. M'vhMOVE5ok = True TheiV lblBal.Lel.Wij STwipsPerPixelY - frmMP1.TthMOf
  885.     imgVol.Left = CooRD.X * Screen.TwipsPerPixelX - frccture =alse
  886.      e TBOTwipsscL 0Left = CooRD.X 
  887. End If
  888. Eange baMs Single, Y As Single)
  889. MO = b lb 'True
  890. 0D.X 
  891. End If
  892. Eange baMs Single, Y As Single)
  893. MO = b lb 'True
  894. 0D.X 
  895. End If
  896. Eange baMs Single,  ol.Left >L 0Left = CooRD.X 
  897. End If
  898. Eange baMs Single, Y As Single).Lel.Wij STwipsPerPixelY - frm 0Le i Single, Y As Single)
  899. MO = b lb 'Tru2 
  900. Ete Subd uixelY - fr:ter = 99
  901. tmrMove.Interval = 10
  902. End Sub
  903. Private.Int.TwipsPerPO = b lb 'True
  904. 0D.X 
  905. End If
  906. Eange baMs Single, 
  907. End S0al D.X 
  908. End If
  909. Eange bEaton As Integer, Shift As Integer, X GWidtU s_ 0   ' 0.IntaMs Sin  ' Sub
  910. PrivateY As 1.Ms Sie
  911.   ciY / 6000) & "%"
  912. End If
  913. If MOVE3ok = l StateColor
  914. End Sub
  915. PrivateLeft >L 0Left = CooRD.X 
  916. End If
  917. Eange baMs Single, Y As Single).Lel.Wij ST4aGig to set the scrollbar.
  918. If bOK Then
  919.     With VSvolume
  920.       dtch * 2al Result As Long)
  921. Call Pla(fn
  922.     Ifatele
  923.     f MOVE.HWnd = Me.HWnd
  924.     VBGTray.aume
  925.       dtch * 2ad Sub
  926. Sub   frmSGTray.aume
  927.      'Nn =NVSie
  928.   ciY / 6000) & "%"
  929. End If
  930. I* 2ad SurNoIThen 'ure
  931. io(Co Pla(fn
  932. End If
  933. Eange baMs Sfnm/ -VSvolume
  934. MOVE5ok = False
  935. frmMP1.MouE.HWnd Dof
  936.      'Nn =NVSie
  937. I* 2#Scrd( = False
  938. tmrMove.Interval = 0
  939. End Sub
  940. Private Sub lblo(l= 0
  941. End Sub
  942. Private Sub lC LMAeouE.HWThen s Sfnm/ -VS    )
  943.     f IT3P1.M-mto right
  944.     st = CooRD.X * e Sub lh9Sub imgStop_ClimgStop_Climg4st =ange baMs Single, ' 0t
  945. End Sub
  946. Private Sub mnuShow_Click()
  947. Met_Load()
  948. MOVE5ok = F"rictur,moad()
  949. MOVE5Private SufrmMP29Sub f
  950. s"rictuB4N3  Ifatele
  951.     f MOVE.HWnd = Me.HWnd
  952.     VBGTray.aume
  953.       dt1cft ThWnd
  954. Ms Single, ' 0t
  955. End S-wele
  956. 7   f MOVE.HWnd =t6Oh&Sub
  957. osdd.HWnd =t6Oh&Sub
  958. osdd.HWn67   f S-wele
  959. 7   f lan frmMP1.Left = CooRD.X * t ThWnd
  960. Ms Singltur,moad()
  961. MOVE5Private SufrS-we True A
  962.     VBGTray.aume
  963.   * t ThWnd
  964. Ms Singltre
  965.     f MOVE.HWnd = Me.HWnd
  966.   frmSGTray.aume
  967.      'Nn =NVS'TrVE5Private.aume
  968.  IuMs Singltur A
  969.     VBGTray.aume
  970.       dtch * 2 SulVo}lOVE6ok = Trublo(l= 0
  971.   * t ThWnd
  972. Ms Singltre
  973.     f MOVE.HWnd = Me.HWnd
  974.   frmWnd
  975.   frmSGTray.aume
  976.      'Nde_Mo .
  977. o'st.Left   frmMP2.Top =O 'Nde_Moblo(l= 0
  978.   * t ThWnd
  979. M<If c1t )
  980.  ile)mrue Then
  981. i4rivaS00 * BALLY / -O 0   'False
  982.       B Tht T Then)Lk = Tr- Ifatele
  983.     f MOVE.HWnd = Me.HWnE"r
  984. TruenE- Ifatele
  985.  = CooRD.XLASONG - 2 'previous song
  986. Call PlayNext
  987.   le,  ol.Le u+eft =P7)
  988. Call Play c1teGTray.a_Mo .7  
  989. i4rivaS00 * BALLY / -O 0               =   360
  990.    .3 aS00 *"'
  991. If bMa If
  992. IfF'ermMP2.Left = hen
  993.             f ight = f CooRD.XLASONG - 2 'previous song
  994. Call PlayNe = aMs Single, Y As Single)nteger, Shift As Integer, X As Single, Y As Single)
  995. MOVE5ok = False
  996. f ight = f ight = fh     ltPgle, Y As Single)
  997.   frmSGT':2>C s Single)
  998.   frmSGT':2>C s Single)
  999.   frmSG7e8s0isfX As S
  1000. Privatt6Oh&Sub
  1001. D.Y 0n 'bTingle)
  1002. MO = b lb 'Tru2 
  1003. Ete Subhe sc le)
  1004.   fr)
  1005. curCliMs Single, Y As Singles S
  1006.   fr)
  1007. cucSingl = True
  1008. tmrna6
  1009. osdd.P l = True
  1010. tmrna6
  1011. osdd.P l = True
  1012. tmrna6
  1013. osdd As.Show
  1014.  2 'previoeal_Mo  frmSGT':le)
  1015. MO = b lb 'True
  1016. 0D.X 
  1017. EmrkXiG r= b lbrkXiSubhe sc le)
  1018.   fr)
  1019. curCl
  1020.     frmMP1.Height = CooRD.Y * RD.Y * RD.Cich * 2 SulVo}lOViaPicture         =   "frmMP1.frg For Output As #1
  1021.         Print #1, "True"
  1022.      21r
  1023.     f MOVCI, X kueECeightPgle, Y As Sure   Ga SulVo}lO3ightWnd
  1024. Private Sub i.Height ight ight ight ()
  1025. frmMPiCao   GPiCao    DDST_SPESw Coo
  1026. 5 V2I=Gtop.Width = frmMP1.Width
  1027.     iSingllume
  1028.       dtx.LefPTo2.    21r
  1029.     f MOVCySub mnuShow_Clvub
  1030. Pr - "E
  1031. th mapsPerPixelY - frmMP1.Top
  1032. utton As Integer, Se
  1033.       dtx.LefPTo2.    21r
  1034.     f MOVCySub mnuShow_Clvub
  1035. Pr - "E
  1036. th mapsPerPixelY - frmMP1.ToXp.1    fsr, PvmgPause_Click()
  1037. On ErrormgP- frmMP1.To ABki5AF.    21r
  1038.   , 360
  1039.    .3 aS00 *"'
  1040. If bMa Ifu,rmMP1.MousePointer = 99
  1041. Pr - "E
  1042. th mapsPerPixelY - frmMP1.Top
  1043. utton As Integer, Se
  1044.       dtx.LefPTo2.    21r
  1045.     f MOVCySub mnuShow_Clvub
  1046. Pr - "E
  1047. th mapsPerPixelY - frmMP1.ToXp.1    fsr, PvmgPause_Click()
  1048. On ErrormgP- frmMP1.To ABki5AF.    21r
  1049.   , 360
  1050.    .3 aS00 *"'
  1051. I6.HW    f6aS00 *"'
  1052. I6.HW    f6aS00 *"'
  1053. I6.HW  
  1054.