Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

how can a winform become an item in Windows menu?

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:
  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: how can a winform become an item in Windows menu?

    Nice.

    I would love to know what you will do for point 2, so if you feel like sharing information you can email me directly on my email address almasmahfooz@hotmail.com, it always nice to know about ideas.

    :)

  • KelvinNguyen Profile Picture
    KelvinNguyen 30 on at
    RE: how can a winform become an item in Windows menu?

    Hi Almas,

    Thanks for your reply.

    1. About adding script to call a winform we have already done. We just wanted to have winform appearing on Windows menu as with TamerSoft before.

    2. Yes we also have some ideas about to create our own Windows menu, from there we can catch call event then do required stuff. However it will take times thus I just wanted to know any better solution.

    We are deploying winform as DLL.

    Thanks,

    Kelvin

  • Suggested answer
    Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: how can a winform become an item in Windows menu?

    DexToNet was a complete tool, and definitely designed by good team. 

    1.You can not directly add your winform but yes, you can add script to call your winform from the window menu.

    2.And your second requirement can also be achieved but need to work on both your winform and dexterity code level. Are you using C# for winform? how you are deploying it? dll/library or exe? 

    Almas Mahfooz

     I am right here!

  • KelvinNguyen Profile Picture
    KelvinNguyen 30 on at
    RE: how can a winform become an item in Windows menu?

    Hi Almas,

    Thanks for your questions.

    I have 2 objectives:

    1) Add winform into WIndows menu if possible

    2) When winform is on top of other dexterity window, as we can see dexterity windows in Windows menu, I want to bring dexterity window on top of winform when selecting that dexterity window via Windows menu.

    All these objectives were achievable before with third party TamerSoft (Tamersoft.DexToNET.dll), but no longer doable after we have upgraded Dexterity to version GP 2018.

    Dex2018.PNG

    Thanks,

    Kelvin

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: how can a winform become an item in Windows menu?

    Hi Kelvin,

    Sorry I am not very good in understanding the question you asked.

    Help me to understand what exactly is your objective.

    You have both dexterity window and a winform. From which window you are calling other window?

    Do you have both chunk and dll?

  • KelvinNguyen Profile Picture
    KelvinNguyen 30 on at
    RE: how can a winform become an item in Windows menu?

    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

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,928 Most Valuable Professional on at
    RE: how can a winform become an item in Windows menu?

    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
    KelvinNguyen 30 on at
    RE: how can a winform become an item in Windows menu?

    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
    David Musgrave MVP ... 13,928 Most Valuable Professional on at
    RE: how can a winform become an item in Windows menu?

    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
    KelvinNguyen 30 on at
    RE: how can a winform become an item in Windows menu?

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans