Code archives/BlitzPlus Gui/Convert Textarea to Password Area

This code has been declared by its author to be Public Domain code.

Download source code

Convert Textarea to Password Area by Leon Drake2006
The only reason i did this is due to the fact that blitzmax cant color any textfields. It can color textareas. Which im using in place of a textarea. It still looks roughly the same and i can retrieve text from it. you could use the same commands in B+ using the user32 decls file
Include "bin\user32.bmx"
'use the user32 source as an include in a sub directory.. you 
'don't have to though you can just import it.
Global windowt:TGadget = CreateWindow("win",200,200,200,300,Desktop(),1)
Global txtarea:Tgadget = CreateTextArea(10,10,100,20,windowt)
'create our window and our textfield
hWnd = QueryGadget(txtarea,1)
SendMessageA(hWnd, EM_SETEDITSTYLE, ES_PASSWORD,0)
SendMessageA(hWnd,EM_SETPASSWORDCHAR,1,0 )
rem
the 1 inside the SendMessageA(hWnd,EM_SETPASSWORDCHAR,1,0 )
command is suppose to represent the character to replace the  characters in the textarea with. I used a 1 guessing.. but it makes a *. i suppose you could play around with it to have it replace the chars with something other than a asterisk
end rem

Comments

None.

Code Archives Forum