noisiv 1
noisiv
Manwe Work 1
Manwe Work
Agora Metin2 1
Agora Metin2
Bvural41 1
Bvural41
Mt2Hizmet 1
Mt2Hizmet
SLyFeLLowTR 1
SLyFeLLowTR
DEVLOPER 1
DEVLOPER
Hikaye Ekle

Menü İşlemleri /ayrıntı/ ßyMesMes

  • Konuyu başlatan Konuyu başlatan ßyMesMes
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 6
  • Görüntüleme Görüntüleme 757

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Menüye 13x13 bitmaplar nasyl eklenir?

Bir Picturebox control ekle
Autosize özelligini True yap unutma: bitmap olacak (Icon degil )
maximum 13X13 bitmap olmali.

Asagidaki deklerasyonlari bir Bas modulune ekle:
Bu örnek VB4 içindir

Kod:
Private Declare Function VarPtr Lib "VB40032.DLL" (variable As Any ) As Long 
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long ) As Long 
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long ) As Long 
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long ) As Long 

Const MF_BYPOSITION = &H400& 
form load event içine asagidaki kodu yerlestir 

Dim mHandle As Long, lRet As Long, sHandle As Long, sHandle2 As Long 
mHandle = GetMenu(hwnd ) 
sHandle = GetSubMenu(mHandle, 0 ) 
lRet = SetMenuItemBitmaps(sHandle, 0, MF_BYPOSITION, imOpen.Picture, imOpen.Picture ) 
lRet = SetMenuItemBitmaps(sHandle, 1, MF_BYPOSITION, imSave.Picture, imSave.Picture ) 
lRet = SetMenuItemBitmaps(sHandle, 3, MF_BYPOSITION, imPrint.Picture, imPrint.Picture ) 
lRet = SetMenuItemBitmaps(sHandle, 4, MF_BYPOSITION, imPrintSetup.Picture, imPrintSetup.Picture ) 
sHandle = GetSubMenu(mHandle, 1 ) 
sHandle2 = GetSubMenu(sHandle, 0 ) 
lRet = SetMenuItemBitmaps(sHandle2, 0, MF_BYPOSITION, imCopy.Picture, imCopy.Picture )

Çalisma aninda menü nasyl olusturulur?

Kod:
Dim index As Integer 
index = mnuHook.Count 
Load mnuHook(index ) 
mnuHook(index ).Caption = "New Menu Entry" 
mnuHook(index ).Visible = True

Yeni girdiler mnuHook dan sonra olusur. Ancak unutmayin mnuHook hali hazirda varolan bir menü elemanidir.

Text nasyl sifrelenir?
encryption function :

Kod:
Public Function Encrypt(ByVal Plain As String ) 
For I=1 To Len(Plain ) 
Letter=Mid(Plain,I,1 ) 
Mid(Plain,I,1 )=Chr(Asc(Letter )+1 ) 
Next 
Encrypt = Plain 
End Sub 

Public Function Decrypt(ByVal Encrypted As String ) 
For I=1 to Len(Encrypted ) 
Letter=Mid(Encrypted,I,1 ) 
Mid(Encrypted,I,1 )=Chr(Asc(Letter )-1 ) 
Next 
Decrypt = Encrypted 
End Sub 

Print Encrypt("This is just an example" ) 
Print Decrypt("Uijt!jt!kvtu!bo!fybnqmf" )


Form nasyl yavas yavas karartilir? (Fade to black )

Sub FormFade(frm As Form )
Formu yavas yavas karartir

Kod:
For icolVal% = 255 To 0 Step -1 
DoEvents 
frm.BackColor = RGB(icolVal%, icolVal%, icolVal% ) 
Next icolVal% 
End Sub

Formun captionuna nasyl kayan yazy yazylyr?

Kod:
Sub KayanYazi(frm As Form ) 
Dim X As Integer 
Dim current As Variant 
Dim Y As String 
Y = frm.Caption 
frm.Caption = "" 
frm.Show 
For X = 0 To Len(Y ) 
If X = 0 Then 
frm.Caption = "" 
current = Timer 
Do While Timer - current < 0.1 
DoEvents 
Loop 
GoTo bitti 
Else: End If 
frm.Caption = left(Y, X ) 
current = Timer 
Do While Timer - current < 0.05 
DoEvents 
Loop 
bitti: 
Next X 
End Sub
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst