Konu Araçları | Seçenekler: | Gösterim Stili
Tarih
04/11/2010 15:12
Konu Sahibi
gitarc
Yorumlar
1
Okunma
2172
Konuyu Oyla:
  • Derecelendirme: 5/5 - 1 oy
  • 5
  • 4
  • 3
  • 2
  • 1

Derecelendirme: 5/5 - 1 oy
Kullanici Avatari

gitarc

Aktif Üye
Aktif Üye
 34
 14
 12
 01/11/2010
0
 Balıkesir
 
 Ofis XP
 01/05/2018,13:01
unutmadan bunu bir kere kullanırsanız programda kullanacağınız butun inputboxlar şifreli olur

Visual Basic Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Public Class Form1

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Int32
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Int32, ByVal wCmd As Int32) As Int32
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32

Dim inputTitle As String = "Enter the Password!"
Dim returnedPW As String
Const asteriskKeyCode = 42
Public Const EM_SETPASSWORDCHAR = &HCC
Public Const WM_CREATE = &H1
Dim windowHandle As Int32
Public Const GW_CHILD = 5

Public Sub setPassword()
Dim editWindow As Int32
editWindow = GetWindow(windowHandle, GW_CHILD)
SendMessage(editWindow, EM_SETPASSWORDCHAR, asteriskKeyCode, 0)
End Sub
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
MyBase.WndProc(m)
If m.Result.ToInt32 = WM_CREATE Then
windowHandle = FindWindow(vbNullString, inputTitle)
ElseIf windowHandle > 0 Then
setPassword()
windowHandle = 0
End If
End Sub

Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
lblPw.Text = "InputBox Password:"
returnedPW = InputBox("Enter the Password In the box!", inputTitle, "password!", 0)
If Not returnedPW = Nothing AndAlso returnedPW = "password!" Then
lblPw.Text = "InputBox Password Is: " & returnedPW
Else
lblPw.Text = "InputBox Password Is: Wrong!"
MessageBox.Show("Wrong Password!", " Try Again")
End If
End Sub
End Class


PROGRAMMER MEHMET

Kullanici Avatari

ercansahin

BlackEagle
Uzman
ER.... ŞA....
 44
 3.739
 69
 14/11/2008
 Ankara
 
 Ofis 2010 32 Bit
 03/03/2018,16:39
Teşekkürler Sn gitarc..




Konuyu Okuyanlar: 1 Ziyaretçi

Türkçe Çeviri: MCTR, Yazılım: MyBB, © 2002-2018 MyBB Group.