FAQ |
Calendar |
![]() |
|
Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman. |
![]() |
|
Thread Tools |
#1
|
|||
|
|||
![]()
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 Terkait:
|
![]() |
|
|