March 02, 2021, 02:14:37 PM

Author Topic: [bmx] Convert Textarea to Password Area by Leon Drake [ 1+ years ago ]  (Read 610 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : Convert Textarea to Password Area
Author : Leon Drake
Posted : 1+ years ago

Description : 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

Code :
Code: BlitzMax
  1. Include "binuser32.bmx"
  2. 'use the user32 source as an include in a sub directory.. you
  3. 'don't have to though you can just import it.
  4. Global windowt:TGadget = CreateWindow("win",200,200,200,300,Desktop(),1)
  5. Global txtarea:Tgadget = CreateTextArea(10,10,100,20,windowt)
  6. 'create our window and our textfield
  7. hWnd = QueryGadget(txtarea,1)
  8. SendMessageA(hWnd, EM_SETEDITSTYLE, ES_PASSWORD,0)
  9. SendMessageA(hWnd,EM_SETPASSWORDCHAR,1,0 )
  10. rem
  11. the 1 inside the SendMessageA(hWnd,EM_SETPASSWORDCHAR,1,0 )
  12. 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
  13. end rem


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal