Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   General (http://www.delphipages.com/forum/forumdisplay.php?f=2)
-   -   problems porting an app from Delphi 7 to 10 (http://www.delphipages.com/forum/showthread.php?t=217319)

DavidB3 12-02-2015 10:55 AM

problems porting an app from Delphi 7 to 10
 
Hi.

I am trying to port a small application from Delphi 7 to Delphi 10 Seattle.
I've solved most of the problems except for these:

1. The 64 bit version does not start. It says "missing crtdll.dll". But I found it in 3 locations: System32, SysWOW64 and WinSxS.
If I copy the dll near the exe file it says "The application was unable to start correctly (0xc000007b). Click OK to close the application.".
I searched on Google and it says it's a problem somewhere in my OS (Windows 8.1 x64 Pro). But I tried many fixes I found without luck.
What is strange is that a (much) simpler 64 bit project generates a 64 bit exe which I can start without this problem...
My guess is in the rest of the code is something Delphi 10 doesn't like. But it's a lot of code to test so it's like searching for a needle in a haystack...
Maybe someone has an idea where the problem is or how to find it faster.

2. The application uses Listview. In the newest version from comctl32.dll (>= 6 version, in my OS 6.16 version) the user can resize the headers/columns seeing the modification(s) instantly, not after releasing the mouse button like in the previous version.
But the problem is the nearby displayed icons + the blue selection rectangle are been corrupted. If I force a refresh it displays fine.
The problem can be reproduced in any project.
Does anybody knows a fix/workaround?

3. In a Listview draw event I modify the color of the text and/or its background color for items/columns. I don't draw them, I just let the Listview do it (using these values).
But it's not changing the background of the icons (still clWindow like the rest of the Canvas). I can try to draw them in one of the *draw* events from Listview but I don't know how to achieve these:
- not break something else (like the resize of the Listview and/or the headers/columns resize);
- combine the transparent icons with this color using alpha blending.
Maybe someone knows how...

Can anyone help me please...?


Delphi 7 sources:

https://drive.google.com/file/d/0ByK...ew?usp=sharing


Delphi 10 Seattle sources:

https://drive.google.com/file/d/0ByK...ew?usp=sharing

kolbasz 12-02-2015 01:55 PM

Hi DavidB3,

Long time no see! According to the documentation, "crtdll.dll" is only needed for compatibility with older version of windows. You should replace it with "msvcrt.dll":

function crt_isspace(ch: Integer): Integer; cdecl; external 'msvcrt.dll' name 'isspace';
//...

regards,
kolbasz

DavidB3 12-02-2015 02:06 PM

Good to see you too :)

Yes, it worked, now I can start the 64 bit version too.

Thank you :)

kolbasz 12-02-2015 04:48 PM

You're welcome! I'm glad its' working. :)
The project looks great, good job!

DavidB3 12-03-2015 03:37 AM

Thanks.
But, as you can see, I still got some problems to solve :(


Just so everyone could see the other 2 problems:

https://drive.google.com/file/d/0ByK...ew?usp=sharing

https://drive.google.com/file/d/0ByK...ew?usp=sharing

kolbasz 12-03-2015 06:27 AM

Can you make a simple application, just a listbox that reproduce the issues? The problem is you have so many setting, resource files, etc... plus don't have VirtualBox installed. It's very hard to test your project in this conditions.

DavidB3 12-03-2015 07:41 AM

You're right.

So here is a much simpler application to test:

https://drive.google.com/file/d/0ByK...ew?usp=sharing

kolbasz 12-03-2015 01:39 PM

1 Attachment(s)
First of all I don't have Delphi Seattle so I made the changes in XE4. Anyway you should be able to compile without any modification. VCL has not changed much since XE2-->Seattle.
It's not perfect, you should add more stuff like transparent selection, hot item, etc...but at least it's working(very similar with the D7 version).

DavidB3 12-03-2015 04:18 PM

Yes, it works, thank you.
The idea of using a TIcon to draw the images is brilliant.

But OwnerDraw is something I usually avoid, because it's not easy to make a code that would work fine in any situation.
Right now it is under 50%.
Among the alpha blending implementation, I have to take into account other things too:
- the user can delete or add some of the columns, shifting/adding/removing the column(s) with images;
- the OS hottrack doesn't work anymore and maybe the user would want the one from his Windows theme, not the "fixed" one I
can implement;
- when you click now on the empty space is not deselecting as before - I have to implement this too;
..... and many small other...

A simpler application is good to implement and test a few small fixes (for those problems I mentioned), not such big changes :D
I have now a lot of work to do so I can reach at least 90%. But seems like it's the only way to get rid of those problems...

Thank you again.

kolbasz 12-03-2015 06:02 PM

If I remember correctly you're not a big fan of third party components, but in this particular case TVirtualStringTree is justified. All the drawing problem would gone + there are a lot more options.
VST is tested for many people over a long period of time, the fingerprint is very small, would not increase the exe size considerably.
Anyway is up to you to decide. I can make a small demo tomorrow if you like, basically your test project but TListView replaced with TVirtualStringTree.

PS: I would switch from Icon to PNG.

kolbasz 12-03-2015 09:18 PM

1 Attachment(s)
Ok, I did it anyway! Just for the fun. :)

1. Download VST from here(first link): http://www.soft-gems.net/index.php/all-downloads After install don't forget to add the source folder both for win32/win64.
2. Download TestVST.zip
3. Enjoy!

http://i1270.photobucket.com/albums/...olbasz/vst.png


PS: If you have trouble installing VST under Delphi Seattle(but only then) try this link: http://blog.kassebaum.eu/

kolbasz 12-03-2015 09:34 PM

Oh hell! I forgot to add the gray stripes. You need to create a BeforeCellPaint event, like this:
Code:

procedure TForm1.VSTBeforeCellPaint(Sender: TBaseVirtualTree;
  TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
  CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
var
  c1, c2: TColor;
begin
  if (Node <> Sender.FocusedNode) then
  begin
    GetColors((Sender as TVirtualStringTree).Canvas.Brush.Color, 8, c1, c2);
    if Node.Index mod 2 = 0 then
      TargetCanvas.Brush.Color := c1
    else
      TargetCanvas.Brush.Color := c2;
    TargetCanvas.FillRect(CellRect);
  end;
end;

Here you go:
http://i1270.photobucket.com/albums/...olbasz/VST.png

DavidB3 12-04-2015 05:28 AM

1 Attachment(s)
The problem is that I keep getting this message after I enabled show images in header.
If I click on yes, it doesn't ask anymore but it doesn't show images in list (only in header).
So I have to click on No every time I save the project.


Yes, the idea of using png instead of icons is good. Unfortunately, I tried with TListView and had problems (images too faded, grayed, lost transparency and/or lost color bit depth).
I will try with this component too, maybe it will work...

kolbasz 12-04-2015 05:42 AM

Don't worry! That's not a problem at all, you have slightly different version of VST, so an extra parameter(procedure GetImageIndex) was added, removed or renamed. The solution is to delete the procedure's body and declaration and recreate it again with your version, then paste only the content from my example:

Code:

procedure TForm1.VSTGetImageIndex(new params....)
var
  Data: PData;
begin
  Data := VST.GetNodeData(Node);
  case Column of
    0: ImageIndex := Data.FImageIndex1;
    4: IMageIndex := Data.FImageIndex2;
  end;
end;


DavidB3 12-04-2015 07:04 AM

Yes, that solved the problem, thanks.
Thought it was in the component code but it was way simpler xD

But now comes the hard part :D
I see that TVirtualStringTree's functions are different from TListView's functions.
For example, don't laugh :), I search now the equivalent of ListView.ItemIndex. I read several Google finds without luck...
The idea is to know you have a selected row and later access the data to read/write/delete.

LE: found how to get the selected row but not how to find its index in 0 .. rowcount - 1

kolbasz 12-04-2015 07:23 AM

Quote:

For example, don't laugh :), I search now the equivalent of ListView.ItemIndex. I read several Google finds without luck...
It take some time to get use to it, but after that you don't want to touch TListView again :)

Code:

var
  Node: PVirtualNode;
  Data: PData;
begin
  Node := VST.GetFirstSelected;
  if Node <> nil then
  begin
    //since MultiSelect is not enabled, there is only one Node
    Data := VST.GetNodeData(Node);
    //Do something with Data   
  end;
end;

One more thing, I forget to free the nodes...To prevent memory leaks you should add the following to your code(OnFreeNode):
Code:

procedure TForm1.VSTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
var
  Data: PData;
begin
  Data := Sender.GetNodeData(Node);
  Finalize(Data^);
end;

PS: There is a Node.Index property:
Code:

Node := VST.GetFirstSelected;
 if Node <> nil then
  ShowMessage(IntToStr(Node.Index));


DavidB3 12-04-2015 08:54 AM

Ok, thanks.

Another thing:

I see that you used this to add a row:

Code:

type
  PData = ^TData;

  TData = record
      FId: Integer;
      FName, FVName, FFirstDrive, FSecondDrive: String;
      FImageIndex1, FImageIndex2: Integer;
  end;

But most of the times a column or more are deleted. So when you assign a variable of this type to the node data, I don't think it will be too "happy" about the extra data.
I can declare types for all combinations of deleted columns and use the appropriate one but it's not so professional.
Is there a "dynamic" approach?

kolbasz 12-04-2015 09:12 AM

Quote:

But most of the times a column or more are deleted. So when you assign a variable of this type to the node data, I don't think it will be too "happy" about the extra data.
I can declare types for all combinations of deleted columns and use the appropriate one but it's not so professional.
Are you planning to delete columns? I wasn't aware of that! Strongly suggest to hide it, instead of delete it, so the data structure can be preserved.
If you are referring to delete a row, that's not a problem at all...After VST.DeleteNode, OnFreeNode procedure is automatically triggered, and the node(s) are freed. You can check this by putting a break point to OnFreeNode.
Generally speaking the node's data is a pointer, so it can point to anything(TOjbect, TClass). It's perfectly safe with one condition, to free the data it points to on FreeNode event. In this particular case I have chosen a record because it's more easier to work with.

DavidB3 12-04-2015 09:33 AM

In the app if you right click on header a popup menu will show and you can choose which column you want to show or hide.
I wasn't implemented this in the test app because it was suppose to be very simple...
Btw, there are many other things I haven't implemented :D

In ListView I chose to delete the column(s). That's because the current hiding method is not very good (setting Width to 0). Is there a better one in TVirtualStringTree?
Beside the data structure is not stored in ListView/VirtualStringTree but in an array of record (VMEntries).
This data is used internally, the other is just for "show" :D
I sync them by using values for the columns tags. So, if I delete a column, I still know what kind are the next ones from their tag values.

kolbasz 12-04-2015 09:44 AM

Quote:

That's because the current hiding method is not very good (setting Width to 0)
This is funny way to hide a column :), but I guess there is no other solution(TListView).
To truly hide the column(VST):
Code:

VST.Header.Columns[3].Options := VST.Header.Columns[3].Options - [coVisible];
To add a column:
Code:

var
  VirtualTreeColumn: TVirtualTreeColumn;
begin
  VirtualTreeColumn := VST.Header.Columns.Add;
end;

Quote:

This data is used internally, the other is just for "show" :D
I sync them by using values for the columns tags. So, if I delete a column, I still know what kind are the next ones from their tag values.
No need to sync under VST, all the data is available in the internal structure, you can get rid of VMEntries.

kolbasz 12-04-2015 09:57 AM

You may also find useful to search VST for a particular data. For example, you want to select a node, where column "Name" it's equal to a specific value:

Code:

function TForm1.FindNode(const AName: String): PVirtualNode;
var
  Node: PVirtualNode;
  Data: PData;
begin
  Result := nil;
  Node := VST.GetFirst;
  while Assigned(Node) do
  begin
    Data := VST.GetNodeData(Node);
    if UpperCase(Data.FName) = UpperCase(AName) then
    begin
      Result := Node;
      Break;
    end;
    Node := VST.GetNext(Node);
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  Node: PVirtualNode;
begin
  Node := FindNode('test 4');
  if Node <> nil then
  begin
    VST.Selected[Node] := True;
    VST.FocusedNode := Node;
  end;
end;

You can replace the AName with AID or any value you like.

DavidB3 12-04-2015 10:05 AM

Quote:

No need to sync under VST, all the data is available in the internal structure, you can get rid of VMEntries.
Even with VST, I can't get rid of it.
It has more data than the VST columns:

Code:

  VMentry = record
      Name: WideString;
      Ptype: Byte;
      ModeLoadVM: Byte;
      VMID: WideString;
      VMName: WideString;
      VMPath: WideString;
      ExeParams: WideString;
      FirstDriveName: AnsiString;
      FirstDriveFound: Boolean;
      FirstDriveBusType: Byte;
      SecondDriveName: AnsiString;
      SecondDriveFound: Boolean;
      SecondDriveBusType: Byte;
      InternalHDD: WideString;
      CDROMName: WideString;
      CDROMType: Byte;
      Memory: Word;
      Audio: Byte;
      Run: Byte;
      Priority: Byte;
      luIDS: LastUsedIDS;
      VBCPUVirtualization: Byte;
  end;

And this data is needed to properly configure and start a VirtualBox/Qemu VM.

kolbasz 12-04-2015 10:11 AM

I don't see the problem:
Code:

PData = ^TData;
 TData = record
      Name: WideString;
      Ptype: Byte;
      ModeLoadVM: Byte;
      VMID: WideString;
      VMName: WideString;
      VMPath: WideString;
      ExeParams: WideString;
      FirstDriveName: AnsiString;
      FirstDriveFound: Boolean;
      FirstDriveBusType: Byte;
      SecondDriveName: AnsiString;
      SecondDriveFound: Boolean;
      SecondDriveBusType: Byte;
      InternalHDD: WideString;
      CDROMName: WideString;
      CDROMType: Byte;
      Memory: Word;
      Audio: Byte;
      Run: Byte;
      Priority: Byte;
      luIDS: LastUsedIDS;
      VBCPUVirtualization: Byte;
  end;

All the fields/properties are stored internally in the VST, you don't have to display it in the tree, just the one you need. Consider VST like a big dynamical array(or TList) with a visual interface. Of course in the case of very large rownumber, you have to consider memory consumption, but in this particular case, I don't think it's(will be) a problem. How many rows do you have? Max 100?

DavidB3 12-05-2015 01:25 PM

Sorry for the delay in response, but I had a lot of work to do (this project and in my personal life).

I'm just at half with the implementation of VirtualStringTree. Many things have to be changed so it would be 100% functional.

A question:
The header in the TListView ver 6 and in the TVirtualStringTree is far less "visible" than in TListView 5.8 ver. I think the Windows theme is contributing too...
It's flat like the rows, its color is just a bit different than the row color and the margins are very thin and/or painted with an almost invisible color. It's not so easy to realize there is a header there :D
Is there a way to make it more "visible" but still letting the Windows theme to change it?
Maybe by making again tridimensional, or by using an OnAfter event to repaint it with a slightly darker color.


LE: found this, maybe it's good xD

kolbasz 12-05-2015 06:20 PM

Quote:

Sorry for the delay in response, but I had a lot of work to do (this project and in my personal life).
No problem, don't worry!

Quote:

The header in the TListView ver 6 and in the TVirtualStringTree is far less "visible" than in TListView 5.8 ver. I think the Windows theme is contributing too...
It's flat like the rows, its color is just a bit different than the row color and the margins are very thin and/or painted with an almost invisible color. It's not so easy to realize there is a header there :D
Personally I hate win10, but maybe some people like it just the way it is. I don't think it's a good idea to change the default behaviour of the listview/vst. Anyway if you still want to change it, you should owner draw the header. Please open HeaderCustomDraw unit from the Advanced project(VST Demo folder). It's quite amazing what VST can achieve. The link you provided it's also a good example for owner drawing.

DavidB3 12-05-2015 11:05 PM

Actually my description was from Windows 8.1 default theme.

Looks like that code works :)

Before:

http://i411.photobucket.com/albums/p...pshbqsginv.jpg

After:

Code:

Alpha := 40;
Color := clGray;

http://i411.photobucket.com/albums/p...psnldqzzmk.jpg

kolbasz 12-06-2015 09:12 AM

Quote:

Actually my description was from Windows 8.1 default theme.
Same as win10 in my opinion. :)

Quote:

Looks like that code works :)
Alpha := 40;
Color := clGray;
If you ask me looks 10x better.

