2021年11月30日 星期二

Animated 3D Models 3d file obj fbx dae stp prt stl WRL blend

 Animated 3D Models 3d file obj fbx dae stp prt stl WRL blend

3D File Format: 10 Most Popular Types for Different Software


https://cgifurniture.com/3d-file-format-10-types/


http://edutechwiki.unige.ch/en/3D_file_format


Essential Guide to 3D File Formats


https://www.marxentlabs.com/3d-file-formats/


https://all3dp.com/1/best-20-3d-animation-software/

Model file formats - Unity - Manual 

https://docs.unity3d.com/Manual/3D-formats.html

Netty is a non-blocking I/O client-server framework for the development of Java network applications

socket cache server layer Socket Server listen thread extends  ServerSocket

Socket listen accept connect identifier

Multiple Connection

inetd (internet service daemon) is a super-server daemon on many Unix systems that provides Internet services. For each configured service
https://en.wikipedia.org/wiki/Inetd
TCP Wrappers (also known as tcp_wrappers) is a host-based networking ACL system, used to filter network access to Internet Protocol servers
https://en.wikipedia.org/wiki/TCP_Wrappers
xinetd (Extended Internet Service Daemon) is an open-source super-server daemon which runs on many Unix-like systems and manages Internet-based connectivity
https://en.wikipedia.org/wiki/Xinetd

iptables是運行在使用者空間的應用軟體,通過控制Linux核心netfilter模組
https://en.wikipedia.org/wiki/Iptables
iptables is a command-line firewall utility
ipchains  firewall

Syslog Daemons, Message Formats and Protocols
syslog daemon is a server process that provides a message logging

getpeername() — Get the name of the peer connected to a socket
WSAASyncSelect getpeername getsockname
asynchronous Socket listen accept client connect identifier getpeername getsockname

ServerSocket" Compressing RMI Wrapper SSL
Remote Method Invocation java.rmi.server Interface RMIServerSocketFactory  Java Remote Messaging Protocol

Netty is a non-blocking I/O client-server framework for the development of Java network applications

 https://en.wikipedia.org/wiki/Netty_(software)

 

 

 

 

 

 

 

 

2021年11月26日 星期五

mechanical algorithm skeletal linkage detected simulator collision

https://en.wikipedia.org/wiki/Linkage_(mechanical)

ECMAScript and WebAssembly, JavaScript WebAssembly SIMD Chrome OpenCV.js

https://v8.dev/

 V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

 

https://github.com/WebAssembly/simd/tree/master/proposals/simd

JavaScript programs from within a Delphi app

 JSKit https://github.com/eugenekryukov/jskit

Evaluate JavaScript programs from within a Delphi app, and support JavaScript scripting of your Delphi app. JavaScriptCore based framework.

 

3rd-Party Development Guide

https://www.crossvcl.com/tlist.html

Castle Game Engine - Coming to Delphi!

 castle-engine https://castle-engine.io/wp/

Castle Game Engine from DelphiCon

 https://github.com/castle-engine/castle-engine

https://delphicon.embarcadero.com/talks/castle-game-engine-coming-to-delphi/ 


https://wiki.lazarus.freepascal.org/Choosing_a_Game_Engine

http://www.zgameeditor.org/

https://www.pascalgamedevelopment.com/content.php

http://www.clootie.ru/

https://delphigl.com/

https://sourceforge.net/projects/andorra/

https://castle-engine.io/

http://zengl.org/

https://asphyre.net/

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

------

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

Image32 - A 2D graphics library for Delphi

Clipper 6.4.0 - NuGet

LazRGBGraphics http://wiki.freepascal.org/LazRGBGraphics
BGRABitmap http://wiki.freepascal.org/BGRABitmap
AggPas http://www.crossgl.com/aggpas/
fpVectorial http://wiki.freepascal.org/fpvectorial
Andorra 2D http://andorra.sourceforge.net/
Graphics32 http://graphics32.org

http://allegro-pas.sourceforge.net/

https://imaginglib.sourceforge.io/

http://www.efg2.com/

Skia4Delphi

AntiAliasing graphics library roundup for Delphi

https://githubhelp.com/topic/delphi-library

https://torry.net/pages.php?s=72

https://awesomeopensource.com/projects/object-pascal

http://www.felix-colibri.com/papers/graphic/delphi_3d_designer/delphi_3d_designer.html

https://giters.com/topics/delphi-library

https://gitplanet.com/language/delphi

 Python for Delphi (P4D)


animation spriters resource Game Engines

 https://instabug.com/
https://wiki.gdevelop.io/gdevelop5/tutorials/resources
  animation spriters resource  https://www.spriters-resource.com/
Animated Sprite QML Type SpriteSequence

Game Engines

Unreal Engine
Unity
Godot Engine
CryEngine Crytek CryEngine 3.8.1
Amazon Lumberyard
AppGameKit AppGameKit Classic
Cocos2d-x Pyglet pygame SDL Simple DirectMedia Layer Lib
MonoGame C#  .NET Foundation.
ShiVa Engine  Web Player (browser plugin) available
HeroEngine
Godot Engine - Free and open source 2D and 3D game engine
Pyxel Edit https://pyxeledit.com/
Qubicle https://www.minddesk.com/
ProBuilder https://unity.com/features/probuilder
Adobe Animate
-----
Ogre3d https://www.ogre3d.org/
Power VR Ray Tracing PowerVR SDK and Tools including ray tracing
Torque 3D http://www.garagegames.com/products/torque-3d
 
Game Graphics Tools
Spine http://zh.esotericsoftware.com/


*** Aseprite - Animated sprite editor & pixel art tool
https://www.aseprite.org/
Beast Autodesk Gameware
https://en.wikipedia.org/wiki/Autodesk_Gameware

3D
Adobe Substance 3D Designer
Maya LT
Yebis
Enlighten
SpeedTree for Games
Umbra
Modo
OGRE3D

TOOLS
Aseprite image editor
Spine 2D skeletal animation http://zh.esotericsoftware.com/ Dragonbones http://dragonbones.com
Enlighten real-time, physic-based lighting
SpeedTree create textures for 3D objects
Substance Designer
Umbra 3D rendering Umbra (3D technology company)
CrazyBump source texture
STG.Seamless Texture Generator Normals Bump Maps Occlusion Specular
TexturePacker TexturePacker - Create Sprite Sheets for your game!

Yebis  https://www.siliconstudio.co.jp/middleware/yebis/jp/
--------
Gravit Designer
Krita
ArtRage
Vectr
game graphics tools  animation
----------------------------------------------------------------------

Game Audio Tools
Wwise
FMOD
Fabric
Spatial Workstation (3DCeption)
Miles Sound System
Nuendo
Bfxr https://www.bfxr.net/
DAW (Digital Audio Workstation) Tools
Adobe Audition
KOMPLETE https://www.native-instruments.com/en/products/komplete/
Audacity https://www.audacityteam.org/
Cubase https://www.steinberg.net/cubase/
REAPER https://www.reaper.fm
GarageBand https://www.apple.com/lae/mac/garageband/
SONAR https://www.cakewalk.com/products/SONAR/
Pro Tools https://www.avid.com/pro-tools
----------------------------------------------------------------------
https://hub.packtpub.com/10-best-graphics-and-rendering-tools-game-developers/

https://wiki.freepascal.org/Choosing_a_Game_Engine

11 tools to get you started making video games
----------------------------------------------------------------------

delphi Direct3D 9 Material HLSL 反射

 https://github.com/LUXOPHIA/MyAsset

 System.Types, System.Classes, System.Math.Vectors,

FMX.Types3D, FMX.Controls3D, FMX.MaterialSources,

 

MyModelMyMaterial の統合プロジェクト。

独自のシェーダをHLSLで記述することにより、フレネル反射による鏡面反射/屈折の表現と、法線マッピングによる凸凹表現を実現。RGB毎に異なる屈折率を設定することで、簡易な分散表現に対応できる他、屈折率を大きくすることで光の透過しない金属の質感も表現できる。

 

 https://docs.unrealengine.com/4.27/ja/RenderingAndGraphics/Materials/HowTo/Refraction/

  屈折率 すなわち IOR (Index of Refraction) は、光学単位であり、光がある媒質から別の媒質に伝搬するときにどの程度曲がるかを正確に表します。 この光の現象は測定可能であるため、こうした光学単位

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2021年11月25日 星期四

delphi啟動外部程式執行結束 啟動外部程式 Winexec ShellExecute

 delphi啟動外部程式執行結束 啟動外部程式 Winexec ShellExecute 

Winapi.ShellAPI Winapi.Windows

 ShellExecute CreateProcess  ShellExecuteEx WaitForSingleObject

delphi shellexecuteex SW_SHOWNORMAL

 TShellExecuteInfo  

 WaitForSingleObject(ShExecInfo.hProcess,INFINITE); 

GetExitCodeProcess(ExecInfo.hProcess,ExitCode);

 createprocessasuser 

https://www.codeproject.com/Articles/19165/Vista-UAC-The-Definitive-Guide

Link_Create()
Link_CreateAsUser()
Link_CreateWithLogon()
Link_CreateWithToken()
Link_Destroy()
Link_CreateProcessA()
Link_CreateProcessW()
Link_ShellExecuteExA()
Link_ShellExecuteExW()
Link_ShellExecuteA()
Link_ShellExecuteW()
Link_LoadLibraryA()
Link_LoadLibraryW()
Link_SendData()
Link_GetData()
Link_SendFinalize()

CreateProcessElevatedA()
CreateProcessElevatedW()
CreateProcessAsUserElevatedA()
CreateProcessAsUserElevatedW()
CreateProcessWithLogonElevatedW()
CreateProcessWithTokenElevatedW()
SH_RegCreateKeyExElevatedA()
SH_RegCreateKeyExElevatedW()
SH_RegOpenKeyExElevatedA()
SH_RegOpenKeyExElevatedW()
SH_RegCloseKeyElevated()
ShellExecuteElevatedA()
ShellExecuteElevatedW()
ShellExecuteExElevatedA()
ShellExecuteExElevatedW()

Requesting Administrative Rights Requested Elevation Levels Elevation 

https://www.codeproject.com/Questions/182599/How-to-Run-a-Process-As-Admin

https://stackoverflow.com/questions/11586139/how-to-run-application-which-requires-admin-rights-from-one-that-doesnt-have-th

restful json datasnap scalable multi-tier frameworks delphi

  NetHTTP TNetHTTPClient  TNetHTTPRequest
 REST TRESTClient TRESTRequest TRESTResponse TRESTResponseDataSetAdapter
 Indy IdHTTP IdSSLOpenSSL
 JavaScript jQuery(Mobile Http DOM Ajax JavaScript RESTful REST web service API  
 DataSnap REST server HTML5 client
 
 REST Services TRESTClient TRESTRequest TRESTResponse components
 System.DateUtils,System.SyncObjs, System.Math,
 System. Generics.Collections,
 System.Rtti, System.Bindings.Outputs,
 System.JSON,
 System.JSON.Builders, System.JSON.Readers,
  FMX.Types, FMX.Forms, FMX.Dialogs, FMX.Layouts,
  FMX.Objects, FMX.ListBox, FMX.Ani, FMX.Gestures, FMX.StdCtrls,
  FMX.DateTimeCtrls, FMX.Graphics,
  FMX.Media, FMX.ScrollBox, FMX.Memo, FMX.Calendar, FMX.Edit,
  FMX.Controls, FMX.Controls.Presentation,
  FMX.TreeView, FMX.TabControl,
 
  REST.Utils,
  REST.Types,
  REST.Client,
  REST.Response.Adapter,
  REST.Authenticator.Simple,
  REST.Authenticator.Basic,
  REST.Authenticator.OAuth, IPPeerClient, Data.Bind.Components;

https://www.embarcadero.com/cn/free-tools/rest-debugger/free-download




2021年11月21日 星期日

Streaming restoring components DFM panel stream savetofile delphi

https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Classes.TReader

InsertComponent RegisterClasses ObjectTextToBinary 

ReadComponent WriteComponent 

VclRtl

ReadComponentRes  
WriteComponentRes  

    TFileStream  – 處理文件。
    TStringStream - 內存中的字符串操作。
    TMemoryStream - 使用內存緩衝區。
    TWinSocketStream - 通過套接字連接讀取和寫入。
    TOleStream - 使用 COM 接口進行讀寫。
TBufferedFileStream
TMemoryStream 是一種在動態內存中存儲數據的流。
TWinSocketStream 是一個流,它為應用程序提供讀寫套接字連接的服務。
TOleStream 通過 OLE 對象提供的流接口來讀寫信息。TActiveXControl


System.BlockWrite - RAD Studio API Documentation
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Structured_Types_(Delphi)
Standard Routines and Input-Output
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Standard_Routines_and_Input-Output

System.TTextRec
https://docwiki.embarcadero.com/Libraries/Sydney/en/System.TTextRec

System.SysUtils.TSearchRec
Using the Eof and Bof Properties
System.TFileRec - RAD Studio API Documentation

System.Net.Mime.TMultipartFormData Form data encoded as a MIME multipart message following the HTML 4 standard.
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_an_HTTP_Client
https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Net.Mime.TMultipartFormData

delphi ObjectTextToBinary ComponentToString
ObjectBinaryToText ObjectTextToBinary ObjectResourceToText ObjectTextToResource ReadResHeader
ComponentToString (Delphi) - RAD Studio Code Examples
System.Classes.ObjectTextToBinary - Embarcadero DocWiki
TObjectTextEncoding


var  
  m : TMemoryStream;  
  f : TFileStream;  
  begin  
  f := TFileStream.Create('c:\testdfm.abnt',fmOpenRead);  
  m := TMemoryStream.Create;  
  try  
    ObjectTextToBinary(f,m);  
    m.Position := 0;  
    dxRibbon1.Free;  
    form2.DestroyComponents;  
    m.ReadComponent(self);  
    dxRecalculateNonClientPart(Handle);  
  finally  
    m.Free;  
    f.Free;  
  end;  
end; 
    BinStream:TMemoryStream;

    StrStream: TStringStream;
 
    BinStream := TMemoryStream.Create;

      StrStream := TStringStream.Create(s);
        BinStream.WriteComponent(組件);

        BinStream.Seek(0, soFromBeginning);

        ObjectBinaryToText(BinStream, StrStream);

        StrStream.Seek(0, soFromBeginning);

        結果:= StrStream.DataString;

        StrStream.Free;
      BinStream.Free

  function StringToComponentProc(Value: string): TComponent;

    StrStream: TStringStream;

    BinStream:TMemoryStream;

    StrStream := TStringStream.Create(Value);

      BinStream := TMemoryStream.Create;

        ObjectTextToBinary(StrStream, BinStream);

        BinStream.Seek(0, soFromBeginning);

        結果:= BinStream.ReadComponent(nil);

    Memo1.Text:= ComponentToStringProc(ScrollBar1);

    ScrollBar1.Free;

    ScrollBar1:= (StringToComponentProc(Memo1.Text) as TMyScrollBar);

    ScrollBar1.Parent:= Form1;

    ScrollBar1.Visible:= TRUE;
 
  程序 TForm1.FormCreate(Sender: TObject);

    ScrollBar1:= TMyScrollBar.Create(Form1);

    ScrollBar1.Parent:= Form1;

    ScrollBar1.Visible:= TRUE;

    ScrollBar1.Top:= 48;

    ScrollBar1.Left:= 250;

    ScrollBar1.Name:= 'Ricksbar';
 

  https://flylib.com/books/en/2.37.1/core_library_classes.html

ClientDataSet BLOB Binary Large Object TBlobField

 ClientDataSet  BLOB Binary Large Object   TBlobField

uses IOUtils, MMSystem;

  MediaPath, Path: string;

  with ClientDataSet1 do begin

    FieldDefs.Add('WavFileName', ftString, 32);

    FieldDefs.Add('WAV', ftBlob);

    CreateDataSet;
 
  MediaPath := GetEnvironmentVariable('SystemRoot') + '\Media\';

  for Path in TDirectory.GetFiles(MediaPath, '*.wav') do

    ClientDataSet1.Append;

    ClientDataSet1['WavFileName'] := ExtractFileName(Path);

    TBlobField(ClientDataSet1.FieldByName('WAV')).LoadFromFile(Path);

  ClientDataSet1.MergeChangeLog;
 
  BlobStream: TClientBlobStream;

  BlobField: TBlobField;

  BlobField := ClientDataSet1.FieldByName('WAV') as TBlobField;

  BlobStream := TClientBlobStream.Create(BlobField, bmRead);

  Win32Check(PlaySound(BlobStream.Memory, 0, SND_SYNC or SND_MEMORY));

  BlobStream.Free;

 

    01.DataSetProvider.Options.poPropogateChanges:=True;  
    02.procedure TForm1.DataSetProvider1AfterUpdateRecord(Sender: TObject;  
    03.SourceDS: TDataSet; DeltaDS: TCustomClientDataSet;  
    04.UpdateKind: TUpdateKind);  
    05.begin  
    06.//DstId TADODataset  
     07.//FId self-growth fields  
    08.if   UpdateKind=ukInsert then  
    09.    begin  
    10.       DstId.CommandText:='select @@Identity as FId ';  
    11.       DstId.Open;  
    12.       DeltaDS.FieldByName('FId').ReadOnly:=False;  
    13.       DeltaDS.FieldByName('FId').NewValue:=DstId.FieldByName('FId').AsInteger ;  
    14.       DstId.Close;  
    15.   end;  
    16.end;  
01.procedure TProducts.DataSetProvider1BeforeUpdateRecord(Sender: TObject;  
02.SourceDS: TDataSet; DeltaDS: TCustomClientDataSet;  
03.UpdateKind: TUpdateKind; var Applied: Boolean);  
04.begin  
05.//DstProduct from the table Name  
 06.//CategoryID from the associated field of the table for the word from the segment by a primary table  
 07.// qryIdentity is TADOQuery qryIdentity.SQL: = 'select @@ identity'  
08.if (UpdateKind = ukInsert) and  
09.(SourceDS = DstProduct) and  
10.(DeltaDS.FieldByName('CategoryID').Value = Unassigned)   ) then  
11.begin  
12.    if DeltaDS.BOF then  
13.    begin  
14.      qryIdentity.Close;  
15.      qryIdentity.Open;  
16.    end;  
17.    DeltaDS.FieldByName('CategoryID').NewValue := qryIdentity.Fields[0].Value;  
18.end;  
19.end;  
 

2021年11月18日 星期四

delphi GLibWMI MiTeC WMI Delphi Code Creator robvanderwoude wmigen Windows Management Instrumentation

 
delphi GLibWMI  MiTeC  WMI Delphi Code Creator robvanderwoude wmigen
Windows Management Instrumentation

https://www.delphipraxis.net/1351685-post14.html
(*  SysUtils, ActiveX, ComObj, Variants;  *)
  Winapi.Windows,
  System.SysUtils,
  Winapi.ActiveX,
  System.Win.ComObj,
  System.Variants;
 
const
  WbemUser ='';
  WbemPassword ='';
  WbemComputer ='localhost';
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject : OLEVariant;
  oEnum : IEnumvariant;
  iValue : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService := FSWbemLocator.ConnectServer(WbemComputer, 'root\CIMV2', WbemUser, WbemPassword);
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM CIM_PhysicalMemory','WQL',wbemFlagForwardOnly);
  oEnum := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  while oEnum.Next(1, FWbemObject, iValue) = 0 do

https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/WmiSdk/using-wmi.md

https://github.com/RRUZ/delphi-dev-shell-tools
https://theroadtodelphi.wordpress.com/
https://github.com/RRUZ/wmi-delphi-code-creator
https://github.com/mandiant/flare-wmi

PJConsoleApp.pas
http://delphidabbler.com/software/consoleapp.html

https://searchcode.com/codesearch/view/11776132/
/Sources/WorkstationScanning/WMI/WbemScripting_TLB.pas

03_通常使うプリンタの変更  -  WMI を OleVariant 型で扱う
http://mrxray.on.coocan.jp/Delphi/plSamples/017_ChangeDefaultPrinter.htm

https://www.manning.com/books/powershell-and-wmi

https://github.com/daharper/WmiExample

https://github.com/pyscripter/Pcre-Jit-Delphi

 https://www.magsys.co.uk/delphi/magwmi.asp

 WMISet   NTSet  TMTShare

 

 https://docs.microsoft.com/zh-tw/windows/win32/api/lmshare/nf-lmshare-netshareenum?redirectedfrom=MSDN

 https://docs.microsoft.com/en-us/previous-versions//t9zt39at(v=vs.85)?redirectedfrom=MSDN

 

NTSet (Delphi 7) - Download

NTSet (Delphi 7), free and safe download. NTSet (Delphi 7) latest version: Delphi/C++ Builder components for a direct access to Windows NT/2000 featur.

Components > System > System. Torry's Delphi Pages

WmiSet Component Collection: TWmiQuery executes queries against WMI service. Use it to retrieve almost any computer configuration information. For example: " ...

 

Delphi EmbeddedWB WebBrowser interpreter

  FIREFOX Mozilla firefox en Gecko runtimes delphi

 Universal Component Library UWP controls

JS electron-builder

 https://github.com/electron-userland/electron-builder

 

Delphi-EmbeddedWB 

https://github.com/ghquant/Delphi-EmbeddedWB

https://sourceforge.net/projects/embeddedwb/

 

How to call Delphi code from scripts running in a TWebBrowser

http://www.delphidabbler.com/articles/article-22

DELPHI WEB BROWSER BASED Cross-Platform

New VCL TEdgeBrowser Component Coming RAD Studio 10.4 Microsoft Edge WebView2

2021年11月17日 星期三

delphi DIB embarcadero delphi graphics TBitmap Vcl.Graphics.GetDIB Device Independent Bitmaps BitBlt CreateCompatibleDC SelectObject CreateCompatib GetMapMode CreateCompatibleBitmap CreateDIBSection

  BitBlt CreateCompatibleDC SelectObject CreateCompatib GetMapMode  CreateCompatibleBitmap CreateDIBSection

Drawing Transparent Bitmaps

http://delphi.cjcsoft.net//viewthread.php?tid=45232

Title: Drawing Transparent Bitmaps

Question: How to draw a transparent bitmap
 
   hdcTemp := CreateCompatibleDC(dc);
   SelectObject(hdcTemp, hBmp);   // Select the bitmap

   GetObject(hBmp, sizeof(BITMAP), @bm);
   ptSize.x := bm.bmWidth;            // Get width of bitmap
   ptSize.y := bm.bmHeight;           // Get height of bitmap
   DPtoLP(hdcTemp, ptSize, 1);        // Convert from device
                                      // to logical points

   // Create some DCs to hold temporary data.
   hdcBack   := CreateCompatibleDC(dc);
   hdcObject := CreateCompatibleDC(dc);
   hdcMem    := CreateCompatibleDC(dc);
   hdcSave   := CreateCompatibleDC(dc);

   // Create a bitmap for each DC. DCs are required for a number of
   // GDI functions.

   // Monochrome DC
   bmAndBack   := CreateBitmap(ptSize.x, ptSize.y, 1, 1, nil);

   // Monochrome DC
   bmAndObject := CreateBitmap(ptSize.x, ptSize.y, 1, 1, nil);

   bmAndMem    := CreateCompatibleBitmap(dc, ptSize.x, ptSize.y);
   bmSave      := CreateCompatibleBitmap(dc, ptSize.x, ptSize.y);

   // Each DC must select a bitmap object to store pixel data.
   bmBackOld   := SelectObject(hdcBack, bmAndBack);
   bmObjectOld := SelectObject(hdcObject, bmAndObject);
   bmMemOld    := SelectObject(hdcMem, bmAndMem);
   bmSaveOld   := SelectObject(hdcSave, bmSave);

   // Set proper mapping mode.
   SetMapMode(hdcTemp, GetMapMode(dc));

https://programmerall.com/article/6686314819/

    Add('SRCCOPY    ');
    Add('SRCPAINT   ');
    Add('SRCAND     ');
    Add('SRCINVERT  ');
    Add('SRCERASE   ');
    Add('NOTSRCCOPY ');
    Add('NOTSRCERASE');
    Add('MERGECOPY  ');
    Add('MERGEPAINT ');
    Add('PATCOPY    ');
    Add('PATPAINT   ');
    Add('PATINVERT  ');
    Add('DSTINVERT  ');
    Add('BLACKNESS  ');
    Add('WHITENESS  ');

delphi  DIB  embarcadero delphi graphics  TBitmap Vcl.Graphics.GetDIB Device Independent Bitmaps
  https://docs.microsoft.com/zh-tw/windows/win32/gdi/capturing-an-image

http://blog.livedoor.jp/junki560/archives/21910595.html

delphi Navigation Sidebar LIST MENU

 delphi Navigation Sidebar LIST MENU

Show and Hide Transient Content in Your VCL UI Using TSplitView and C++Builder


 TSplitView TCategoryButtons TButtonCategory  TButtonItem

TCategoryPanelGroup TCategoryPanel TCategoryButtons 

TActionMainMenuBar

JVCL's TJvNavigationPane TJvOutlookBar  TJvNavigationPane
 TreeViewToMenu
TSearchBox
TSplitView
TDockTabSet
TFlowPanel
TControlList


MS Ribbon Control  ActionManager

TreeControl Virtual Treeview VirtualTrees  STYLE

https://docs.microsoft.com/en-us/windows/win32/controls/tree-view-controls

Navigator Container
http://docplayer.net/77223250-Windows-controls-last-part.html


MVVM Delphi Architecting Building Model

 MVVM Delphi Architecting Building Model LiveData ViewModel

https://blog.grijjy.com/2018/01/22/mvvm-starter-kit-part-1-of-3/

MVVM Starter Kit (Part 1 of 3)

https://github.com/grijjy/GrijjyFoundation
https://github.com/grijjy/MvvmStarterKit
https://www.youtube.com/watch?v=Ci1HP8ZBJxk&ab_channel=EmbarcaderoTechnologies
http://www.malcolmgroves.com/blog/?p=1340
https://bitbucket.org/sglienke/dsharp/src/master/


https://blog.grijjy.com/2018/01/24/mvvm-starter-kit-part-2-of-3/

TDirect2DCanvas delphi source code game

Direct3D9.pas DirectInput.pas
DirectDraw.pas
DirectSound
DirectMusic, D2D1.pas
JEDI_Code_Library

Windows Media Format 9 API (WMF9.pas) Prodigy Math Game

Wincodec.pas (podpora TWICImage a tím i třeba Tiff, CR2 a NEF grafické formáty)
    cor.pas (.NET unmanaged compiler API - cor.h)
    OpenGL.pas
    Manipulations.pas - Manipulation SDK
 
    rtti.pas - nové Run Time Type Information
    IOUtils.pas - OOP přístup k souborům
    Diagnostics.pas - TStopWatch (někdy příště)

"RAD Studio\7.0\source\Win32\vcl\":

    Direct2D.pas Direct2D API z Windows 7 (Vista), tj. TDirect2DCanvas
    Gestures.pas, GestureMgr.pas, GestureCtrls.pas - Gestures
    Keyboard.pas, KeyboardTypes.pas - Klávesnice pro touch
https://delphi.cz/2010/02/default.aspx

https://windwings.wordpress.com/2009/08/13/rad-studio-2010-review-8-and-now-some-feedback-from-us/

https://delphi.cz/post/Graphics32-GR32.aspx

WinAnimationManager: Grid Layout  

IUIAnimationManager ID2D1Bitmap IUIAnimationVariable

http://teran.karelia.pro/articles/item_4425.html

IUIAnimationManager ID2D1Bitmap IUIAnimationVariable  Win Animation Manager

https://docs.microsoft.com/en-us/windows/win32/uianimation/-main-portal

https://fireblazefmx.wordpress.com/

http://www.bilsen.com/windowsanimation/

https://castle-engine.io/wp/2019/01/02/spritesheet-gui-utility/

https://github.com/valterb/spritesheet-utility

https://www.bverhue.nl/delphisvg/author/bverhue/

https://castle-engine.io/wp/

Delphi Games with Jim McKeeth

https://youtu.be/JiHFspGIpBk



2021年11月12日 星期五

Can Delphi insert Excel 2007/2010 table

 

1) Delphi has no support for any Excel natively. It is all done with hands-tuned OCX import, and you can make your own import any time you need it!

Delphi Menu: Component / Import COmpionent / Type Library / excel.exe

2) but if you talk about Delphi XE2 it containsthat hand-tuned c:\RAD Studio\9.0\OCX\Servers\pas2010\Excel2010.pas for you

And thus Delphi has 3 design-time packages for you:

  • c:\RAD Studio\9.0\bin\dcloffice2010160.bpl
  • c:\RAD Studio\9.0\bin\dcloffice2K160.bpl
  • c:\RAD Studio\9.0\bin\dclofficexp160.bpl

https://winsoft.sk/officecs.htm 

https://sourceforge.net/directory/?q=delphi%20excel%20components

https://torry.net/pages.php?id=551

Delphi Easy Excel 基礎類別設計http://grandruru.blogspot.com/2020/03/delphi-easy-excel.html

https://edn.embarcadero.com/article/40813

https://delphi.fandom.com/wiki/3rd_Party_Components

https://github.com/sergio-hcsoft/Delphi-SpreadSheets

Regex library for Delphi

 https://github.com/shukomiya/skregexp

 

shukomiya/skregexp: Regex library for Delphi 2005 later
https://github.com › shukomiya › skregexp
 
Regex library for Delphi 2005 later. Contribute to shukomiya/skregexp development by creating an account on GitHub.

SKRegExp Trainer

 "Delphi 2005 以降で利用可能な SkRegExp (小宮さん作  SkRegExp 

https://ht-deko.com/tech053.html#DFMCONV

PerlRegExp Trainer

 Delphi XE から標準搭載された TPerlRegEx

VBSRegExp Trainer

 VBScript の TRegExp (正規表現クラス) の練習ツールです。

RegularExpressions Trainer

  • SkRegExp / PerlRegEx / VBSscript / RegularExpressions (FMX) 版すべて同じアーカイブ内に入っています。
  • VBScript 版は、他の 2 つと同じような動作にするために場当たり的な手法を採っています。
    あまり参考にしないで下さい&ちゃんとした使い方は Mr.XRAY さんとこの記事 を参考にして下さい。
  • VBScript 版をコンパイルするためには、タイプライブラリの取り込み ("Microsoft VBScript Regular Expressions 5.5") が必要です。
  • SkRegExp / VBSscript 版は Delphi 2009 以降でコンパイルできると思います。
  • PerlRegEx 版は Delphi XE 以降ですが、TPerlRegEx を別途 DL すれば Delphi 2009 以降
  • RegularExpressions (FMX) SkRegularExpressions / RegularExpressions 
  • TPerlRegEx   DH 山本さんの記事 

 

正規表現トレーナソースコード

 

 

 

 

Excel Creator Ver3.0 ( アドバンスソフトウェア製 )

 http://mrxray.on.coocan.jp/Delphi/plXLSOut/index.htm 

Excel 出力コンポーネント  

Excel Creator Ver3.0 ( アドバンスソフトウェア製 )
ExcelCreator Ver3.0 は,ExcelCreator 2007 に収録されている製品

http://mrxray.on.coocan.jp/Delphi/plExcelEx/index.htm

エクセル操作フォームEx
 

Microsoft Office Document Imaging (MODI) OCR

 
Microsoft Office Document Imaging (MODI)  OCR
regsvr32.exe mdivwctl.dll,

MDIVWCTL.DLL is part of MS office 2003.

OCR MODI Library (MDIVWCTL.DLL) is freely available


regsvr32.exe "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\mdivwctl.dll"
OFFICE2007 Files\Common Files\Microsoft Shared\MODI\12.0 MDIVWCTL.dll
C:\Program Files\Common Files\Microsoft Shared\MODI\11.0, 21MB
Install MODI for use with Microsoft Office
https://support.microsoft.com/en-us/topic/install-modi-for-use-with-microsoft-office-2010-4fbd3076-6d01-9cb7-c574-3bbabc9eead9

Microsoft Office Document Imaging 11.0 Type Library

CreateObject("MODI.Document")    
miDoc.Images(0).OCR miLANG_CHINESE_SIMPLIFIED, True, True '
 strLayoutInfo = _

        "Language: " & modiLayout.Language & vbCrLf & _

        "Number of characters: " & modiLayout.NumChars & vbCrLf & _

        "Number of fonts: " & modiLayout.NumFonts & vbCrLf & _

        "Number of words: " & modiLayout.NumWords & vbCrLf & _

        "Beginning of text: " & Left(modiLayout.Text, 50) & vbCrLf & _

        "First word of text: " & modiLayout.Words(0).Text

    MsgBox strLayoutInfo, vbInformation + vbOKOnly, "Layout Information"

    Set modiLayout = Nothing

    Set miDoc = Nothing

uses ...
ComObj, MODI_TLB


doc := CreateOleObject('MODI.Document') as IDocument;
 
CoCreateInstance(CLASS_Document,
                 NIL,
                 CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER,
                 IDocument,
                 doc);

Var
  doc :IDocument;
  Img :IImage;
  Layout :ILayout;
begin
  doc := IDispatch(CreateOleObject('MODI.Document')) as IDocument;
  doc.create(FileName);  // just put here the filename of an image
  doc.OCR(miLANG_ENGLISH,true,true);
  Img := IDispatch(doc.Images[0]) as IImage;
  Layout := IDispatch(Img.Layout) as ILayout;
  Memo1.Lines.Add(Layout.Text);
  MiDocView1.Document := doc;
  doc.Close(false);
  Img := nil;
  Layout := nil;

    Screen.MousePointer = vbDefault


https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa202819(v=office.11)


try
        if CoCreateInstance(CLASS_Document,
                            NIL,
                            CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER,
                            IDocument,
                            fMODIdoc)<>S_OK then
          begin
            Application.MessageBox(sNoMODIDocIntf,sMODI,MB_OK+MB_ICONSTOP);
            Exit;
          end;
        fMODIdoc.Create(WideString(ImgName));
        try
          if ( xxxxx  ) then LangID:=miLANG_HUNGARIAN                                                               else LangID:=miLANG_ENGLISH;
          (fMODIdoc.Images[0] as IImage).OCR(LangID,FALSE,FALSE);
          for i:=0 to (fMODIdoc.Images[0] as IImage).Layout.Words.Count-1 do
            begin
              aWord:=(fMODIdoc.Images[0] as IImage).Layout.Words[i] as IWord;
              nRects:=aWord.Rects;
              for j:=0 to nRects.Count-1 do
                begin
                  aRect:=nRects.Item[j] as IMiRect;
                  if (p.X>=aRect.Left)   and
                     (p.X<=aRect.Right)  and
                     (p.Y>=aRect.Top)    and
                     (p.Y<=aRect.Bottom) then
                    begin
                      Result:=aWord.Text;
                      Exit;
                    end;
                end;
            end;
        finally
          fMODIdoc.Close(FALSE);
        end;
      except
      end;
var
 modi: olevariant;
 fname: TFileName;   //MDIVWCTL.DLL http://www.microsoft.com/ru-ru/download/confirmation.aspx?id=21581
 i: integer;
 s: string;
begin
 fname:= '1.tif';
 modi:= CreateOLEObject('MODI.Document');
 modi.Create(fname);

 modi.OCR();
 s:= '';
 for i:= 0 To modi.Images.Count - 1 do  
  s:= s+ modi.Images(i).Layout.Text;  
 showmessage(s);
 //showmessage(modi.images.item(0).layout.text);
 modi.close;
 modi:= UnAssigned;  
end;

https://social.msdn.microsoft.com/Forums/en-US/29093b50-1f09-4b5e-9f41-c0f4a540852f/using-modi-microsoft-office-document-imaging-how-to-get-images-and-table-in-text-file?forum=worddev


using MODI (Microsoft Office Document Imaging) how to get images and table in text file

MODI and OpenXML SDK

http://www.codeproject.com/KB/office/OCRSampleApplication.aspx

&

This sample project demonstrates how to export, delete and replace the images in a document by using Open XML SDK

http://code.msdn.microsoft.com/CSManipulateImagesInWordDoc-312da7ef

I hope this helps.
https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa167607(v=office.11)?redirectedfrom=MSDN
Using the Microsoft Office Document Imaging 2003 Object Model

// CCMD_OCRView.cpp : implementation of the CCCMD_OCRView class

// CCMD_OCRView.cpp : implementation of the CCCMD_OCRView class
//
#include "stdafx.h"
#include "CCMD_OCR.h"
#include "CCMD_OCRDoc.h"
#include "CCMD_OCRView.h"
#include "../class/global.h"//
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "mdivwctl.h"
enum MiLANGUAGES
{ miLANG_CHINESE_SIMPLIFIED = 2052,
  miLANG_CHINESE_TRADITIONAL = 1028,
  miLANG_CZECH = 5,
  miLANG_DANISH = 6,
  miLANG_DUTCH = 19,
  miLANG_ENGLISH = 9,
  miLANG_FINNISH = 11,
  miLANG_FRENCH = 12,
  miLANG_GERMAN = 7,
  miLANG_GREEK = 8,
  miLANG_HUNGARIAN = 14,
  miLANG_ITALIAN = 16,
  miLANG_JAPANESE = 17,
  miLANG_KOREAN = 18,
  miLANG_NORWEGIAN = 20,
  miLANG_POLISH = 21,
  miLANG_PORTUGUESE = 22,
  miLANG_RUSSIAN = 25,
  miLANG_SPANISH = 10,
  miLANG_SWEDISH = 29,
  miLANG_SYSDEFAULT = 2048,
  miLANG_TURKISH = 31
};
enum MiFILE_FORMAT
{ miFILE_FORMAT_DEFAULTVALUE = -1,
  miFILE_FORMAT_TIFF = 1,
  miFILE_FORMAT_TIFF_LOSSLESS = 2,
  miFILE_FORMAT_MDI = 4
};
enum MiCOMP_LEVEL
{ miCOMP_LEVEL_LOW = 0,
  miCOMP_LEVEL_MEDIUM = 1,
  miCOMP_LEVEL_HIGH = 2
};
/////////////////////////////////////////////////////////////////////////////
// CCCMD_OCRView

