• Creator
  • #3576

    dear supportteam!

    i’ve been using formativ 1.6 a lot.
    formativ studio 2.0 with the visual forms designer looks neat and i’d really like to use it but there simply seems to be no documentation available?!??!

    there’s no information on all the new controls or how to work with forms now. i searched the language guide, the developer guide and the www but i wasn’t able to find one valuable piece of information.


  • Author
  • #5500
    Support 1

    Thank you for your enquiry.

    For reference documentation on the components on the Component Palette of the Visual Forms Designer, please take a look at this Support Forum post.

    The Formativ Studio/Creator Developers Guide contains an introduction and usage guidelines on the Visual Forms Designer in the section Creating User Interfaces.

    However, I think we all find it helps to learn from examples. Please feel free to ask if you have a question on how to do something specific with Visual Forms.

    Advansys Support


    well ok. since the raize help isn’t very helpfull
    i’ll have to bother u with my qs anyway.

    i want 2 use the maskedit control to make sure the user puts in a valid time. is this possible?


    I will suggest to use RzDateTimeEdit control from the Enhanced tab and set the EditType to etTime to use the edit control to enter times. Hope this helps.


    thx 4 ur reply.
    i tried the control b4 posting + i don’t like it.
    imho it’s too complicated 4 the kind o users i have 2 deal with.
    (and -advansys may forgive me- it looks crap 😉

    Support 1

    I have found that DateTimePicker (on the Win32 tab of the Component Palette) or the more sophisticated RzDateTimeEdit are both preferable to using MaskEdit for entering a time value.

    Here are EditMask values which restrict entry to time values:

    • Long time (eg. 11:15:59PM): “!90:00:00>LL;1;_”
    • Short time (eg. 23:15): “!90:00;1;_”

    However, these masks will not prevent entry of invalid time values like “33:15” or “23:75” and I don’t believe this can be achieved with the EditMask alone. That is, you will also need to write a handler for the MaskEdit component’s OnChange or OnKeyDown/OnKeyPress event.

    Advansys Support

    [This message was edited by Support 3 on April 14, 2005 at 07:00 PM.]

    Support 1a

    Further to the above, because the masked edit controls don’t inherently know anything about what the data they collect represents, you need to write your own validation code. Here’s a simple example to get you started.

    Sub Main(Client, GWEvent)
      Dlg.rzMaskEditTime.editmask = "!90:00;1;_"
    End Sub
    ' Validate the time when OK button pressed
    sub btnOkClick(Sender)
      dim iPos
      dim iHour
      dim iMinutes
      iPos = instr(1, Dlg.rzMaskEditTime.text, ":", vbTextCompare)
      ' Make sure we have the seperator character exists
      if (iPos = 0) then
        exit sub
      end if
      ' Get the hour portion from the value
      iHour = trim(mid(Dlg.rzMaskEditTime.text, 1, iPos-1))
      ' Exit if the hour value not entered
      if (len(iHour) = 0) then
        msgbox("Enter hour.")
        exit sub
      end if
      iHour = cint(iHour)
      ' Exit, if the hour not in the valid range
      if (iHour >= 24) then
        msgbox("Enter valid hour.")
        exit sub
      end if
      ' Get the minute portion from the value
      iMinutes = trim(mid(Dlg.rzMaskEditTime.text, iPos + 1))
      ' Exit if the minute value not entered
      if (len(iMinutes) = 0) then
        msgbox("Enter minute.")
        exit sub
      end if
      iMinutes = cint(iMinutes)
      ' Exit, if the minute not in the valid range
      if (iMinutes >= 60) then
        msgbox("Enter valid minutes.")
        exit sub
      end if
      msgbox "Time entered: " & TimeSerial(iHour, iMinutes, 0)
    End Sub

    Advansys Support


    thx 4 ur efforts!

    Support 1

    You are welcome.

    Advansys Support

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.