2022年7月29日 星期五

delphi procedure Handling Messages

 

https://stackoverflow.com/questions/35207639/is-possible-to-use-messages-in-a-class-procedure
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Declaring_a_New_Message-handling_Method
procedure WMPaint(var Msg: TWMPaint); message WM_PAINT;

 
procedure TForm1.WMPaint(var Msg: TWMPaint);
begin
 Beep;
 inherited;
end;

procedure WndProc(var msg: TMessage);

TApplicationEvent
TApplicationEvents.OnMessage
https://github.com/RRUZ/Delphi-IDE-Colorizer/blob/master/IDE%20PlugIn/Galileo/TApplicationEvents.pas

 http://etutorials.org/Programming/mastering+delphi+7/Part+IV+Delphi+the+Internet+and+a+.NET+Preview/Chapter+25+Delphi+for+.NET+Preview+The+Language+and+the+RTL/New+Delphi+Language+Features/

 https://www.syncfusion.com/succinctly-free-ebooks/delphi/object-oriented-programming-with-delphi

SetIncludeExclude (Delphi)
Description


Include(EventProp, eventHandler);
Exclude(EventProp, eventHandler);

 Multicast Events

Delphi has always had the ability to set an event listener— 

https://www.cynet.com.tw/learning/Delphi/Delphi_Basic/049.htm

  Const

WM_MYFIRSTMESSAGE=WM_USER+0;

WM_MYSECONDMESSAGE=WM_USER+1;

 

 

https://docs.microsoft.com/zh-tw/windows/win32/winmsg/message-and-message-queue-functions

 Adventures  Delphi   Messaging TWinControl message Perform WM_USER

 

2022年7月28日 星期四

Removes an element from a Delphi set.

 https://docwiki.embarcadero.com/CodeExamples/Sydney/en/SetIncludeExclude_(Delphi)

 http://www.delphibasics.co.uk/RTL.asp?Name=include&ExpandCode1=Yes

 

 

2022年7月27日 星期三

delphi record file stored in a File type

 https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.TFileRec

 

 How to Add Resource Files in Delphi Executables

 https://www.thoughtco.com/inside-the-delphi-exe-1058211

 Use Delphi Pascal to dynamically add data to an executable file | How to

 https://delphidabbler.com/articles/article-7

 https://www.delphipraxis.net/144310-save-record-blob.html

 https://www.delphipower.xyz/guide_5/loading_data_from_and_saving_data_to_files.html

 https://www.thoughtco.com/create-database-delphis-file-typed-files-1058003

 https://github.com/KrystianBigaj/kblib

 https://stackoverflow.com/questions/3820996/delphi-2010-how-to-save-a-whole-record-to-a-file

 http://www.delphicorner.f9.co.uk/articles/apps6.htm

Delphi Corner Article - Working with Files of Records

https://blog.karthisoftek.com/a?ID=01550-94385f1c-6cdf-4f1f-86d0-3b28d8d07222

2022年7月25日 星期一

ListView ViewStyle: vsIcon,vsList,vsReport,vsSmallIcon

 http://mrxray.on.coocan.jp/Delphi/plSamples/790_ListView.htm

https://docwiki.embarcadero.com/CodeExamples/Sydney/en/ViewStyleProperty_(Delphi)

delphi ListView AddGroupItem

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Mobile_Tutorial%3A_Using_ListBox_Components_to_Display_a_Table_View_%28iOS_and_Android%29

 

12-1. 檔案總管的介面 表單檢視元件(ListView) 範例12-1
在範例12-1,我們的介面相當簡單,除了一個輸入資料的介面外,就是一個ListView。除了提到這些可看見的VCL元件外,我們還有放入一個Popup menu以及一個ImageList在這個範例中。Popup menu主要是提供滑鼠右鍵的功能選單,,而ImageList則是要提供一些Image給ListView使用。  



var
  item: TListItem;
  I:integer;