@DavidB3 I have a request!. :)
After you finish the implementation, please replace the icons with png's. Although TImageList theoretically supports PngImages, in reality that's not true. You should download PngComponents(https://github.com/TurboPack/PNGComponents) and replace TImageList with TPngImageList. You don't have to change a single line of code, it looks and works exactly like TImageList, but it has full png support. The problem is, those icons in your application looks ugly(take this as constructive criticism) :

http://i1270.photobucket.com/albums/...basz/Icons.png
You can download a lot of free Png icon set from the net.

DavidB3 12-06-2015 10:42 AM

I made the header code a little more "adaptable":

Code:

//global var
  ColorToBlend: TColor = clBlack;
  isBlendColorAssigned: Boolean = False;
...........
  function GetColorToBlend(const BaseColor: TColor): TColor;

      procedure MinMax3(const i, j, k: Integer; var Min, Max: Integer);
      begin
        if i > j then
        begin
            if i > k then
              Max := i
            else
              Max := k;

            if j < k then
              Min := j
            else
              Min := k
        end
        else
        begin
            if j > k then
              Max := j
            else
              Max := k;

            if i < k then
              Min := i
            else
              Min := k
        end
      end;

  var
      MinValue: Integer;
      r, g, b, c, v: Integer;
  begin
      c := ColorToRGB(BaseColor);
      r := GetRValue(c);
      g := GetGValue(c);
      b := GetBValue(c);
      MinMax3(r, g, b, MinValue, v);
      if v <= 127 then
        Result := clWhite
      else
        Result := clBlack;
  end;
...........
Alpha := 15;
...........
          if not isBlendColorAssigned then
          begin
            isBlendColorAssigned := True;
            ColorToBlend := GetColorToBlend(PaintInfo.TargetCanvas.Pixels[(R.Right - R.Left) div 2,
                (R.Bottom - R.Top) div 2]);
          end;
          ColorBlend(PaintInfo.TargetCanvas, R, ColorToBlend, Alpha);

This way it will brighten dark colors or it will darken bright colors.

I know some of the icons look ugly but so far couldn't find better ones. Yes, on internet you can find a lot, but most of them are highres and look very bad in 16x16.
Using png won't improve their look, just the memory usage. But the difference will be too low to worth.
I know those components, I used them a lot in other apps. Unfortunately they aren't compatible with D10 (25 compilation errors)...

kolbasz 12-06-2015 11:38 AM

Ok, you don't like png's, it's perfectly fine, but even after five minute of google search you can find better looking icons(ico). :)

DavidB3 12-06-2015 11:59 AM

It makes no difference for me if they are bmp, ico, png or anything else.
Like I said, I chose ico because it was the ONLY WAY to load them without losing something from image. In the Delphi 7 version I had bmp because, same, was the ONLY WAY to load them and show them correctly.
In my other apps I used pngs stored in resources and loading them using those components.

Have you looked where I said "25 compilation errors"?
Btw, the latest versions of Delphi can load pngs. I tried load png into a TPNGImage then into a TBitmap and then in TImageList. But the images were shown grayed.

And I spent countless hours looking in the hundreds of thousands icons on internet. Like I said, most of them look crappy in 16x16 res. And english in not my native language so I don't know all the word "variations" so I can search them.

LE: for "not found" (red circle) I found this one: https://www.iconfinder.com/icons/144...t_icon#size=16
But I'm not sure is much better.

kolbasz 12-06-2015 01:26 PM

Quote:

It makes no difference for me if they are bmp, ico, png or anything else.
Like I said, I chose ico because it was the ONLY WAY to load them without losing something from image. In the Delphi 7 version I had bmp because, same, was the ONLY WAY to load them and show them correctly.
In my other apps I used pngs stored in resources and loading them using those components.
I agree, if it looks good the format doesn't matter.

Quote:

Have you looked where I said "25 compilation errors"?
Yes I have, but like I said I don't have Delphi Seattle so I can do nothing about it.

Quote:

Btw, the latest versions of Delphi can load pngs. I tried load png into a TPNGImage then into a TBitmap and then in TImageList. But the images were shown grayed.
I know it can, but there are some issues with transparency.

Ok, tomorrow I will search for some quality 16x16 images. At least for "Not found", "Options" and "Exit". I will test it myself on that small VST project.

kolbasz 12-07-2015 08:37 AM

1 Attachment(s)
Ok, I did it for the buttons. In my opinion it looks much better now:

http://i1270.photobucket.com/albums/...Untitled_2.png

Same is possible for the VST. If you have difficulties finding the images, please let me know. I will try to search myself.

DavidB3 12-07-2015 09:21 AM

Yes, looks better, thank you :)

http://i411.photobucket.com/albums/p...psaoyhry0o.jpg

Compiled exe file:

https://drive.google.com/file/d/0ByK...ew?usp=sharing

It's still not finished (have to do Move Up/Down, Sort, Drag&Drop).

kolbasz 12-07-2015 09:45 AM

1 Attachment(s)
Yes, looks good. One more: Move Up, Move Down, Refresh images(see attachment). Make a screenshot...let's see how it looks :)

