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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

how can a winform become an item in Windows menu?

(1) ShareShare
ReportReport
Posted on by 30

Hi all,

I am trying to open a winform as a normal dexterity form following the guide from VSTool guide.

public partial class DynamicsGPForm1 : DexUIForm

DynamicsGPForm1 form = new DynamicsGPForm1();

form.Show();
form.Activate();

The winform is opened but it is not shown in Windows menu.

pastedimage1614825384915v1.png

But if I open a Dexterity form as below example, it will be shown in Windows menu:

Microsoft.Dexterity.Applications.Dynamics.Forms.SopEntry.Open()

pastedimage1614825768822v3.png

I am developing by latest Dexterity 18.00.0028.

Appreciate any help / advice.

Kind Regards,

Kelvin

Categories:
I have the same question (0)
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Kelvin

    You cannot have a winform showing on the Dexterity windows menu.

    Regards

    David

  • KelvinNguyen Profile Picture
    30 on at

    Hi David and everyone,

    I am now facing a side-effect issue because of being unable to add .net form into Windows menu. That is if we have Dex and .net forms opened concurrently, and .net form is already on top, we can't bring Dex form to the top by Windows menu. I guess because Dexterity knows nothing about .net form that's why it has thought that Dex form already on top.

    Windows-Menu.png

    It will be really annoying for our clients as this seems a very basic standard.

    Anyone is facing same issue and will appreciate a lot for any advice.

    Kind Regards,

    Kelvin

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Kelvin

    The list of windows in the Windows menu is Dexterity windows. There is no way to get a winform to show in the list without some really low level hacking (no idea how to do that).

    As Winforms are not supported on the webclient and you already have some Dexterity windows, can't you use Dexterity to create the window and then code against it using either Dexterity or VSTools.

    Regards

    David

  • KelvinNguyen Profile Picture
    30 on at

    Hi David,

    Thanks for your reply.

    Do we have any way to pull Dex form to topmost of screen when selecting it via Windows menu, does not matter there exist .net form or not ?

    Kind Regards,

    Kelvin

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Kelvin

    If you open a Dexterity window that is already open, it will bring it to the front.

    I know this works in Dexterity, not sure if it works in VSTools.

    Also I know it brings it to the front of Dexterity windows, not sure if it will come in front of a winform.

    Also make sure the winform is not modal.

    Regards

    David

  • KelvinNguyen Profile Picture
    30 on at

    hi David,

    Yes it works for Dexterity forms without any code, but it does not bring it to the front of a winform, and yes winform is not a modal. I have tried the winform to be inherited from Microsoft.Dexterity.Shell.DexUIForm, DexTaskForm, DexForm... all those are not working at all.

    Thanks,

    Kelvin.

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Ok.... Then it is possible using win32 DLL calls using the extern command in Dexterity.

    This allows you to address the window at the OS level. 

    I have done something similar in GP Power Tools to bring a window to the front of all windows in the OS.

    Regards

    David

  • KelvinNguyen Profile Picture
    30 on at

    Hi David,

    Thanks for your reply.

    Can we catch sort of the SelectedItem event on Windows menu ?

    Kind Regards,

    Kelvin

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    That menu is part of the Runtime Engine so there is no Dexterity way to get to any of the events.

    You might be able to using a low level hack.

    Does the window have to be a winform?

    Regards

    David

  • KelvinNguyen Profile Picture
    30 on at

    Hi David,

    Thanks for your reply.

    Yes it has to be a winform because we have a very complex winform in place with self drawing. Please look at below screenshot.

    Windows-Menu1.png

    Cheers,

    Kelvin

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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 384 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans