All Answers

0 votes

Hi Luca,
thanks to the code you wrote in this thread, I have the complete solution
https://wisej.com/support/question/form-enabled-question#sabai-entity-content-8670

I have created an Extension, that do exactly what I ask.
Instead call
Form1,showdialog()
I call
Form1.ShowWithParentLock(me)
and the parent form is locked exactly like on the desktop, and all other forms are free
it’s work wery well!

this is the code (in the forum I must put ‘[]’ instead ‘<'):
if you want you can integrate wisej ShowDialog code with this, if it is useful
[Extension]
Public Sub ShowWithParentLock(ByVal childForm As Form, ByVal parentForm As Form)
ShowWithParentLock(childForm, parentForm, Nothing)
End Sub

''' [summary]
''' Emulate showdialog function, without freezing only the parent form
''' [/summary]
''' [param name="childForm"][/param]
''' [param name="parentForm"][/param]
''' [param name="actionAfterClose"][/param]
[Extension]
Public Sub ShowWithParentLock(ByVal childForm As Form, ByVal parentForm As Form, ByVal actionAfterClose As Action)
If (childForm Is Nothing) Then
Throw New ArgumentNullException("childForm")
End If
If (parentForm Is Nothing) Then
Throw New ArgumentNullException("parentForm")
End If

Dim activatedDelegate As EventHandler = Sub(sender, e)
childForm.Activate()
End Sub

AddHandler childForm.FormClosed, Sub(ByVal sender As Object, ByVal closedEventArgs As FormClosedEventArgs)
Try
parentForm.Eval("this.getBlocker().unblock();")
parentForm.Focus()

If (actionAfterClose IsNot Nothing) Then
actionAfterClose.Invoke
End If
Finally
Try
RemoveHandler parentForm.Activated, activatedDelegate
RemoveHandler parentForm.GotFocus, activatedDelegate
If (Not childForm.IsDisposed OrElse Not childForm.Disposing) Then
childForm.Dispose()
End If
Catch ex As Exception
End Try
End Try
End Sub
AddHandler parentForm.Activated, activatedDelegate
parentForm.Eval("this.getBlocker().setColor('null');
this.getBlocker().setBackgroundImage(null);
this.getBlocker().block();")

childForm.Show(parentForm)
End Sub

0 votes

the only thing I don’t know how to do, is to wait until the code is executed
can you help me with this?

0 votes
In reply to: Form Enabled problem

This full solve the problem
https://wisej.com/support/question/showdialog-parent-problem
regards
Cristian

0 votes

Hi Luca,
thank you, your code solved more than my problems

continue in this thread that I put a solution 🙂
https://wisej.com/support/question/showdialog-parent-problem?tab=answers#sabai-questions-8664-add-answer

ciao
Cristian

0 votes

The modal dialog (show dialog) and topmost and normal forms layers are different than local windows. These are not real windows, they are just <div> elements in the browser managed by a javascript WindowManager class.  There is only the z-index that simulates the 3 “layers”: normal, modal and always on top. Most javascript framework only manage 1 layer, the page and modal. The modal is simulated in a browser by adding a blocker element that stops clicks to the elements below.

Wisej also manages normal windows opened after the modal, but it has to move them to the modal z-index range. That’s what you are seeing when closing the modal in between. There is no solution at the moment other than close the modal before opening a non-modal or make the non-modal modal.

  • Luca answered Oct 4, 2019 - 9:13 pm
0 votes

Cannot reproduce with:

Application.Download(Application.MapPath(“MS Edge-26.png”), “TEST 1 2 3”);

I get “TEST 1 2 3” without +.

  • Luca answered Oct 4, 2019 - 8:48 pm
0 votes
In reply to: Responsive

Yes, please send a test case showing the issue.

  • Luca answered Oct 4, 2019 - 8:39 pm
0 votes
In reply to: form.enabled question

Try this:

protected override void OnEnabledChanged(EventArgs e) {
  if (this.Enabled) {
    this.Eval(@"
        this.getBlocker().unblock();
    ");
  } else {
    this.Eval(@"
      // removes the spinner image
      // can change the color mask using this.getBlocker().setColor('green' or null);
      this.getBlocker().setBackgroundImage(null);

      this.getBlocker().block();
 ");
 }

 base.OnEnabledChanged(e);
}
  • Luca answered Oct 4, 2019 - 8:38 pm
0 votes
In reply to: form.enabled question

No workaround?

0 votes

Yes, I used method with second parameter. And I checked it in Chrome and Edge

0 votes

Hi Huỳnh,

Printing without showing a PrintDialog is difficult to achieve across all browsers without installing extensions or changing settings in the browser.  There are posts on StackOverflow explaining possible solutions to the issue through these methods and others.

I would recommend exploring the Google Cloud Print API or another similar API to see if you can achieve silent printing with that.

I’ve created a feature request to add a print() function to the PdfViewer control on Wisej! It’s logged as #1993.

Please let me know if I can help with anything else!

Best,

Levie

  • Levie (ITG) answered Oct 3, 2019 - 5:29 pm
  • last active Oct 3, 2019 - 5:32 pm
0 votes
In reply to: MdiList of MenuItem

Hi Huynh,

I have logged issue #1992 for that problem.

Best regards
Frank

0 votes

Hi,

thanks for reporting that issue.

I have logged it as #1991.
We´ll inform you when a fix is available.

Best regards
Frank

0 votes

Hi Dmitry,

Are you using the second parameter of Application.Download(Path,DownloadName)?

What browser are you using?

Let me know!

Best regards,

Levie

0 votes
In reply to: form.enabled question

ok I can set as movable=false and fixed the size,
but it is still selectable/focusable

0 votes

Thanks for finding this bug. I’ve logged as issue #1989, and I’ll update this thread when it’s fixed.

Best regards,

Nick

  • Guest answered Sep 28, 2019 - 11:05 pm
0 votes
In reply to: organization chart

Hi Hasan,

Could you be more specific on what control you’re looking at?  If you’re looking for samples these might be helpful: https://github.com/iceteagroup/wisej-examples

Best,

Levie

0 votes
In reply to: form.enabled question

Hi Cristian,

This looks to be the same behavior as WinForms.  You could try two different things:

  1. Attach event handlers to the Form’s EnabledChanged event and toggle the Form’s Movable property and set MaxSize / MinSize properties
  2. Attach a form with a transparent background, no BorderStyle, and a fixed-size directly on top of the other form.

Solution #1 would be easier, but it’s entirely up to you.

Best,

Levie

0 votes
In reply to: GlobalVariable

Hi Antonio,

thanks for your interest in Wisej.

Yes, Gobal Variables are global for all users.
If you want to have session specific variables, please refer to the Application.Session object that can be used as a dictionary:

https://wisej.com/docs/2.0/html/Session.htm

Best regards
Frank

0 votes

Hi Frank,

Thanks for the work-around, that will do for now.

Regards,
Mark

Showing 5481 - 5500 of 11k results