PasswordTextBox

Discussion in 'Additional Libraries' started by Cableguy, Aug 9, 2007.

  1. Cableguy

    Cableguy Expert Licensed User

    Here's my 2nd dll

    A PasswordTextBox....

    This Textbox enables the coder to hide the input string using a character like "X" or "*", so that no-one can peek at the string...
    and in this case I also implemented a simple encryption of the string passed back to the main basic4ppc code...Of course there's also an un-crypted string that can be passed....
    This was only tested in the desktop...
    This is also a work in progress, and probably will evolve to a Password Panel Input...

    Please place your doubts, wishes or any kind of comments....
     

    Attached Files:

    Last edited: Aug 9, 2007
  2. specci48

    specci48 Well-Known Member Licensed User

    Hi Cableguy,

    I'll get an error adding your password.dll library on the dektop saying:

    An error occured. The format of th file "password.dll" is invalid. :(
    (translated from the german message :sign0013:)

    By the way, any help file available? A small textfile will do. :)


    specci48
     
  3. Cableguy

    Cableguy Expert Licensed User

    Sorry,

    yesterday's Post was set kind in an hurry...

    Here is the dll, a sample app and a txt...enjoy

    PS:
    the password property is not supported by the compactframework but is suported by the "normal" framework,wich you should have installed in order to this dll to work...
     

    Attached Files:

    Last edited: Aug 10, 2007
  4. Erel

    Erel Administrator Staff Member Licensed User

    If it isn't supported by .Net CF then it will only run on the desktop.
     
  5. specci48

    specci48 Well-Known Member Licensed User

    If I extract your .zip file and open the sample I still get the error saying that the .dll has an ivnalid format... :sign0161:
     
  6. Cableguy

    Cableguy Expert Licensed User

    Specci48, do you have the dotnet framework ( not the compactframework ) installed in your PC...?

    This dll, at least for now, is only supported in the desktop....

    Has anyone else had similar problems with this dll?
     
    Last edited: Aug 10, 2007
  7. Cableguy

    Cableguy Expert Licensed User

  8. Erel

    Erel Administrator Staff Member Licensed User

  9. agraham

    agraham Expert Licensed User

    Looking at the references for the DLL with Reflector I think the reason may be that you have compiled it as a full .NET Framework 2.0 library and not as a retargetable device library.
     
  10. Cableguy

    Cableguy Expert Licensed User

    Agraham You were Right!!!!

    I didnt realize it, becausse my first dll was built on top of dzt example project, wich was, of course, already set to work with the compact framework....

    Thanks...

    Working now, but some features dont work the same way in ppc as in desktop

    text alignment is set to center: works on desktop but not on ppc
    passworchar shows what ever char is set on desktop, but in ppc is always "*"

    Any clues???
     
    Last edited: Aug 11, 2007
  11. specci48

    specci48 Well-Known Member Licensed User

    Yes, the .Net Framework 2 is installed on my pc and it works fine with a lot of other programs. But if I open your "Controls" sample or add the dll to a new project I'll get the error. :confused:

    I don't really need the password field and since Erel updated his FormLib... ;)

    But I'm still wondering.


    specci48
     
  12. Cableguy

    Cableguy Expert Licensed User

    Updated Lib, should work now
     

    Attached Files:

  13. agraham

    agraham Expert Licensed User

    No idea why this doesn't work as long as you have set "Textbox1.TextAlign = TextBox1.TextAlign = HorizontalAlignment.Center". This is documented as being supported in CF 1.0 and 2.0.


    This is supported under CF 1.0 and 2.0 according the the VS2005 documentation. However if you are running under CF 2.0 the following applies :-
    "UseSystemPasswordChar property (This property is new in the .NET Framework version 2.0) has precedence over the PasswordChar property. Whenever the UseSystemPasswordChar is set to true, the default system password character is used and any character set by PasswordChar is ignored."
     
  14. Cableguy

    Cableguy Expert Licensed User

    Thanks Agraham..

    I did target cf 2.0 so perhaps thats the reason for the passwordchar not showing, no big deal...
    The text alignment is set like this (and works on the desktop)
    tb.textalign = HorizontalAligment.Center
    being tb the textbox control's name...

    In the desktop it works fine, but on the ppc is stays aligned to the left..maybe as result of the previous property?
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    Only multiline textboxes support changing text alignment (on the device).
     
  16. Cableguy

    Cableguy Expert Licensed User

    mistery solved....
     
  17. agraham

    agraham Expert Licensed User

    Found this (at last) in the VS2005 docs. Explains both of Cableguys' queries.

    Textbox in the Compact Framework
    -----------------------------------

    Single-line TextBox controls, specified by the Multiline property, support only left alignment. Multiline text box controls can be aligned left, right, or center.

    If Multiline is false, the .NET Compact Framework sizes the control to the Height specification, but only the first line in the TextBox is usable. The full .NET Framework keeps the height to one line.

    The PasswordChar property is always an asterisk (*), regardless of what is specified.
     
  18. specci48

    specci48 Well-Known Member Licensed User

    :sign0013:
    A few days ago I did some hard disk cleaning, installed Basis4ppc to another directory ... and forgot to copy Dbasic.exe.config ...

    So sorry for my unnecessary posts.

    specci48
     
Loading...