Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Password Mask

Author
Message
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Mar 2006 19:04
Any ideas how can I hide entered password with *** symbol when using BlueGUI for edit gadget?

"Gangsters die, they don't go to heaven where angels fly!"
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 23rd Mar 2006 13:37
If I am correct you should be able to get the window handle of the edit control and use the Send API to send an edit box message to the window to make the window use password characters. If I was at my own computer I would look the message constant up, but I do not have access to that computer right now.

Regards,
1tg46

Reality is an illusion brought on by the absence of alcohol-do not take literally
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Mar 2006 19:37
Can you please check this later then, this is very important for me!

"Gangsters die, they don't go to heaven where angels fly!"
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 23rd Mar 2006 22:21
I lied, you don't use the Send API you use the SetWindowLong API. To get more information on constants and declarations get APIViewer.

To do what you want you need these declarations (declared in C#)
private const int ES_PASSWORD = 0x20&;

[DllImport("user32.dll", EntryPoint="GetWindowLongA")]
private static extern int GetWindowLong (
int hwnd,
int nIndex);
[DllImport("user32.dll", EntryPoint="SetWindowLongA")]
private static extern int SetWindowLong (
int hwnd,
int nIndex,
int dwNewLong);

1) Get the window handle for the edit control
2) Get the window long for the edit control
3) Set the window long for the edit control with the ES_PASSWORD value
4) Test
5) Repeat if you come up with errors (or give up if it doesn't work with DBP )

Regards,
1tg46

Reality is an illusion brought on by the absence of alcohol-do not take literally
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Mar 2006 22:31
eee... I'm bad at C, but when I have more time I will try and feedback here on this. Thanks anyway!

"Gangsters die, they don't go to heaven where angels fly!"
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd Mar 2006 23:13
nope no use I cannot get my C#, so there's just one way = I should make this directly in DBP using it's own & BlueGUI's commands!

"Gangsters die, they don't go to heaven where angels fly!"
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 24th Mar 2006 17:27
Just because the two functions and constant are declared in C# above, that does not mean that you can't use them in DBP. It is possible in DBP to call WinAPI, I just haven't done anything with DBP lately so I have not been able to convert the information.

Regards,
1tg46

Reality is an illusion brought on by the absence of alcohol-do not take literally

Login to post a reply

Server time is: 2024-05-19 07:39:09
Your offset time is: 2024-05-19 07:39:09