Recent

Author Topic: Unexpected Project1 Form on Start  (Read 1102 times)

Atlanta0001

  • New member
  • *
  • Posts: 7
Unexpected Project1 Form on Start
« on: September 13, 2024, 10:42:37 am »
Hello, how can I solve this problem? When I start Lazarus for the first time and place a button on Form1 and compile the project, another form named Project1 appears first. When I close this window, my Form1 with Button1 shows up on the screen. I have already tried adjusting the settings, but without success. Here are some photos, and this is on a Raspberry Pi 4.

Atlanta0001

  • New member
  • *
  • Posts: 7
Re: Unexpected Project1 Form on Start
« Reply #1 on: September 13, 2024, 10:45:19 am »
And if I change the name of Project1 under Project/Project Options in the Compiler Options Paths, the name also changes for the first form that appears on the screen.

Atlanta0001

  • New member
  • *
  • Posts: 7
Re: Unexpected Project1 Form on Start
« Reply #2 on: September 13, 2024, 11:00:12 am »
 :D :D

bytebites

  • Hero Member
  • *****
  • Posts: 682
Re: Unexpected Project1 Form on Start
« Reply #3 on: September 13, 2024, 11:40:50 am »
The first form is design time form, the second is actual created applicatoin.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8025
Re: Unexpected Project1 Form on Start
« Reply #4 on: September 13, 2024, 11:44:25 am »
The first form is design time form, the second is actual created applicatoin.

Specifically: you've started the application program running with the default name. Note (a) no positioning grid on the running application form and (b) the fact that the green "Run" arrow on the toolbar is greyed out (and the "Pause" and "Stop" icons are active).

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Atlanta0001

  • New member
  • *
  • Posts: 7
Re: Unexpected Project1 Form on Start
« Reply #5 on: September 13, 2024, 12:06:15 pm »
And how can I turn it off, as the latest version is causing even more problems?
https://youtu.be/TLPbHcF_kdE
« Last Edit: September 13, 2024, 12:10:57 pm by Atlanta0001 »

Bart

  • Hero Member
  • *****
  • Posts: 5466
    • Bart en Mariska's Webstek
Re: Unexpected Project1 Form on Start
« Reply #6 on: September 13, 2024, 12:18:07 pm »
There's some option "Hide designer on run" in Options menu IIRC.

Bart

MarkMLl

  • Hero Member
  • *****
  • Posts: 8025
Re: Unexpected Project1 Form on Start
« Reply #7 on: September 13, 2024, 12:43:10 pm »
And how can I turn it off, as the latest version is causing even more problems?
https://youtu.be/TLPbHcF_kdE

There's absolutely no need to splash things like this all over Youtube. The IDE's done exactly what you asked: you hit the Run button with a blank form, so /of/ /course/ it's compiled and run your program.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10552
  • Debugger - SynEdit - and more
    • wiki
Re: Unexpected Project1 Form on Start
« Reply #8 on: September 13, 2024, 01:28:03 pm »
The first form is design time form, the second is actual created applicatoin.

No, it is not.

There is a design form, and he did put a button on it. The name of that form is "Form1"

Then he presses F9, and there is
1) A Form (not in the designer) called "Project1"
2) The form "Form1" with his button.

I suspect that this is do to with either
Code: Pascal  [Select][+][-]
  1.   Application.TaskBarBehavior := ;
  2.   Application.MainFormOnTaskBar := ;
  3.  

It is probable that the exact WindowManager he uses is not correctly supported.

But then it is Lazarus Version 2.2.4.
There is on telling if it is already fixed in 3.4


In any case:
- What is your exact Linux distro?
- What is your exact WindowManager?
- Does it happen with 3.4?

Atlanta0001

  • New member
  • *
  • Posts: 7
Re: Unexpected Project1 Form on Start
« Reply #9 on: September 13, 2024, 02:17:51 pm »
I also tried this with a 32-bit installation and had the same problem.
With sudo apt-get install lazarus in the terminal.

JanRoza

  • Hero Member
  • *****
  • Posts: 700
    • http://www.silentwings.nl
Re: Unexpected Project1 Form on Start
« Reply #10 on: September 13, 2024, 02:23:08 pm »
If I look at his screenprints it looks as if he is running a Raspberry environment.
OS: Windows 11 / Linux Mint 22
       Lazarus 4.0 RC FPC 3.2.2
       CodeTyphon 8.50 FPC 3.3.1

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Unexpected Project1 Form on Start
« Reply #11 on: September 13, 2024, 02:25:18 pm »
....

In any case:
- What is your exact Linux distro?
- What is your exact WindowManager?
- Does it happen with 3.4?

From the screen image, its on a Raspberry Pi using the Raspberry OS (ie copied from debian) using the XFCe Desktop. Cannot remember what xfce uses as a WM but it would not, IMHO, have any surprises.

Did you notice that the unwelcome window has a caption "project1" and the form the OP does wants is called "Form1". There should not be a form called "Project1" as far as I know. But the entry that appears in the Task Bar is labeled "project1" ?? Hmm....

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Unexpected Project1 Form on Start
« Reply #12 on: September 13, 2024, 02:33:50 pm »
I also tried this with a 32-bit installation and had the same problem.
With sudo apt-get install lazarus in the terminal.

Of concern is the fact that you are using quite an old version of Lazarus, 2.2.4, Martin asked you how Lazarus 3.4 performs, to answer that question, you will need to build a new Lazarus from source. Not hard but tedious. One issue there is the amount of memory your raspberry pi has. If its 4G or more, not a problem, if its 2G or 1G then you will need to allocate a bigger swap partition.  Its all documented on the Lazarus wiki, might be a good idea to have a read.

I also suspect you are using the Bullseye based RasPi OS rather than the current, Bookworm based one ?  From my experience, the bookworm based one has a much better behaved GUI ....

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Atlanta0001

  • New member
  • *
  • Posts: 7
Re: Unexpected Project1 Form on Start
« Reply #13 on: September 13, 2024, 03:14:07 pm »
 :-X If I bring up another Raspberry Pi 3 and use an older version, it works without any problems.

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Unexpected Project1 Form on Start
« Reply #14 on: September 13, 2024, 04:01:57 pm »
:-X If I bring up another Raspberry Pi 3 and use an older version, it works without any problems.
ofc it does.

In case you did not noticed, there was a major shift with raspios (bullseye to bookworm) from x11 to wayland and mutter to wayfire (raspi newsitem). It breaks almost anything and everything. Did you at least selected to use xwayland on/at your pi4 ?

edit: on another note, please update your Lazarus version. 2.2.6 is getting a bit old now.
« Last Edit: September 13, 2024, 04:18:41 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

 

TinyPortal © 2005-2018