Aralık
11th 2007
Penceredeki X (Kapama) Düğmesini Etkisizleştirme

Posted under Visual Basic

Öncelikle Bir class oluşturuyoruz.


Public Class CloseButton
    Private Declare Function GetSystemMenu Lib “user32″ (ByVal hwnd As Integer, ByVal revert As Integer) As Integer
    Private Declare Function EnableMenuItem Lib “user32″ (ByVal menu As Integer, ByVal ideEnableItem As Integer, ByVal enable As Integer) As Integer

    Private Const SC_CLOSE As Integer = &HF060
    Private Const MF_BYCOMMAND As Integer = &H0
    Private Const MF_GRAYED As Integer = &H1
    Private Const MF_ENABLED As Integer = &H0

Continue Reading »

No Comments »

Aralık
11th 2007
Tek Tusla Windows Kapama

Posted under Visual Basic

Önce formunuza command1 butonu ekleyiniz ve daha sonra aşağıdaki kodları yazınız..

Private Sub Command1_Click()
Shell (”C:\Windows\rundll32.exe user,exitwindows”)
End Sub

Continue Reading »

No Comments »

Aralık
11th 2007
Cdrom’u Açıp Kapama

Posted under Visual Basic

Private Declare Function mciExecute Lib “winmm.dll” (ByVal lpstrCommand As String) As Long
Private Sub Command1_Click()
  mciExecute (”set cdaudio door open”)
End Sub
Continue Reading »

No Comments »

eXTReMe Tracker
hosting ------------------------------ yeliiniz Silinmitir.Ltfen Sayfanzdan Kodu Kaldrnz.