Thursday, March 19, 2020

Japanese Clothing and Fashion essays

Japanese Clothing and Fashion essays Traditional clothing of the Edo period, (1600-1868), included the kimono and obi as we know them today. The obi did not, however, become a prominent part of a womans ensemble until the mid Edo period. It was then that designers, weavers and dyers all focused their talent on creating a longer, wider and more elaborate obi. Obi measurement was then standardised to 360cm long by 30cm wide. Edo fashion was influenced by the design and style that courtesans and entertainers wear. Women of the samurai class continued to wear the simpler kosode kimono, tied together with an obi made of braided cords. Outside the samurai class, women experimented with a more elaborate kimono - the furisode, which is often seen on the Kabuki stage. Characterised by long, flowing sleeves, the furisode kimono was accented by a large, loosely tied obi. For many years, the obi bow was tied either at the front or on the side. By the mid-Edo period, the obi bow was tied in the back position. It was said that this style started in the mid-1700s when a Kabuki actor, imitating a young girl, came on stage with his obi tied in the back. Another reason that the back position became more acceptable was that the sheer bulk of the wider obi became too cumbersome to be positioned in the front of the kimono. The Meiji era, (1868-1912) witnessed a revolution in the textile industry with the advent of electric weaving looms and chemical dying techniques from the West. During this time, a woman's kimono ceased to be worn in the free-flowing style of the earlier days. The new fashion was to tuck the kimono at the waist to adjust the length of the kimono to the woman's height. These tucks and folds were visible and became part of the art of tying the obi. The vast majority of obi produced in Japan today comes from a district in Kyoto known as Nishijin. Nishijin has been the centre of the Japanese textile industry since the 15th century. Nishijin is renowned for it...

Monday, March 2, 2020

DLL and ActiveX Controls From a Delphi Application

DLL and ActiveX Controls From a Delphi Application A popular feature of Delphi  is the project deployment of an application with an executable file (exe).   However, if the DLL or ActiveX controls in your project are not registered on the users’ machines, an â€Å"EOleSysError† will be displayed in response to running the exe file.  To avoid this, use the regsvr32.exe command-line tool. RegSvr32.exe Command Manually using regsvr32.exe (Windows.Start - Run) will register and unregister self-registerable   DLL and ActiveX controls on a system. Regsvr32.exe instructs the system to attempt to load the component and call its DLLSelfRegister function. If this attempt is successful, Regsvr32.exe displays a dialog indicating success. RegSvr32.exe has the following command-line options:   Regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname /s - Silent; display no message boxes /u - Unregister server /i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall /n - do not call DllRegisterServer; this option must  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   be used with /i   Call RegSvr32.exe Within Delphi code To call the regsvr32 tool within Delphi code, use the â€Å"RegisterOCX† function to execute a file and wait for the execution to finish. This is how the RegisterOCX procedure could look: procedure RegisterOCX; type TRegFunc function : HResult; stdcall; var ARegFunc : TRegFunc; aHandle : THandle; ocxPath : string; begin try ocxPath : ExtractFilePath(Application.ExeName) Flash.ocx; aHandle : LoadLibrary(PChar(ocxPath)); if aHandle 0 then begin ARegFunc : GetProcAddress(aHandle,DllRegisterServer); if Assigned(ARegFunc) then begin ExecAndWait(regsvr32,/s ocxPath); end; FreeLibrary(aHandle); end; except ShowMessage(Format(Unable to register %s, [ocxPath])); end; end; Note: the ocxPath variable points to the Flash.ocx Macromedia OCX. To be able to register itself, an OCX must implement the DllRegisterServer function to create registry entries for all the classes inside the control. Do not worry about the DllRegisterServer function, just make sure it is there. For the sake of simplicity, it is presumed that the OCX is located in the same folder as where the application is. The ExecAndWait line in the above code calls the regsvr32 tool by passing the /s switch along with the full path to the OCX. The function is ExecAndWait. uses shellapi; ... function ExecAndWait(const ExecuteFile, ParamString : string): boolean; var SEInfo: TShellExecuteInfo; ExitCode: DWORD; begin FillChar(SEInfo, SizeOf(SEInfo), 0); SEInfo.cbSize : SizeOf(TShellExecuteInfo); with SEInfo do begin fMask : SEE_MASK_NOCLOSEPROCESS; Wnd : Application.Handle; lpFile : PChar(ExecuteFile); lpParameters : PChar(ParamString); nShow : SW_HIDE; end; if ShellExecuteEx(SEInfo) then begin repeat Application.ProcessMessages; GetExitCodeProcess(SEInfo.hProcess, ExitCode); until (ExitCode STILL_ACTIVE) or Application.Terminated; Result:True; end else Result:False; end; The ExecAndWait function uses the ShellExecuteEx API call to execute a file on a system. For more examples of executing any file from Delphi, check out how to execute and run applications and files from Delphi code. Flash.ocx Inside Delphi Exe If there is a need to register an ActiveX control on ​the user’s machine, then make sure the user has the OCX the program requires by placing the entire ActiveX (or DLL) inside the application’s exe as a resource. When the OCX is stored inside the exe, it is easy to extract, save to disk, and call the RegisterOCX procedure.