Click here to Skip to main content
15,843,031 members

Comments by Daniele Rota Nodari (Top 45 by date)

Daniele Rota Nodari 8-Feb-23 11:48am View    
Is your application running as administrator?
If debugging from Visual studio, is VS running as administrator?
Have you tried hooking CreateProcessAsUser and CreateProcessWithLogonW ? See https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw for more info about them.
Daniele Rota Nodari 1-Aug-22 6:57am View    
What method does the "relevant code" come from?
Why are you hiding/showing child controls if the triggering event is a parent window restore (that should not affect children layout and visibility)?
Have IsAppRunning anything to do with the TextBox/RichTextBox swap logic or the minimize/restore events (maybe you wanted to check for IsHandleCreated and Disposing/IsDisposed properties)?
Daniele Rota Nodari 1-Aug-22 6:51am View    
Better don't use UI controls as data containers. Reading/Writing data (like TextBox.Text) involves copying, allocations, marshalling operations and other unwanted overhead (like cross-thread invocations).
Keep your text elsewhere (e.g.: local field or property) and use it for any data-aware operation (like searching).
Try also to cut down the times you set the Text property, by batching/merging updates and using optimized methods, like AppendText.
Obsviously such approach might require complex structures to link the raw data to the UI counterpart, so you have to evaluate a proper trade-off.
Anyway, you may end up without the need of a TextBox.
Daniele Rota Nodari 31-May-21 10:28am View    
What is the relation between the two forms? do them exist independently or one is open as consequence of an action on the other form?
Daniele Rota Nodari 21-Apr-20 6:01am View    
My previous reply was lost! :(
PlaceLoc substitutes Place everywhere you are using it to fetch the unique combinations.
That means inside the CROSS JOIN (and inside _All). After substitution, the DISTINCT keyword will no longer make difference and you can remove it.
You are using "select DISTINCT PLACE......" to gather exactly what is already inside PlaceLoc.