ExtraForum - 1299 Private Serverlar - Server Dosya Paylaşımları
Would you like to react to this message? Create an account in a few clicks or log in to continue.
ExtraForum - 1299 Private Serverlar - Server Dosya Paylaşımları

Güncel Paylaşım Forumu !
 
AnasayfaGaleriAramaLatest imagesKayıt OlGiriş yap
Eğlence Başladı Rütbeni Seç! TIKLA
Moderatör Alımı Başladı TIKLA

 

 GetSystemMenu, RemoveMenu kullanımı

Aşağa gitmek 
YazarMesaj
ALPA
Site Kurucusu
Site Kurucusu
ALPA


Mesaj Sayısı : 815
Nerden : Ankara
Kayıt tarihi : 02/03/09
Rep Puanı Rep Puanı : 32

GetSystemMenu, RemoveMenu kullanımı Empty
MesajKonu: GetSystemMenu, RemoveMenu kullanımı   GetSystemMenu, RemoveMenu kullanımı Icon_minitimeSalı Ocak 11, 2011 4:00 pm

Sistem menusunden belirtilen menulerin kaldirilmasi.
Modül içine asagidaki kodlari kopyalayin.

Kod:
Option Explicit

Public Enum enumSysMenu
    size_mn = 1
    move_mn = 2
    minimize_mn = 4
    maximize_mn = 8
    close_mn = 16
    restore_mn = 32
    seperator_mn = 64
End Enum

Private Const SC_SIZE As Long = &HF000
Private Const SC_MOVE As Long = &HF010
Private Const SC_MINIMIZE As Long = &HF020
Private Const SC_MAXIMIZE As Long = &HF030
Private Const SC_CLOSE As Long = &HF060
Private Const SC_RESTORE As Long = &HF120
Private Const MF_BYCOMMAND As Long = &H0
Private Const MF_SEPARATOR As Long = &H800

Private Declare Function apiRemoveMenu Lib "user32" Alias "RemoveMenu"
(ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As
Long
Private Declare Function apiGetSystemMenu Lib "user32" Alias "GetSystemMenu" (ByVal hWnd As Long, ByVal bRevert As Long) As Long

Public Function RemoveSysMenu(ByVal hWnd As Long, nMenus As enumSysMenu) As Long
    If (nMenus And size_mn) = size_mn Then
        RemoveSysMenu = apiRemoveMenu(apiGetSystemMenu(hWnd, False), SC_SIZE, MF_BYCOMMAND)
    End If
    If (nMenus And move_mn) = move_mn Then
        RemoveSysMenu = apiRemoveMenu(apiGetSystemMenu(hWnd, False), SC_MOVE, MF_BYCOMMAND)
    End If
    If (nMenus And minimize_mn) = minimize_mn Then
        RemoveSysMenu = apiRemoveMenu(apiGetSystemMenu(hWnd, False), SC_MINIMIZE, MF_BYCOMMAND)
    End If
    If (nMenus And maximize_mn) = maximize_mn Then
        RemoveSysMenu = apiRemoveMenu(apiGetSystemMenu(hWnd, False), SC_MAXIMIZE, MF_BYCOMMAND)
    End If
    If (nMenus And close_mn) = close_mn Then
        RemoveSysMenu = apiRemoveMenu(apiGetSystemMenu(hWnd, False), SC_CLOSE, MF_BYCOMMAND)
    End If
    If (nMenus And restore_mn) = restore_mn Then
        RemoveSysMenu = apiRemoveMenu(apiGetSystemMenu(hWnd, False), SC_RESTORE, MF_BYCOMMAND)
    End If
    If (nMenus And seperator_mn) = seperator_mn Then
        RemoveSysMenu = apiRemoveMenu(apiGetSystemMenu(hWnd, False), 0, MF_SEPARATOR)
    End If
End Function

form'a bir adet buton ekleyin ve asagidaki ornek kodu yapistirin.

Kod:
Private Sub Command1_Click()
    Call RemoveSysMenu(Me.hWnd, close_mn + seperator_mn)
End Sub

________Kullanıcı İmzası_________
GetSystemMenu, RemoveMenu kullanımı Imza11
Sayfa başına dön Aşağa gitmek
http://www.weyyo.com
 
GetSystemMenu, RemoveMenu kullanımı
Sayfa başına dön 
1 sayfadaki 1 sayfası
 Similar topics
-
» VB 6.0 ( Recordset Kullanımı )
» Vb6 Ini dosyalarinin kullanimi
» ****İsrobot Kullanımı***[ReSiMlİ]
» Excel dosyalarinin kullanimi
» VB6 Sistem Printerlarinin kullanimi

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
ExtraForum - 1299 Private Serverlar - Server Dosya Paylaşımları :: Kodlama & Programlama :: Visual Basic-
Buraya geçin:  

weyyo

knight online serverlar

metin2 serverlar

silkroad serverlar