bisa kok, di skip aja itu kodenya, jadi kayak gini :

Private Sub Command1_Click()
Dim lngHand As Long
Dim strName As String * 255
 'Dim wndClass As wndClass (di skip)
Dim lngProcID As Long
 'Dim rctTemp As RECT (di skip juga)
Dim cFormCaption As String

cFormCaption = "Form2"
lngHand = FindWindow(vbNullString, cFormCaption)
GetClassName lngHand, strName, Len(strName)
If Left$(strName, 1) = vbNullChar Then
Form2.Show
Else
MsgBox "Form ini sudah dibuka...!"
End If
End Sub


2010/5/22 Mr Donh <[email protected]>

>
>
> Mas Yopi
>
> yang mengandung kata wndClass pada saat declare
>
> Dim wndClass As wndClass
>
> class wndClass nya tidak dikenal. Ada source class nya mas ?
>
> --- Pada Sen, 17/5/10, Yopie Sofianto 
> <[email protected]<generasi_com%40yahoo.com>>
> menulis:
>
> Dari: Yopie Sofianto <[email protected] <generasi_com%40yahoo.com>>
> Judul: Re: [indoprog-vb] Detek form aktif
> Kepada: [email protected] <indoprog-vb%40yahoogroups.com>
> Tanggal: Senin, 17 Mei, 2010, 7:25 AM
>
>
>
>
> Salam VB,
>
> coba pake ini mas, letakkan di module
>
> Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
> lpClassName As String, ByVal lpWindowName As String) As Long
>
> Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal
> hwnd As Long, _
>
> ByVal lpClassName As String, _
>
> ByVal nMaxCount As Long) _
>
> As Long
>
> Sedangkan di Form Menu
>
> Dim lngHand As Long
>
> Dim strName As String * 255
>
> Dim wndClass As wndClass
>
> Dim lngProcID As Long
>
> Dim rctTemp As RECT
>
> Dim cFormCaption as String
>
> cFormCaption = "Form1"
>
> lngHand = FindWindow(vbNullString, cFormCaption)
>
> GetClassName lngHand, strName, Len(strName)
>
> If Left$(strName, 1) = vbNullChar Then
>
> form1.show
>
> Else
>
> Msgbox "Form ini sudah dibuka...!"
>
> End If
>
> Semoga membantu...
>
> ________________________________
>
> GENERASI COMPUTER
>
> Berbagi Ilmu Visual Basic Bagi Pemula
>
> http://www.generasicomputer.com
>
> Hp. 08126514562
>
> ________________________________
>
> ________________________________
>
> From: "[email protected] <donh234%40yahoo.com>" 
> <[email protected]<donh234%40yahoo.com>
> >
>
> To: [email protected] <indoprog-vb%40yahoogroups.com>
>
> Sent: Sat, May 15, 2010 10:31:29 PM
>
> Subject: [indoprog-vb] Detek form aktif
>
> Halo saya minta bantuan para pakar vb6, bagaimana cara deteksi form yang
> masih aktif yang sudah kebuka sehingga jika kita akan membuka form yang sama
> maka langsung ditolak.
>
> saya ga pake MDI dan memang ga suka mdi untuk deteksi form aktif.
>
> Sent from my BlackBerry®
>
> powered by Sinyal Kuat INDOSAT
>
> ------------------------------------
>
> Untuk berhenti berlangganan kirim email kosong ke :
> [email protected]<indoprog-vb-unsubscribe%40yahoogroups.com>
> .
>
> Untuk forum diskusi lainnya kunjungi :
>
> http://www.geocities.com/indoprog
>
> Yahoo! Groups Links
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
Thx

Regards
Evan


[Non-text portions of this message have been removed]



------------------------------------

Untuk berhenti berlangganan kirim email kosong ke : 
[email protected].
Untuk forum diskusi lainnya kunjungi :
http://www.geocities.com/indoprog
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indoprog-vb/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/indoprog-vb/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Kirim email ke