Recent

Author Topic: [Windows] Borderless Resizable Form with no Taskbar Icon  (Read 1326 times)

Firewrath

  • New Member
  • *
  • Posts: 35
[Windows] Borderless Resizable Form with no Taskbar Icon
« on: August 15, 2018, 04:35:21 pm »

While researching this for my project, I've seen a few post and different solutions for this issue. Some of which worked for me, and a few didn't, I don't know why, if they were just too old or what.
So I'm just putting this here for anyone looking for it, as it took me a while to find all the information and get it all together.
(...probably would have been faster if I had internet access at home, but :P)
All this was compiled on a WinXP sP3 machine with Lazarus 1.6.4 + FPC 3.0.2 and ran successfully without issue.
This also ran on a Win10 laptop just fine.

So 'BorderlessResizableNotaskbarIcon.zip' is my Project file that does just what it says, compiled from these post:
Thanks to GetMem for this:
http://forum.lazarus.freepascal.org/index.php/topic,33844.msg220327.html#msg220327
Adnan Shameem of LazPlanet for this:
https://lazplanet.blogspot.com/2013/06/dragging-form-by-its-body.html
And GetMem again :P
http://forum.lazarus.freepascal.org/index.php/topic,31786.msg204083.html#msg204083

I also did a bit of a 'hack' for remove the taskbar icon. See project 'IDK_why_this_works.zip'
I didn't test it out all that much beyond finding out that it works in general (on WinXP&Win10), but not for my main project.
I say that because adding it to my main project, still showed the program in the taskbar even after I changed Form2 to load first (and corrected all the code for that).
I figure it's because all the stuff I already added to my Forms, ...and since I didn't want to do everything over again, I left my stuff alone but I'm still posting it because its odd and maybe it'll work for someone.
Though if it doesn't work for anyone then I'll remove it from this post, because maybe it's my PC and I don't know what is going on. >.<

(Note: For some reason placing 'Form2.Visible := True;' in 'TForm1.FormCreate' causes an "Project project1 raised exception class 'External SIGEGV'
In file unit1.pas at line 47:
Form2.Visible := True;"
error. ...No idea what that's about. *Shrug*
but that's why everything in in 'OnActivate')
Sorry. I currently don't have Internet Access. So my replies might take a week. -_-

 

TinyPortal © 2005-2018