ControlsExDevice library

Discussion in 'Additional Libraries' started by agraham, Mar 21, 2008.

  1. agraham

    agraham Expert Licensed User

    A very small counterpart to my ControlsExDesktop library. It provides a DateTimePicker control and an InputBox for getting user input. It will also work on the desktop if needed but ControlsExDesktop has both of the included controls now. Needs .NET 2.0 as DateTimePicker is not in .NET 1.0.

    Help file and demo included.

    EDIT :- updated to version 1.1 - see post below

    EDIT :- Desktop dummy library added

    EDIT :- Version 1.2 posted - see post below

    EDIT :- Version 1.3 posted - see post below

    EDIT :- Version 1.4 posted - see post #31

    EDIT :- Version 1.5 posted - see post #37

    EDIT :- If you haven't already seen it be aware of this pitfall

    EDIT :- Version 1.6 posted. Controls are AutoScale aware and there is a discussion of AutoScale in the help - see post #54

    EDIT :- Version 1.7 posted - see post #62

    EDIT :- Version 1.8 with NotifyIcon posted - see post #65

    EDIT :- Version 1.9 with some bug fixes posted - see post #80

    EDIT :- Version 1.91 posted with the same bugs fixed properly this time :( - see post #81

    EDIT :- Version 1.92 posted - see post #83

    EDIT :- Version 1.92a posted - see post #86

    Attached Files:

    Last edited: Aug 25, 2010
  2. agraham

    agraham Expert Licensed User

    Rapid update to version 1.1 to include a Notification control as requested by sahoopes. Also includes an IconList to support the Icon property of the Notification control.
  3. sahoopes

    sahoopes Member Licensed User

    WOW! Can't thank you enough for this!
  4. agraham

    agraham Expert Licensed User

    Version 1.1 of ControlsExDevice will no longer run on the desktop due to the presence of the Notification object. Posted in the first post is a dummy desktop equivalent containing a dummy Notification object to enable development on the desktop.
  5. alfcen

    alfcen Well-Known Member Licensed User

    Andrew, you made my days for quite a while :)
    The date/time picker, notification bubble and the input box
    are awesome enrichments to B4PPC which truly benefits from
    increasing professional look and feel plus shorter code.
    Thanks so much for the hard work!
    No doubt, the entire forum is celebrating you.
  6. alfcen

    alfcen Well-Known Member Licensed User

    Hi Andrew,
    Still having lots of fun with your library :)
    Two very minor issues I came across:

    1. The input object is not VGA-aware (cosmetic issue)
    2. Can't get the time zone displayed
    "MMM dd, yyyy HH:mm:ss (tt) zzz"
    And perhaps a wish if I may,

    Is is possible to add Screen.Width and Screen.Height returning the
    dimensions of the physical screen, irrespective of form dims and optimized
    or legacy compiled applications? The idea is to query the device for VGA
    or QVGA displays.

  7. agraham

    agraham Expert Licensed User

    Hi Robert

    I'm afraid that is .NET/OS issue I can do nothing about.

    I copied the Custom Date Format part of the help from my ControlExDesktop help and that in turn I got from the .NET DateTime object custom formatting help. It looks like the DateTimePicker control, for some reason, only implements a sub-set of the formats available. The good news is that, although undocumented, the B4PPC DateFormat() & TimeFormat() functions support most of those formats including time zone (on the desktop at least, I haven't tried the device) because they both use a .NET DateTime object. Actually they are really the same function and both return identical results when given the same format strings. DateFormat() is not restricted to date formats and TimeFormat() is not restricted to time formats! Have a play :)

    Yes, I was going to polish the library a bit so I will add this.
  8. agraham

    agraham Expert Licensed User

    Version 1.2 posted in first post.

    A Notification object on the desktop now shows a message box and fires events to emulate what happens on the device.

    A StatusBar control is added, but is of limited functionality (device limitation) showing a single line of text.

    A Display object is added that lets the height and width of the screen in pixels be determined.
  9. alfcen

    alfcen Well-Known Member Licensed User

    Shame on me. You are doing all this whilst I had a drink in a pub to your good health :)

    I will have a play shortly with the update, and let you know. Sounds exciting,
    the undocumented features hidden in the data and time formats as well.
    Can't tell you often enough, you're a bloody legend, mate.

  10. alfcen

    alfcen Well-Known Member Licensed User

    Hello again, Andrew,

    Display.width and height return the form dimensions, not the screen's.
    Specifically, I am running a non-optimized compiled application (pixel doubled)
    in a VGA device. Display.Width returns 240 while there are 480 physical
    pixels. Hmm, I'm beginning to believe that this job can't be done by a library.
    Probably, this information is stored in the registry in device vendor specific locations.

    BTW, the help file topics Display and Status Bar have the same contents.

    Sorry, indeed, for no better feedback. You spend so much time in devotion
    for this forum. I am really happy with the library as it is.

  11. agraham

    agraham Expert Licensed User

    To be pedantic they are the screen dimensions but it is the size of the virtual screen that is being drawn on rather than the physical size that is being returned. I haven't yet found a way to get that.

    Thanks for pointing that out. I had written them correctly in the Help source but a quirk of the Help Compiler resulted in the same text being shown for two different topics - now corrected in the zip.
  12. agraham

    agraham Expert Licensed User

    Have you poked around HKEY_LOCAL_MACHINE\Drivers\ Display\... The names of the entries may be manufacturer/software driver specific but you are looking for something like "CxScreen" and "CyScreen". They might be virtual or physical sizes - I don't know and don't have access to a vga device to find out.
  13. alfcen

    alfcen Well-Known Member Licensed User

    Thanks a lot Andrew, I found it a while ago. The registry key names vary
    with the device vendor and/or LCD OEM supplier.
    Curiously, the iPAQ h2210 shows 480 x 640 although the screen is physically
    QVGA. Standards would be of help here :)
  14. alfcen

    alfcen Well-Known Member Licensed User

    Hi Andrew,
    Another undocumented feature. The text property notifier in your awesome
    ControlsExDevice library accepts HTML tags by which you can format the notification message. The image tag <img src...> is supported but won't display any image.
    The attached screen snap demonstrates the superb performance of your
    most recent jewel.

    Attached Files:

  15. agraham

    agraham Expert Licensed User

    From the .NET documentation
    I chickened out of mentioning the HTML bit in the Help in case it opened a bag of worms in support terms as my knowledge of HTML is c***p :) I also haven't implemented its ability to respond to links. Also from the MS docs -
    If anyone understands what that means and thinks it is useful I can implement the event and provide the response string.
  16. alfcen

    alfcen Well-Known Member Licensed User

    Uggh, I should have sent you a private message regarding the HTML issue :sign0013:

    Ability to respond to values in an HTML form would be fine, but is
    not essential.

    Can you please unveil the link which leads to the .NET documentation
    you have quoted? Then, I will be quiet for while :)
  17. agraham

    agraham Expert Licensed User

  18. agraham

    agraham Expert Licensed User

    Version 1.3 posted with updated help and demo app. This now documents the fact that HTML is rendered in the notification ballon and user input is accepted. A new ResponseSubmitted event fires on user selection and a Response property contains the HTML response string.
  19. Standa

    Standa Member Licensed User

  20. Cableguy

    Cableguy Expert Licensed User

    Hi Andrew,

    I've been playing a bit with your dll, and found that it is not possible to add the calendar control to a Panel, and since there is no "change Parent" available, it renders the control useless in some applications...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice