-
Mar 1st, 2024, 05:29 AM
#1
Thread Starter
New Member
-
Mar 1st, 2024, 07:20 AM
#2
Re: 2nd form not showing on desktop
Which .net version is this using? I'm guessing maybe 4.8 given you state it has been "working fine for a long time".
When you say it is installed on the PC, do you have an install script or are you copying the EXE and any support files to the PC?
If you copy the EXE and support files to a folder on the development PC, does it operate as expected?
-
Mar 1st, 2024, 07:27 AM
#3
Re: 2nd form not showing on desktop
It's probably something the form is doing. As you haven't told us anything about that beyond a vague general description, it could be anything.
Try putting some tracing code in, i.e. something that tells you where the execution is up to and what data it's using that you'd normally use the debugger to see. You can even attach a debugger to the running process, if VS is installed on that machine.
-
Mar 1st, 2024, 07:48 AM
#4
Thread Starter
New Member
Re: 2nd form not showing on desktop
 Originally Posted by jdelano
Which .net version is this using? I'm guessing maybe 4.8 given you state it has been "working fine for a long time".
When you say it is installed on the PC, do you have an install script or are you copying the EXE and any support files to the PC?
If you copy the EXE and support files to a folder on the development PC, does it operate as expected?
The target framework is .NET version 4.7.2. The application was installed by published files for a CD, then run the setup.exe.
Yes, if I copy the excutable or just run in from the obj folder, it works fine.
So I wonder why it doesn't work when installed!
-
Mar 1st, 2024, 08:58 AM
#5
Re: 2nd form not showing on desktop
I'd do as jmcilhinney suggested and add some logging code, write to a text file where you attempt to display form2 and in the form2 load event.
Are you using all the "normal" controls on this form? Any 3rd party controls at all?
-
Mar 1st, 2024, 09:19 AM
#6
Re: 2nd form not showing on desktop
 Originally Posted by ianr9000
The target framework is .NET version 4.7.2. The application was installed by published files for a CD, then run the setup.exe.
Yes, if I copy the excutable or just run in from the obj folder, it works fine.
So I wonder why it doesn't work when installed!
Are you manually positioning / remembering the location of the forms? I've done that and had the user remove monitors with a form on it.
-
Mar 1st, 2024, 10:48 PM
#7
Re: 2nd form not showing on desktop
 Originally Posted by dbasnett
Are you manually positioning / remembering the location of the forms? I've done that and had the user remove monitors with a form on it.
I have an app, with an animated form that remembers its last location. I’ve had times when the compiled app config file has been corrupted and replaced with default values, resulting in the form being placed off screen. All I could do was manually edit the config file.
BTW. John Wein should get off his horse and drink his milk 
I know what DoEvents does, and I use it, but very sparingly.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Mar 2nd, 2024, 04:32 AM
#8
Thread Starter
New Member
Re: 2nd form not showing on desktop
I am saving the form location to the user settings and I added some trace lines to write to a file and get this:
load form start...
form loc {X=-32000,Y=-32000}
load form complete...
I guess the form location could be the issue. But where is that saved?
Update: I fixed it by adding a menu option to reset the form location back to {0, 0} and that has brought the form back on screen.
Thanks everyone for your help
Last edited by ianr9000; Mar 2nd, 2024 at 05:25 AM.
-
Mar 2nd, 2024, 05:39 AM
#9
Re: [RESOLVED] 2nd form not showing on desktop
Excellent news, glad you were able to get it sorted out.
-
Mar 2nd, 2024, 09:41 AM
#10
Re: [RESOLVED] 2nd form not showing on desktop
You should probably work out how this happened or it's likely to happen again. You still haven't shown us any relevant code so all we can do is guess. It might be that you're saving the location when the form is minimised or something like that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|