Hi,
I'm new to Navison, and I got a interesting problem I diddn't expect. Maybe somone with experiance in .NET and Navision could help me.
The application:
First I worte a .NET application as a COM .dll. This application is started from a single instance codeunit. Not modal, because I want to switch between my application and Navision. The Codeunit is started/accesed/used from a Form with several Subforms.
When I "close" my application, i used: (In C#-Code) "this.visible = false;" in the "FormClosing" event. I don't allow the user to close it, because the start of the program last extremly long. This is one reason for the single instance, too.
This part is already working so far. My problem is:
When the application is running, and I switch to Navision, I am not able to use: hotkeys, shortcuts and simple CRTL+A, Arrow-Up, Arrow-Down - Keys. Mouse-actions are running properly.
Now worse - I thought my Application would get the input, but it does not.
One Example:(codeumit & application running)
The cursor is in a Table-Control. One (random) field is selected.
If I hit the Arrow-Up Key, i sould switch to the Line above the chosen one.
On first arrow-up hit - the selected field, loses focus (gets not selected) - cursor disappers.
on second Arrow up-hit - the Status-Bar wich shows the selected field gets empty.
on third Arrow up-hit - nothing (visible) happend
on fouth Arrow-up hit - the (old) selected Field gets focus back., the cursor appears.
My application does not change all the time.
I guess that, my application gets the events from the Keyboard and drops them ... somehow.
Is there any way to tell navision to "not-give-key-down-events-away" or to tell C# to "not-take-key-events-when-hidden-or-lost-focus"?
[edit]
There is one exeption from this behavior: when I open a form with runmodal from the form witch calls the Codeunit, the System is run properly again, and I can use everything, (exept the first form) as usually.
[edit]
.NET 2.0 - Navision 5.0
---
// No Comment
0
Comments
There is a knowledge base KB added last month on 5.0 that had same issue with smtp dll file which is also written in .NET.
The issue was the keyboard would stop working after sending an email.
The fix was an updated dll file. So it looks like your issue is with your .NET app.
You can try and contact MS for details of this issue.
https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;940486
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n