Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Linuxmania Linuxmania is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 392
Rep Power: 14
Linuxmania mempunyai hidup yang Normal
Default (Ask VB6) Winamp

note: sebelum saya bertanya

1. saya bukan anak kuliahan juga sudah bukan anak sekolahan

2. ini bukan tugas cuma sekedar ingin tau

3. dibantu sukur ga di bantu juga gak epe epe







itu kan ada dua kolom, kolom pertama yang atas (Younha - Audition (Time 2 Rock) - Winamp) dan kolom kedua (Younha - Audition (Time 2 Rock (03;30) - Winamp)



donload sampelnya disini http://youngman.tep.su/Win.rar

yang mau ditanyakan:

- apa atau bagaimana source yang bisa munculin panjang lagu sepersekian menit seperti yang ditunjukkan di kolom kedua mohon pencerahannya



yah buat yang mau bagi bagi ilmu ajalah minta bantuannya



untuk modulnya kayak gini code nya:


Code:

Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public lHandle As Long

Function getWinampWindow()
lHandle = FindWindow("Winamp v1.x", vbNullString)
If lHandle > 0 Then
Dim lRet As Long
Dim sTitle As String * 256
Dim sCaption As String
Dim ReturnLength As Long
lRet = GetWindowText(lHandle, sTitle, Len(sTitle))
sCaption = Left(sTitle, InStr(1, sTitle, vbNullChar, vbTextCompare) - 1)
Do
If IsNumeric(Left(sCaption, 1)) = True Or Left(sCaption, 1) = "." Or Left(sCaption, 1) = " " Then
sCaption = Right(sCaption, Len(sCaption) - 1)
Else
Exit Do
End If
Loop
Do
If IsNumeric(Right(sCaption, 1)) = True Or Right(sCaption, 1) = ")" Or Right(sCaption, 1) = " " Or Right(sCaption, 1) = ":" Then
sCaption = Left(sCaption, Len(sCaption) - 1)
ElseIf Right(sCaption, 1) = "(" Then
sCaption = Left(sCaption, Len(sCaption) - 1)
Exit Do
Else
Exit Do
End If
Loop
getWinampWindow = sCaption
Else
getWinampWindow = "Winamp 6 Not Found"
End If
End Function

untuk kode di form1:


Code:

Private Sub Form_Load()
Call Update
End Sub

Function Update()
Label1.Caption = getWinampWindow
End Function

Private Sub Timer1_Timer()
Timer1.Enabled = False
Label1.Caption = getWinampWindow
Timer1.Enabled = True
End Sub





Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 06:28 PM.


no new posts