2 requirements: WS_EX_TOOLWINDOW AND no owner.WS_EX_TOOLWINDOW - it does not look like a normal window.
Did you read this (http://wiki.freepascal.org/DesignGuidelines) and this (http://edn.embarcadero.com/article/10280)?
PROGRAM project1; USES Windows; ...
Except for reserved words and directives, which are in all lowercase, all Pascal identifiers should use InfixCaps, which means the first letter should be a capital, and any embedded words in an identifier should be in caps, as well as any acronym that is embedded
2 requirements: WS_EX_TOOLWINDOW AND no owner.Really ?
WS_EX_TOOLWINDOW - it does not look like a normal window.Yes... a normal window looks better...
Better hidden WS_EX_TOOLWINDOW, WS_POPUP as parent for main.
Did you read this and this?:D ... No, I don't...
For example: Why on earth does everybody use FName for a field? I guess it's very easy to see that a field is a field (VAR). :)
BUT if you send some code via email or post code on the internet or print some code etc... then I don't know what exactly FName is. I mean inside the LAZARUS IDE it's easy but even there I don't like to wait for the hint window.I guess that depends on ones habits. For example I have never seen a Name or a phone that is not a string a position might be a tpoint or an integer depending who wrote it but that becomes apparent from the assignment code I'm more interested to be able to find faster what I'm looking for when I type than what it is. I see no value on what it is after the initial definition only on what it represents, that is why the name of the variable is a big deal and I avoid reusing variables. Logic errors are harder to find than data errors usually there are a couple of exceptions that data type will create logical errors in the code but very few.
I like to see it right away: iName = Integer, strName = String, uStrName = UnicodeString, edtName = TEdit, pnlName = TPanel, ptName = TPoint .... etc.
That's a lot better I think... and you cannot do so much mistakes if in a hurry... :)
Here is one example with trayicon. When you minimize the form then it will be hidden, you must click on its tastbar icon to show again.Thanks... but right now I don't need the LCL, the target computer hasn't even a standard shell...
1) I do not need to remember the name of the variable I just need to type F and the IDE will provide me with a list of variable to choose from...OK, but I do the same... If I need an Integer then I type "i" and see all my integer variables or I type "str" and I see all my String variables, that's even better if the program has really a lot variables or fields... :) AND I can directly see what kind of variable this is... especially outside the IDE. (I don't like compromises)
:D ... No, I don't...And in vain.
This is your example, only the types have been changed to compile under Win64 (and other minor fixes), formatted according to conventions, ...Nice, thanks, yes right now I'm using an x86-computer and this is only a small test... I need to think about the visual appearance of the program and if I want to use ULW-API or GR32 LIB or GDI+ (..never saw a good looking GDI+ text example so far (like photoshop)... I need something that fits to a photo, so I think transparent text is the best I can do... let's see...).
Version 2 is definitely easier to read ... :PFor me, it's terribly uncomfortable.
Generally everyone has his own opinion, but then everyone agrees on one style. Then everyone follows this rule and everything becomes easier. And when someone says that all this is nonsense, but his version is more beautiful, then the rest can only wish that he showed his code less.I know exactly what you mean, I see this all around me and saw it very intense in school: Dress like everyone else or get beaten up, talk like everyone else or get beaten up, do things like everyone else or get beaten up. Fortunately that was a very long time ago and I'm already outside this slavery-circle. Of course I understand that a team of programmers following the same rules is a good idea, but that doesn't mean every line needs to be identical...
uses
Windows, InterfaceBase, Win32Int, ...
...
var
AppHnd : THandle;
EXStyle: Long;
...
AppHnd := TWin32WidgetSet(WidgetSet).AppHandle; // <- Replace this by Your Handle
EXStyle := GetWindowLongA(AppHnd, GWL_EXSTYLE);
SetWindowLongA(AppHnd, GWL_EXSTYLE, EXStyle or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
can anybody give me a hint how to get rid of the taskbar button ?
Deletes an item from the taskbar.
If the window has the dialog style it also doesn't show up. For a mainform try fsSplash ...I tried out Your suggestion:
since fsDialog is sadly missingThere is no 'FormStyle := fsDialog', but there is a 'BorderStyle := bsDialog'.