IMPLEMENT_DYNCREATE(CCCMD_OCRView, CFormView)

BEGIN_MESSAGE_MAP(CCCMD_OCRView, CFormView)
    //{{AFX_MSG_MAP(CCCMD_OCRView)
    ON_WM_PAINT()
    ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
    ON_LBN_SELCHANGE(IDC_LIST1, OnSelchangeList1)
    ON_COMMAND(ID_FILE_NEW, OnFileNew)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()


2021年11月11日 星期四

“delphi how t o declare function” Code Answer

 interface

type
  TNodeFunction = function(AInput: String): String;

implementation

function Func1(AInput: String): String;
begin
   result := AInput;
end;

function Func2(AInput: String): String;
begin
   result := 'Fooled You';
end;

function Func3(AInput: String): String;
begin
   result := UpperCase(AInput);
end;

procedure Demonstration;
var
  SomeFunc, SomeOtherFunc: TNodeFunction;
begin

     SomeOtherFunc = Func3;

     SomeFunc := Func1;
     SomeFunc('Hello');   // returns 'Hello'
     SomeFunc := Func2;
     SomeFunc('Hello');   // returns 'Fooled You'

     SomeOtherFunc('lower case'); // returns 'LOWER CASE'

end;

get current method's name

 

JclDebug.pas

function FileByLevel(const Level: Integer = 0): string;
function ModuleByLevel(const Level: Integer = 0): string;
function ProcByLevel(const Level: Integer = 0): string;
function LineByLevel(const Level: Integer = 0): Integer;

GetEIP

 

uses System.Classes, System.SysUtils, System.Rtti;
 
procedure GetEIP(); stdcall;
 
function GetCurrentFuncName(const frm: TObject): string;
implementation
 
var
g_CurrentFuncEIP: NativeUInt;
 
procedure GetEIP(); stdcall;
asm
{$IFDEF WIN32}
POP EAX;
MOV g_CurrentFuncEIP,EAX;
PUSH EAX;
{$ELSE}
POP RAX;
MOV g_CurrentFuncEIP,RAX;
PUSH RAX;
{$ENDIF}
end;
 
function cmpint(List: TStringList; Index1, Index2: Integer): Integer;
begin
Index1 := StrToIntDef(List[Index1], 0);
Index2 := StrToIntDef(List[Index2], 0);
Result := Index1 - Index2;
end;
 
function CheckEIP(const intEIP: Cardinal; const frm: TObject): string;
type
PMethodInfo = ^TMethodInfo;
TMethodInfo = record
strAddress: ShortString;
strFunName: ShortString;
end;
var
rc      : TRttiContext;
rt      : TRttiType;
rm      : TRttiMethod;
sl      : TStringList;
pmi     : PMethodInfo;
intIndex: Integer;
III     : Integer;
begin
rc := TRttiContext.Create;
sl := TStringList.Create;
try
sl.Sorted := False;
rt        := rc.GetType(frm.ClassInfo);
for rm in rt.GetMethods do
begin
pmi             := AllocMem(SizeOf(TMethodInfo));
pmi^.strAddress := ShortString(Format('%d', [Cardinal(rm.CodeAddress)]));
pmi^.strFunName := ShortString(Format('%s', [rm.ToString]));
sl.AddObject(String(pmi.strAddress), TObject(pmi));
end;
{ 加到列表中 }
sl.Append(IntToStr(intEIP));
{ 按整數排序 }
sl.CustomSort(cmpint);
{ 檢索剛加入的在什麼位置 }
intIndex := sl.IndexOf(IntToStr(intEIP));
{ 返回函式名稱 }
if intIndex = 0 then
Result := string(PMethodInfo(sl.Objects[intIndex   1])^.strFunName)
else
Result := string(PMethodInfo(sl.Objects[intIndex - 1])^.strFunName);
{ 釋放記憶體 }
for III := 0 to sl.Count - 1 do
begin
FreeMem(PMethodInfo(sl.Objects[III]));
end;
finally
sl.Free;
rc.Free;
end;
end;
 
function GetCurrentFuncName(const frm: TObject): string;
begin
Result := CheckEIP(g_CurrentFuncEIP, frm);
end;
end.

呼叫方法:

uses untGetFuncName;

procedure TForm1.btn1Click(Sender: TObject);
begin
  GetEIP;
  btn1.Caption := GetCurrentFuncName(Self);

end;

2021年11月10日 星期三

DELPHI 官網 範例

DELPHI  官網 範例
Complete List of Delphi Code Examples From Docwiki

 
https://capecodgunny.blogspot.com/2013/07/complete-list-of-delphi-code-examples.html