Form Status

navuser1navuser1 Member Posts: 1,329
Hi All,

Is there any Function to know the Status (Restore Mode / Maximize mode ) of a Navision FORM?? :-k
Now or Never

Comments

  • garakgarak Member Posts: 3,263
    you can only use the known functions / properties behind "CurrForm."
    For example CurrForm.MAXIMIZEDONOPEN
    Do you make it right, it works too!
  • navuser1navuser1 Member Posts: 1,329
    garak wrote:
    you can only use the known functions / properties behind "CurrForm."
    For example CurrForm.MAXIMIZEDONOPEN


    MAXIMIZEDONOPEN function will not resolve my problem :-k
    Now or Never
  • DaveTDaveT Member Posts: 1,039
    Hi,

    If you look at the return value of the MAXIMIZEDONOPEN and MINIMIZEDONOPEN.

    You can also get the heigth and width using CURRFORM.HEIGTH & CURRFORM.WIDTH

    Would these solve the problem?
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • MBergerMBerger Member Posts: 413
    You could make a wrapper OCX or DLL for the functions IsZoomed and IsIconic in User32.dll, and use those in NAV using automation. You'll have to get the handle of the window to check somewhere though, so you might want to add a few other functions to do that ( FindWindow etc. come to mind for that )
  • navuser1navuser1 Member Posts: 1,329
    MBerger wrote:
    You could make a wrapper OCX or DLL for the functions IsZoomed and IsIconic in User32.dll, and use those in NAV using automation. You'll have to get the handle of the window to check somewhere though, so you might want to add a few other functions to do that ( FindWindow etc. come to mind for that )


    I can't find it in Nav 5.0. ](*,)
    Plz help.. [-o<
    Now or Never
  • garakgarak Member Posts: 3,263
    other question: For what do you need this? Whats the reason?
    Do you make it right, it works too!
  • navuser1navuser1 Member Posts: 1,329
    Hi garak

    The problem is that...
    I want to open a form that form should be opend in the Maximized form.
    And than no one can restore it or minimize it.


    What I have done

    I. put code in OnInit

    CurrForm.WIDTH :=30004;
    CurrForm.HEIGHT :=20003;

    2. Set the Properties

    Maximizable = No
    Sizeable = No

    These are working well but Restore down function still working.

    Plz help.
    Now or Never
  • garakgarak Member Posts: 3,263
    sorry you can only use the following properties:

    Minimizable -> No, the user can't minimize the form (_)
    Sizeable -> No, the user can't change the size (<->)
    MaximizedOnOpen -> YES, the form is maximized when opened
    Width -> Your default with
    Height -> Your default height
    _
    Now, if the user press the |_| button on form he could change the maximized mode. But the form has still the width and height.

    Regards
    Do you make it right, it works too!
  • ajhvdbajhvdb Member Posts: 672
    captionbar = NO, prevents minimizing it.
  • navuser1navuser1 Member Posts: 1,329
    garak wrote:
    sorry you can only use the following properties:

    Minimizable -> No, the user can't minimize the form (_)
    Sizeable -> No, the user can't change the size (<->)
    MaximizedOnOpen -> YES, the form is maximized when opened
    Width -> Your default with
    Height -> Your default height
    _
    Now, if the user press the |_| button on form he could change the maximized mode. But the form has still the width and height.

    Regards


    Thanks garak.
    but My code performs better.
    Now or Never
  • navuser1navuser1 Member Posts: 1,329
    ajhvdb wrote:
    captionbar = NO, prevents minimizing it.

    CaptionBar = None

    does not prevent to restore down.
    Now or Never
  • ajhvdbajhvdb Member Posts: 672
    Yes, sorry, just checked my own form. Just set everything to NO (maximized = YES), specify a large width/height and it will work. (NAV 5)
  • navuser1navuser1 Member Posts: 1,329
    ajhvdb wrote:
    Yes, sorry, just checked my own form. Just set everything to NO (maximized = YES), specify a large width/height and it will work. (NAV 5)


    Thanks!!

    [Still Restore down working when Maximizable = Yes]
    Now or Never
Sign In or Register to comment.