web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Dynamics AX 2009 -Hiding Default Content Pane on startup for perticular group of users.-URGENT NEED!!!!!!!!

(0) ShareShare
ReportReport
Posted on by 857

Hello, I have a requirement where i wish to hide or minimize the default content pane of My Dynamics Ax 2009 and Display other form as startup- which will be displayed as soon as Dynamics instance is started by the user from that particular group. This need is of critical importance for me. Kindly advice as soon as possible.

 

Thanks in Advance!

*This post is locked for comments

I have the same question (0)
  • Luegisdorf Profile Picture
    1,930 on at

    You can try to hide the default content pane with Windows API calls.

    Place youre code in

    infolog.startuppost()

  • samurai_developer Profile Picture
    857 on at

    Hello,

    Thanks for the reply.

    I have already tried that but its not working.

    I have a var layer License code. Does doing this requires some specific layer code?

    Kindly reply.

  • Luegisdorf Profile Picture
    1,930 on at

    The VAR-Runtime enables to execute code written in VAR-Layer. But CUS- and USR-Layer is always used. What layer did you place your code?

    I have already tried that but its not working.

    Can you give me the code of your startuppost()?

    Regards

    Patrick

  • samurai_developer Profile Picture
    857 on at

    i wrote the content pane hide code in AOT/classes/info/startuppost  method but no use.

    Hide content pane code i used:-

        #WinApi

       HWND contentPane = WinApi::findWindowEx(WinAPI::findWindowEx(infolog.hWnd(), 0, 'MDIClient', ''),0,'ContentFrame','' );

       ;

    WinApi::ShowWindow(contentPane,#SW_HIDE);

    and I wish to open my custom form in place of the content pane.

    I placed the code on the VAR layer.

    Kindly guide.

    Regards.

  • Luegisdorf Profile Picture
    1,930 on at

    Your code works fine in a job. But it seems another process after startupPost() is showing the pane again. Therefore I have delayed the hide process:


    void hideContentPane()
    {
        #WinApi
        HWND    contentPane = WinApi::findWindowEx(WinAPI::findWindowEx(infolog.hWnd(), 0, 'MDIClient', ''),0,'ContentFrame','' );
        Args    args = new Args(formstr(CustTable));
        FormRun fr;

        ;
        fr = classFactory.formRunClass(args); // consider to use a menuItem instead - this is just a demo
        fr.init();
        fr.run();

        WinApi::ShowWindow(contentPane,#SW_HIDE);

        fr.wait();


    }

    void startupPost()
    {
        ;
        if (curuserid() == "krpa")
        {
            this.setTimeOut(methodstr(Info, hideContentPane), 500);
        }
    }

    This works so far (even it's not very neat). You can try to find another place instead of startuppost() - but I don't know such place. Another approach could be to hide the pane in the run() or init() of your new "startform".

    Regards
    Patrick

  • samurai_developer Profile Picture
    857 on at

    It worked!

    thanks a Billion man!

    Regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans