1. Scott Gorke
  2. PowerBuilder
  3. Wednesday, 5 May 2021 20:17 PM UTC

Hi,

 

PB 2019 R2 using Window 10 1909

 

We have a PB app that makes a call to open a C# .NET XAML window. We intended the XAML window to be like a PB "Response" window type, but when that XAML window opens, the user can do an Alt-Tab back to the calling PB app. The user can't do anything in the calling PB app (you can click all you want but you won't be able to do anything) until the XAML window is closed.

 

Is there a PB method of making the XAML window truly modal, or does this call for a strictly C# .NET solution?

 

Rough example of code that calls the XAML to open:

 

DotNetObject idno
DotNetAssembly idna
nvo_powerbuilderfunctioncall invo_pb
string ls_result
integer li_rc

invo_pb = create nvo_powerbuilderfunctioncall
idna = create DotNetAssembly
li_rc = idna.LoadWithDotNetFramework(invo_pb.is_assemblypath)
idno = create DotNetObject
li_rc = idna.CreateInstance(invo_pb.is_classname, idno)

ls_string = idno.CallBarcodeDataWindowView(ls_arg1, ls_arg2, ..., ls_argN)        

// process ls_string

Accepted Answer
Scott Gorke Accepted Answer Pending Moderation
  1. Thursday, 23 September 2021 16:34 PM UTC
  2. PowerBuilder
  3. # Permalink

This hasn't been resolved completely - there are actually at least 3 C# .NET XAML windows that open from our PB app, but the user can toggle back and forth between the PB and C# apps. Also, for my C# XAML window, it opens as a response window of sorts: the user can toggle to the calling app, but the calling app is read-only until the C# XAML window is closed, so a bit of a nuisance, but not mission critical. Closing....

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 May 2021 22:06 PM UTC
  2. PowerBuilder
  3. # 1

The .NET DLL Importer in PowerBuilder is for importing non-visual .NET DLLs only and for dealing with non-visual objects.  Also, your .NET DLL needs to comply with these requirements: https://docs.appeon.com/pb2019r2/application_techniques/ch20s01.html

I think you will need to find a different way to launch your application.  Maybe others can suggest alternative ways to got this to work.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.