Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP! Comctl32.dll & user32.dll

16 views
Skip to first unread message

Ca Up Babon

unread,
Aug 10, 2009, 11:49:01 PM8/10/09
to
Hi there,

Im newbie and using visual basic 6. I use this code for my inputbox as my
login box with mask character. And the problem is i want to use manifest file
with this code but it doesnt work. The manifest file contain library
Comctl32.dll which i think cant be use together with library user32 because
my program hang after i compile and and execute it. Hope you can understand
what im trying to ask. Thanks in advance :)

'MY INPUTBOX CODING :

Option Explicit
Public Declare Function SetTimer Lib "user32" _
(ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) As Long

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, _
ByVal nIDEvent As Long) As Long

Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hwndParent As Long, ByVal hwndChildAfter As Long, _
ByVal lpszClass As String, ByVal lpszWindow As String) As Long

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long

Public Const EM_SETPASSWORDCHAR = &HCC

Public Const NV_INPUTBOX As Long = &H5000&

Public Sub PasswordChar(ByVal plngHandle As Long, ByVal uMsg As Long, _
ByVal plngEventId As Long, ByVal dwTime As Long)
Dim lngHwnd As Long

lngHwnd = FindWindowEx(FindWindow("#32770", "ATM vs TWP"), _
0, "Edit", "")

Call SendMessage(lngHwnd, EM_SETPASSWORDCHAR, Asc("*"), 0)

KillTimer plngHandle, plngEventId

End Sub

'MY MANIFEST CODING:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

'AND THE CODE TO MAKE MANIFEST WORK IS:

Private Declare Function InitCommonControls Lib "Comctl32.dll" () As Long

Private Sub Form_Initialize()
InitCommonControls
End Sub


--
I’ll leave when the wind blows

0 new messages