-
Content Count
2063 -
Joined
-
Last visited
-
Days Won
27
Everything posted by Attila Kovacs
-
It was not for D2007 and it's just setting width and height. Try this procedure ResizeImageList(AImageList: TImageList; AWidth, AHeight: integer); var i: integer; mb, ib, sib, smb: TBitmap; ilc: TImageList; begin ilc := TImageList.Create(nil); try ilc.Width := AWidth; ilc.Height := AHeight; for i := 0 to AImageList.Count - 1 do ilc.AddImage(AImageList, i); ib := TBitmap.Create; mb := TBitmap.Create; try ib.Width := AImageList.Width; ib.Height := AImageList.Height; mb.Width := AImageList.Width; mb.Height := AImageList.Height; AImageList.Width := AWidth; AImageList.Height := AHeight; sib := TBitmap.Create; smb := TBitmap.Create; try sib.Width := AImageList.Width; sib.Height := AImageList.Height; sib.Canvas.FillRect(sib.Canvas.ClipRect); smb.Width := AImageList.Width; smb.Height := AImageList.Height; smb.Canvas.FillRect(smb.Canvas.ClipRect); for i := 0 to -1 + ilc.Count do begin ib.Canvas.FillRect(ib.Canvas.ClipRect); mb.Canvas.FillRect(mb.Canvas.ClipRect); ImageList_DrawEx(ilc.Handle, i, ib.Canvas.Handle, 0, 0, ib.Width, ib.Height, CLR_NONE, CLR_NONE, ILD_NORMAL); ImageList_DrawEx(ilc.Handle, i, mb.Canvas.Handle, 0, 0, mb.Width, mb.Height, CLR_NONE, CLR_NONE, ILD_MASK); sib.Canvas.StretchDraw(Rect(0, 0, sib.Width, sib.Width), ib); smb.Canvas.StretchDraw(Rect(0, 0, smb.Width, smb.Width), mb); end; AImageList.Add(sib, smb); finally sib.Free; smb.Free; end; finally ib.Free; mb.Free; end; finally ilc.Free; end; end;
-
reg /?
-
Yes that would be cool. However, it's not just the IDE. I'm letting my old programs run this way, and they look just great. (Some extra code needed ofc.) For my understanding adding the exe with full path to the first registry path you mention is enough.
-
procedure ResizeImageList(AImageList: TImageList; AWidth, AHeight: integer); var i: integer; mb, ib, sib, smb: TBitmap; ilc: TImageList; begin ilc := TImageList.Create(nil); try ilc.Width := AWidth; ilc.Height := AHeight; for i := 0 to AImageList.Count - 1 do ilc.AddImage(AImageList, i); ib := TBitmap.Create; mb := TBitmap.Create; try ib.Width := AImageList.Width; ib.Height := AImageList.Height; mb.Width := AImageList.Width; mb.Height := AImageList.Height; AImageList.BeginUpdate; try AImageList.SetSize(AWidth, AHeight); sib := TBitmap.Create; smb := TBitmap.Create; try sib.Width := AImageList.Width; sib.Height := AImageList.Height; sib.Canvas.FillRect(sib.Canvas.ClipRect); smb.Width := AImageList.Width; smb.Height := AImageList.Height; smb.Canvas.FillRect(smb.Canvas.ClipRect); for i := 0 to -1 + ilc.Count do begin ib.Canvas.FillRect(ib.Canvas.ClipRect); mb.Canvas.FillRect(mb.Canvas.ClipRect); ImageList_DrawEx(ilc.Handle, i, ib.Canvas.Handle, 0, 0, ib.Width, ib.Height, CLR_NONE, CLR_NONE, ILD_NORMAL); ImageList_DrawEx(ilc.Handle, i, mb.Canvas.Handle, 0, 0, mb.Width, mb.Height, CLR_NONE, CLR_NONE, ILD_MASK); sib.Canvas.StretchDraw(Rect(0, 0, sib.Width, sib.Width), ib); smb.Canvas.StretchDraw(Rect(0, 0, smb.Width, smb.Width), mb); end; AImageList.Add(sib, smb); finally sib.Free; smb.Free; end; finally AImageList.EndUpdate; end; finally ib.Free; mb.Free; end; finally ilc.Free; end; end;
-
Nah, I didn't want to bother with my problems, not that wild, I'm just using the formatter. (which by the way kills the IDE with the latest GE, which again IDC)
-
This is the unit I'm using to fix the issues in D2007. For things I'm using, could be incomplete. The hardcoded address is for the latest IDE with all its patches, will only work with that obviously. DzWiz.pas
-
Yessss, and AFAIR I tried to tell this but there was no reaction.
-
Delphi 11.1 - a month later
Attila Kovacs replied to Mike Torrettinni's topic in Delphi IDE and APIs
Offtopic Under Berlin it's smaller, but I had no issues so far, under D2007 it's the regular size. But I have to run some extra code in a wizard to fix some tgrid/tlist/ttree(virtualtree)/font issues in the IDE. Not much though. the screenshots are on 125% zoom (Well, the full-sized screenshots are downscaled by the forum software, so forget it. They look good 😉) D2007 snipplet -
Delphi 11.1 - a month later
Attila Kovacs replied to Mike Torrettinni's topic in Delphi IDE and APIs
Compatibility mode / HDPI / scale by application or something like that. -
Delphi 11.1 - a month later
Attila Kovacs replied to Mike Torrettinni's topic in Delphi IDE and APIs
I'm running my Berlin and even my D2007 in HDPI mode -with some custom expert along- to get a crisp picture and you are using the latest HDPI aware IDE in blurry mode? -
poor Sea of Japan
-
define "failing", provide more infos, logs, event logs
-
Install Raize components 6.1.10 in Delphi 10
Attila Kovacs replied to AndrewHoward's topic in General Help
Oh yes. Make sure RzComps.inc knows your current Delphi/Compiler version. You have to manually adjust it. -
Install Raize components 6.1.10 in Delphi 10
Attila Kovacs replied to AndrewHoward's topic in General Help
make sure there is no precompiled stuff with older delphi version like dcu, dcp etc... (backup the raize dir first) -
Install Raize components 6.1.10 in Delphi 10
Attila Kovacs replied to AndrewHoward's topic in General Help
there is a build script in the source dir -
I see. I've installed it now and the whole html is inserted as text. Sadly, there is not much we can do in simple mapi. You could ask them in their forum to implement it.
-
@marcin thank you for the feedback, as for thunderbird just pass the html text as the body. Don't forget to inline the images, and keep them in one single line. For Outlook you have to test for yourself as I do not have any here. There are rumors on the net that body should be null and the first and only attachment should be html body but I hope it's not the case anymore.
-
Well, Delphi was first not C#. With "the other" I can't deal. Anyway, I'd suggest you to hire a Delphi coder who can easily override the corresponding event handlers to let TDBGrid behave like you describe. (For whatever mystic reason)
-
What makes you think the "other" is the normal? For me, it's abnormal.
-
Reorganize a class / Set Of ..
Attila Kovacs replied to PatV's topic in Algorithms, Data Structures and Class Design
no, you are showing the interface part of the class, not the actual class with code -
There is always a virtual DoXY behind the OnXY.
-
Cast an array of numbers to array of bytes without re-allocating
Attila Kovacs replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
Ok, what does then SetLength(words, Length(Words)*2); SetLength(TArray<Byte>(words), Length(Words) div 2); with the array? 😉 Btw, it will also reallocate and copy the memory if needed so forget SetLength(). Does your version leak memory? -
Cast an array of numbers to array of bytes without re-allocating
Attila Kovacs replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
What does setlength do with the casted memory?- -
Can undefined function result point to valid/used data in memory?
Attila Kovacs replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
If you are using the string as a pointer it's your responsibility to stay in its boundaries. The memory around it could be anything. Even if it's "unused", the next moment it could be assigned to other things. -
Well, there is ZipForge then. It's still maintained.