Good evening everyone.
I need help…
I have a problem with a call of window
in practice we call a new instance of a window,
it opens, is displayed, but does not complete the execution of the calling code
1 dim w_scontrini as new Scontrini
2 w_scontrini.chiamante = new WeakRef(self)
3 w_scontrini.nuovodoc(1)
Line 1. open a new window EXECUTED…
Line 2. NOT EXECUTED …
Line 3. NOT EXECUTED …
What seems so strange is that the same instructions with other windows work fine.
… HELP ME !!! …
Set ‘break on exceptions’ to be ‘on’
Perhaps this window generates an unhandled exception in the open event, and the code goes straight there?
Perhaps this code is in the window you are creating as new?
Why do you write the title of the thread all in capitals! That’s considered shouting
It should not.
They forgot the time when computers only have uppercases ?
This looks like what I saw nearly everyday !
Did you try to clears the Xojo Cache folder ?
Emile, yes, I have tried to delete the contents of the cache folder, but I do not have solved the problem.
when a new window is opened, code execution passes to this new window. The rest of code of the calling procedure are not completed.
one day I will learn to write in English correctly … I promise!
Is your window a modal or a document window?
windows is set to ‘document window’
what I can not understand is this:
in the procedure that performs the billing of orders, open and close all the time window for the issuance of documents without giving any problem.
But making reference to the famous ‘FLEA IN THE EAR’ I try to put it in modal window
Can you reproduce the issue in a smaller test project ?
There are some classes missing in the project.
Yes. Impossible to run in such conditions 
Massimiliano, you sample project is not working: when you post a sample project check that it can be compiled!
However:
have you tried to disable the implicit instance?
have you tried to don’t setup (connect) the UDP control?
When you say that code is not executed, do you mean that the execution stalls on the first instruction? Have you tried to pause the program?
Have you tried to set a breakpoint in the window open event?
Which platform is it ? Under Windows, if a window does not have focus, execution stops.
If so, you should remove Implicit Instance for Scontrini
and use the following code :
dim w_scontrini as new Scontrini
w_scontrini.chiamante = new WeakRef(self)
w_scontrini.nuovodoc(1)
w_scontrini.Show