begin
  listView1.ViewStyle := vsReport;// Set ListView as report form
     listView1.Columns.Add; // add 1 column
     listView1.Columns.Add; // add another column
     listView1.Column[0].Caption :='Serial Number'; // First column title
     listView1.Column[1].Caption :='Name'; // The second column title
     // Start filling the memory of this table below
     // Each row of TListView is a TListItem object
     item := listView1.Items.add; //Add a line, that is, add a TListItem object, and the Add function returns this TListItem object.
     item.Caption := '1'; // The caption of the TLisItem object represents the first column of this row, that is, the first row and first column of the serial number column in your icon
     // The SubItems of the TListItem object is a collection of strings, that is, the second to N columns of the row
     item.SubItems.Add(' bian'); // Add the data in the first row and second column, which is the value of the name column
  // ........
     // Repeatedly add Columns and TListItem and its subitem to fill a table
for I:=0 to 13 do
begin
   listView1.Items[i]:= '10'; // modify the first row and the first column
     listView1.Items[i].SubItems[0]:='Zhang San'; // Modify the first row and second column
     listView1.Items[i].SubItems[1]:='100 years old'; // modify the first row and the third column
     listView1.items[i].subitems[2]:='110';//modify the first row and the fourth column
end;
end;

2022年7月23日 星期六

Delphi Compatibility Macros - RAD Studio

 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Delphi_Compatibility_Macros

 OPENARRAY

#define OPENARRAY(type, values) \
   OpenArray<type>values, OpenArrayCount<type>values.GetHigh()

The OPENARRAY macro can be used as in the following example:

myProc(OPENARRAY(TVarRec,(1, 2, 3, 4, 5)))
      //in which case the expanded code looks like:
myProc(OpenArray<TVarRec>(1, 2, 3, 4, 5), OpenArrayCount<TVarRec>(1, 2, 3, 4, 5).GetHigh())
     //which corresponds to what Delphi methods expect.

The same technique is used for the rest of the macros.

 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Predefined_Macros

 https://docs.devart.com/unidac/work_macros.htm

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2022年7月20日 星期三

ShellExecute url delphi Web browser

 

 https://stackoverflow.com/questions/10154543/opening-webpage-in-default-browser-with-double-quotes-inside-url

 ShellExecute  launch  default Web browser

 

http://delphiprogrammingdiary.blogspot.com/2014/07/shellexecute-in-delphi.html

 https://blog.csdn.net/zisongjia/article/details/105252322

 https://stackoverflow.com/questions/2842452/open-default-browser-with-a-post-in-delphi

https://www.cryer.co.uk/brian/delphi/howto_openbrowserurl.htm

    ShellExecute(self.WindowHandle,'open','www.cryer.co.uk',nil,nil, SW_SHOWNORMAL);

If the URL is not hard coded but held in a string, then it will need to be explicitly passed as a PChar:

    ShellExecute(self.WindowHandle,'open',PChar(url),nil,nil, SW_SHOWNORMAL);

 

Scrapy tools Web Crawlers Automated Webbots

 https://startupstash.com/web-crawler-tools/

 Scrapy Python: How to Make Web Crawler in Python | DataCamp

https://www.datacamp.com/tutorial/making-web-crawlers-scrapy-python

python Scrapy bot  tools  Web Crawlers Automated   Webbots

2022年7月9日 星期六

icecream Orchis mascula (Nordens Flora) Orchis salep Salep üretimi toplama kurutma tüm aşamaları

 https://youtu.be/Ui-fiCNpGcM

 https://en.wikipedia.org/wiki/Dondurma

https://en.wikipedia.org/wiki/Salep

 salep ice cream

High viscosity  salep maltose honey starch

 High viscosity  salep

 https://www.rheologylab.com/articles/rheology-v-viscosity/

2022年7月1日 星期五

ไม้ไผ่ บ้านไม้ไผ่ cây tre Nhà tre Building Bamboo House Duck Farming ไอเดียบ้านไม้ไผ่ โครงสร้างแข็งแรงใช้วัสดุทนทานได้มาตรฐาน

  ไอเดียบ้านไม้ไผ่ โครงสร้างแข็งแรงใช้วัสดุทนทานได้มาตรฐาน

https://www.baanlaesuan.com/164702/ideas/house-ideas/bamboo-2