DavidB3 12-07-2015 10:35 AM

1 Attachment(s)
Looks good too:

http://i411.photobucket.com/albums/p...pseewhnlp6.jpg

:( But I just found a bug in the ownerdraw header paint code: when I scroll horizontally I get an access violation somewhere in VirtualTrees.Utils.
In the app exe I last posted it just stops scrolling (errmsg dealt internally); I was able to reproduce the error in the test app.
Just resize the columns so the horizontal scrollbar appears and try to scroll.



LE: the error is in "ColorBlend(PaintInfo.TargetCanvas, R, Color, Alpha);". Probably doesn't know to ignore hidden areas...


LLE: Solved the problem. I changed "R := PaintInfo.PaintRectangle" with "IntersectRect(R, PaintInfo.PaintRectangle, VST.HeaderRect);". This way it will paint only the visible part.

kolbasz 12-07-2015 12:22 PM

1 Attachment(s)
Quote:

:( But I just found a bug in the ownerdraw header paint code: when I scroll horizontally I get an access violation somewhere in VirtualTrees.Utils.
In the app exe I last posted it just stops scrolling (errmsg dealt internally); I was able to reproduce the error in the test app.
Just resize the columns so the horizontal scrollbar appears and try to scroll.

LE: the error is in "ColorBlend(PaintInfo.TargetCanvas, R, Color, Alpha);". Probably doesn't know to ignore hidden areas...
LLE: Solved the problem. I changed "R := PaintInfo.PaintRectangle" with "IntersectRect(R, PaintInfo.PaintRectangle, VST.HeaderRect);". This way it will paint only the visible part.
Ok. I was busy making some png's. Unfortunately what I told you yesterday it's true. Although you can add png's to TImageList the transparency it's pretty crappy. So I switched to TPngImageList(I know it's not working on Delphi Seattle), but I had to try(see screenshot + attachment). What do you think about the look?

http://i1270.photobucket.com/albums/...olbasz/png.png

PS. Please make sure you download TPNGImage from here: http://blog.kassebaum.eu/ because it's the official Delphi support for this components. If that TPngImage is not working, then I'm afraid there's nothing I can do(maybe you should stay with icons then)

DavidB3 12-07-2015 01:31 PM

1 Attachment(s)
I don't know if it's ok to change the QEMU icon. It was taken from here http://qemu.weilnetz.de/icon/other/
And the VirtualBox icon was extracted from the main VirtualBox exe file.

In the previous version there was only a green + a red (very sketchy) icon for storage devices. Its main function was to show if they were available or not.
I guess it's ok with detailed multicolored images too, although the eyes , after a while, won't notice much of the details/colors (but it would of noticed green/red switch more easily)...

Unfortunately TPNGImage still can't be compiled:

http://i411.photobucket.com/albums/p...psae9bc4lo.png

For log see attachment.

And here is the explanation why:

https://groups.google.com/forum/embe...hi/CcsIiMaQUPE
http://docs.embarcadero.com/products...nable_xml.html

kolbasz 12-07-2015 01:51 PM

1 Attachment(s)
Quote:

I don't know if it's ok to change the QEMU icon. It was taken from here http://qemu.weilnetz.de/icon/other/
And the VirtualBox icon was extracted from the main VirtualBox exe file.

In the previous version there was only a green + a red (very sketchy) icon for storage devices. Its main function was to show if they were available or not.
I guess it's ok with detailed multicolored images too, although the eyes , after a while, won't notice much of the details/colors (but it would of noticed green/red switch more easily)...
It's up to you, but having more possibility it's better I guess.

Quote:

Unfortunately TPNGImage still can't be compiled:
Try now(attachment). Remove the old one completely.

DavidB3 12-07-2015 03:18 PM

The code is compiling ok now, thanks.

I combined all the images into one 160x16 res and add it into resources.
Just to save time, what method have you used to load the pngs into the imagelist?


LE: I used the design editor and it loads the pngs ok :)

kolbasz 12-07-2015 03:51 PM

Quote:

The code is compiling ok now, thanks.
You're welcome! I'm glad it's working.

Quote:

combined all the images into one 160x16 res and add it into resources.
Just to save time, what method have you used to load the pngs into the imagelist?
I added manually at design time. For a few images I usually don't use resources.


All times are GMT. The time now is 11:59 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.