Recent

Author Topic: [Solved] My Compiled project main window doesn't appear on other computers  (Read 1743 times)

hcvoiron

  • New member
  • *
  • Posts: 8
Hi every one...

Windows 10/64 - I've made a small thing that works on my computer. I have Lazarus on the same computer. When i launch the myprogram.exe, the main window appear and show all the things i've done... But when i copy the program to another computer, and doucle click on myprogram.exe, nothing appears on the desktop, except on the task bar. Nothing more... Do you know where the problem could be ? (between the chair and the keyboard ?  :D )

Thanks for any tip to help me

Regards
S.
« Last Edit: April 03, 2020, 07:07:46 pm by hcvoiron »

Thaddy

  • Hero Member
  • *****
  • Posts: 14213
  • Probably until I exterminate Putin.
Re: My Compiled project main window doesn't appear on other computers
« Reply #1 on: April 03, 2020, 03:31:36 pm »
There is probably a dependecy that is not available on the other computer.
Is it a database application? Does it need openssl to be installed?
Such things can cause that. Can you be more specific?
Specialize a type, not a var.

hcvoiron

  • New member
  • *
  • Posts: 8
Re: My Compiled project main window doesn't appear on other computers
« Reply #2 on: April 03, 2020, 03:39:25 pm »
Thank you for answering...

No Database, the only thing i'm doing is writing text-files. I have 3 ttimers and one TmainMenu. Everything else is Buttons, labels, checkboxes. No Network, No other window...


eljo

  • Sr. Member
  • ****
  • Posts: 468
Re: My Compiled project main window doesn't appear on other computers
« Reply #3 on: April 03, 2020, 03:59:25 pm »
try setting the main forms position property to poDesktopCenter or poScreenCenter or just make sure the form is on the top left corner of your main screen (left, top properties no more than 10) and see if that solves the problem.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: My Compiled project main window doesn't appear on other computers
« Reply #4 on: April 03, 2020, 04:16:46 pm »
Compile your program with -WC
Or in project options, under target, remove Windows GUI app.

The app should start with an additional console window.

On the other computer, start cmd.exe
And in cmd.exe
  cd c:\path\to\app
  project1.exe

See if there is any output.

---
Also, the other system is not by chance 32 bit, but your app 64 bit?

Maybe the antivirus on the other system?
Do a build without debug info, and test that. I have seen a few times that debug info (which is not executable...) trips some AV.

hcvoiron

  • New member
  • *
  • Posts: 8
Re: My Compiled project main window doesn't appear on other computers
« Reply #5 on: April 03, 2020, 04:31:43 pm »
All computers are W10/64 Pro. The antivirus is the same on every computer too (same brand, same version, same updates - i manage them... it's at home ;) )

I'll try the Position of the Form (i'm working with several screens and this makes sense).

I'll give a try to all of this in the minutes to come... thanks for your time ;)

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: My Compiled project main window doesn't appear on other computers
« Reply #6 on: April 03, 2020, 05:10:20 pm »
I'll try the Position of the Form (i'm working with several screens and this makes sense).

I would guess that this is the main issue. If the form is off-screen (e.g. because it is on the second or third screen of your machine for development) then it will be invisible on computers with one screen. Setting the position to poDesktopCenter as suggested by @Thaddy may be the first sensible step.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

hansotten

  • Jr. Member
  • **
  • Posts: 88
Re: My Compiled project main window doesn't appear on other computers
« Reply #7 on: April 03, 2020, 05:15:26 pm »
Hi every one...

Windows 10/64 - I've made a small thing that works on my computer. I have Lazarus on the same computer. When i launch the myprogram.exe, the main window appear and show all the things i've done... But when i copy the program to another computer, and doucle click on myprogram.exe, nothing appears on the desktop, except on the task bar. Nothing more... Do you know where the problem could be ? (between the chair and the keyboard ?  :D )

Thanks for any tip to help me

Regards
S.

You develop on a PC with multiple monitors or very large monitor? Make sure at compile time that the forms are on the first monitor, high left. On other PC's the form is probably  shown off screen, so you only see it in the taskbar. 

have a look at the lfm files and see the Left Height Top Width values.
« Last Edit: April 03, 2020, 05:18:17 pm by hansotten »

hcvoiron

  • New member
  • *
  • Posts: 8
Re: My Compiled project main window doesn't appear on other computers
« Reply #8 on: April 03, 2020, 06:17:06 pm »
Well, before i can try to center the form on my screen... i did f*ck  up something, but i don't know what (smart isn't it ?)

The project still compile, but when i launch the exe file it crashes unless i launch it as Win7/admin compatibility

The error sent is "-exec-run"
a renvoyé l'erreur :
",msg="Error creating process C:/Users/dev/Documents/OBS_PRoject.exe, (error 740).""

If it's simple to solve, i take, else i remake the project (i've stored the code in a safe place, all i have to do is re-create the UI...

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: My Compiled project main window doesn't appear on other computers
« Reply #9 on: April 03, 2020, 06:44:25 pm »
you are in windows, open a cmd and start your program there, ist the error the same ? Or get you a microsoft like errormessage ? -exec-run error 740 is not clear who is resonsible for message 740. this looks like a non ms error.

edit:it is a ms commandline error. your programm needs more rigths. you can test this if you say in explorer, run as administrator
« Last Edit: April 03, 2020, 06:47:25 pm by af0815 »
regards
Andreas

hcvoiron

  • New member
  • *
  • Posts: 8
Re: My Compiled project main window doesn't appear on other computers
« Reply #10 on: April 03, 2020, 07:07:20 pm »
Well, don't ask me why, what... it re run again, without any explanation...

So i have tested the poScreenCenter, and it works fine.... my left point was previously 6400+, so it was way out of the size of a "classical" screen...

Thanks to all of You to point me the error, and still don't know with my exe went buggy and back to normal...

 

TinyPortal © 2005-2018