Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to lock Form during lunch a class?

(0) ShareShare
ReportReport
Posted on by 110

I have a simple Form MyCustomForm, in a Form's Button in Clicked method I call a Class (method run), so I want to lock (or block) this form during run execution.

My code is look like this :

void clicked()
{// in Button clicked in **MyCustomForm**
     MyClass myClass;
     super();
     myClass = new MyClass();

     // here I want to freeze my FORM 
     myClass.run();
    // here I want to unlock my Form
}

I need this because when class (MyClass) is running can display Dialog etc, but I don't want to touch/click and other on MyCustomForm caller.

If I use :

element.wait(); // not work well - block all
myClass.run();


Thanks, enjoy.

*This post is locked for comments

  • daniele scr Profile Picture
    daniele scr 110 on at
    RE: How to lock Form during lunch a class?

    Hi Crispin John Augustine, now I'm doing this way, but for me have a general solution blocking all Form it's better. Thanks anyway!

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to lock Form during lunch a class?

    Hi DanielePax,

         Please check this below link, may useful to you.

    https://msdn.microsoft.com/en-us/library/formrun.lock.aspx

    Thanks

    Suresh

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

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans