Mini Media Player, versione corretta!

« Older   Newer »
  Share  
Gianlu-thebest
CAT_IMG Posted on 18/2/2010, 15:10     +1   -1




questa versione di mini media player ( non My Media Player )
e super funzinante cioè aggiunta durata funzionante e controllo volume.
Tutto questo è superleggero! Il codice è appena 40 righe, per questo si chiama mini media player... nell'altro più di 250...

SPOILER (click to view)
CODICE
#include <WindowsConstants.au3>
#include <GuiConstants.au3>
#include <ButtonConstants.au3>
#include <Sound.au3>
TrayTip("Welcome","Hi! Welcome My Media Player!",5)

GUICreate("Mini Media Player", 300,100)
GUISetBkColor(0x7FD4FF)
GUICtrlCreateLabel("Welcome a Mini Media Player!",2,2)
GUISetBkColor(0x7FD4FF)
$play = GUICtrlCreateButton("Play",150,50)
$Pause = GUICtrlCreateButton("Pause", 110,50)
$Stop = GUICtrlCreateButton("Stop",180,50)
$apri = GUICtrlCreateButton("Open file",5,50)
$durata = GUICtrlCreateLabel("Durata: 00:00:00 / 00:00:00",1,30)
$volume = GUICtrlCreateLabel("Volume:",150,30,100,20)
$slider = GUICtrlCreateSlider(180,0,80,30)
GUICTRlSetBkColor($slider,0x7FD4FF)
GUISetState(@SW_SHOW)
$4 = ''
While 1
       $vol = 100 - GUICtrlRead ($slider)
   SoundSetWaveVolume ($vol)
       GUICtrlSetData ($volume,"Volume: "&$vol)
       GUICtrlSetData($durata,"Durata: "&_SoundLength($4)&" / "&_SoundPos($4))
      $msg = GUIGetMsg()
      Switch $msg
      Case $apri
                $4 = FileOpenDialog("Open Sound",@DesktopDir,'Music Files(*.mp3;*.wma;*.midi;*.wav)')
                _SoundPlay($4)
      Case $play
              _SoundPlay($4)
      Case $stop
              _SoundStop($4)
      Case $pause
              _SoundPause($4)
      Case $Gui_event_close
              Exit
              EndSwitch
      WEnd
 
Top
-Anubi-
CAT_IMG Posted on 18/2/2010, 15:12     +1   -1




Bello
 
Top
Gianlu-thebest
CAT_IMG Posted on 18/2/2010, 18:47     +1   -1




Grazie
 
Top
-Anubi-
CAT_IMG Posted on 18/2/2010, 19:48     +1   -1




Evita però di usare un traytip, funziona solo per win200o e Windows XD
 
Top
Gianlu-thebest
CAT_IMG Posted on 19/2/2010, 14:00     +1   -1




ok...
 
Top
Kurt_Black_hat 2.0
CAT_IMG Posted on 19/2/2010, 14:54     +1   -1




Ph33g0 xD
 
Top
Gianlu-thebest
CAT_IMG Posted on 19/2/2010, 14:58     +1   -1




Se ho capito bene... GRAZIE!!

SPOILER (click to view)
hai scritto
CITAZIONE
figo!

vero?
 
Top
Kurt_Black_hat 2.0
CAT_IMG Posted on 19/2/2010, 15:00     +1   -1




CITAZIONE (Gianlu-thebest @ 19/2/2010, 14:58)
Se ho capito bene... GRAZIE!!

SPOILER (click to view)
hai scritto
CITAZIONE
figo!

vero?

Sì xD
 
Top
Gianlu-thebest
CAT_IMG Posted on 19/2/2010, 15:09     +1   -1




eheh io lo so il leet!
 
Top
Kurt_Black_hat 2.0
CAT_IMG Posted on 19/2/2010, 15:27     +1   -1




CITAZIONE (Gianlu-thebest @ 19/2/2010, 15:09)
eheh io lo so il leet!

Il leet è bello quando usato metodicamente, non abusarne :)
 
Top
-Anubi-
CAT_IMG Posted on 19/2/2010, 19:11     +1   -1




4//Ü8!
 
Top
Gianlu-thebest
CAT_IMG Posted on 20/2/2010, 09:06     +1   -1




XDXDXDXD ß®4./0 4//ü81 3#3#3#3
 
Top
11 replies since 18/2/2010, 15:10   110 views
  Share