Penulis Topik: [Help] memanggil file .msc dengan vb  (Dibaca 6063 kali)

Offline :Pak:Bos:

  • Pro500
  • ******
  • Tulisan: 867
  • Reputation: +23215/-1049
  • Jenis kelamin: Pria
    • Lihat Profil
[Help] memanggil file .msc dengan vb
« pada: Agustus 18, 2011, 08:16:52 PM »
Memanggil file msc gimana ya? Kalau memanggil file exe bisa menggunakan shell tapi kalau file msc kok gk bisa?

Offline gunzz

  • Pro10
  • ***
  • Tulisan: 16
  • Reputation: +51/-9915
    • Lihat Profil
Re: [Help] memanggil file .msc dengan vb
« Jawab #1 pada: Agustus 18, 2011, 08:49:05 PM »
pake Shell Execute aja...
mungkin bisa membantu
cari kodenya di
http://www.vbcode.com/

Offline Qie.aja

  • Pro200
  • *****
  • Tulisan: 481
  • Reputation: +837/-0
    • Lihat Profil
Re: [Help] memanggil file .msc dengan vb
« Jawab #2 pada: Agustus 18, 2011, 11:28:52 PM »
Memanggil file msc gimana ya? Kalau memanggil file exe bisa menggunakan shell tapi kalau file msc kok gk bisa?
pake shell juga bisa kk..
Tetap berfikir positif meski kadang hasilnya negatif
http://webqie.com

Offline :Pak:Bos:

  • Pro500
  • ******
  • Tulisan: 867
  • Reputation: +23215/-1049
  • Jenis kelamin: Pria
    • Lihat Profil
Re: [Help] memanggil file .msc dengan vb
« Jawab #3 pada: Agustus 19, 2011, 04:07:39 AM »
Gk bisa (invalid procedure call)....

Offline The Gugel

  • Trusted Advisor
  • Pro500
  • *****
  • Tulisan: 3.073
  • Reputation: +65535/-23
  • Jenis kelamin: Pria
  • Suka Membodohkan Orang, Tanda Ilmu Tak Bermanfaat
    • Lihat Profil
Re: [Help] memanggil file .msc dengan vb
« Jawab #4 pada: Agustus 19, 2011, 07:54:41 AM »
Gk bisa (invalid procedure call)....

utk VB.6 , coba pake codes dibawah ini...

Kode: [Pilih]
Option Explicit

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
                                      (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
                                       ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1

Private Sub Command1_Click()
    ShellExecute Me.hwnd, vbNullString, "services.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command10_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\ntmsmgr.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command11_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\ntmsoprq.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command12_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\perfmon.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command13_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\certmgr.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command14_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\secpol.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command2_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\devmgmt.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command3_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\compmgmt.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command4_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\dfrg.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command5_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\diskmgmt.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command6_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\eventvwr.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command7_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\fsmgmt.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command8_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\gpedit.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

Private Sub Command9_Click()
    ShellExecute Me.hwnd, "OPEN", "c:\windows\system32\lusrmgr.msc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub


[spoiler=penampakan:][/spoiler]



utk VB.NET , coba pake codes ini...
misal, utk memanggil Disk Defragmenter...

Kode: [Pilih]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        System.Diagnostics.Process.Start("dfrg.msc")
End Sub
« Edit Terakhir: Agustus 19, 2011, 08:06:02 AM oleh The Gugel »


Offline Qie.aja

  • Pro200
  • *****
  • Tulisan: 481
  • Reputation: +837/-0
    • Lihat Profil
Re: [Help] memanggil file .msc dengan vb
« Jawab #5 pada: Agustus 19, 2011, 11:33:35 PM »
Gk bisa (invalid procedure call)....
beginikah?
Shell "mmc.exe c:\windows\system32\diskmgmt.msc"
Tetap berfikir positif meski kadang hasilnya negatif
http://webqie.com

Offline :Pak:Bos:

  • Pro500
  • ******
  • Tulisan: 867
  • Reputation: +23215/-1049
  • Jenis kelamin: Pria
    • Lihat Profil
Re: [Help] memanggil file .msc dengan vb
« Jawab #6 pada: Agustus 20, 2011, 04:07:11 AM »
Ok terima kasih semuanya... Sudah bisa dengan cara yg dijelasin Qie, namun itu khusur untuk file .msc...
« Edit Terakhir: Agustus 20, 2011, 12:51:34 PM oleh Pak Bos »