Strange behavior after changing the main window of a Windows Form application

  • Thread starter Thread starter Padpanix
  • Start date Start date
P

Padpanix

Guest
Good morning all,

I have a windows form application. (Vb Express 2010 - .NET Framework 4 Client Profile, OS : Windows 10 version 1909)!
At first, I had a main form that I was using.

In order to refresh the application, I created a new main form. This is where the strange problems started to appear (the code is identically the same):
1) After starting, some areas do not refresh! (Toolstrip, Menustrip, etc.) you must move the mouse over it to see the buttons and menu appear or to resize the window!
2) At the end of startup, I trigger a Timer to save every X minutes. The timer does not start! even by forcing x times timer1.start
3) The biggest problem, if I bring up a Messagebox, this messagebox remains in the background behind the main window, thus blocking the application! because it waits until I click OK but it is not accessible!
4) I created a custom popup using another form, to display temporary messages for X seconds. If I run this popup (using the ShowWindow, and SetWindowPos APIs), nothing happens unless I minimize the main window (even after 1 minute).
It looks like the main window is blocking some Thread! I checked, double-checked my code.
(and it's the same as the previous one, I don't have an error message! I use Datatables with XmlSerializer, etc.)

Whether I define the startup object "Sub Main" or "Form", it doesn't change anything.
I even recreated a 3rd main form and I have the same problem!
In short, it is not usable.

If I restart with the old main form I no longer have its problems!

I would have put the start code but the code is complex and calls subroutines (it is a program with more than 10,000 thousand lines of code) (70 forms, 50 classes, 30 modules, ...)

I have already done a lot of applications and have never encountered this problem, thanks for your help.

PS: sorry for my english

Cordially.

Steeve.


Steeve

Continue reading...
 
Back
Top