delphi-7

Method called on thread using Synchronize does not return without moving the mouse

帅比萌擦擦* 提交于 2021-02-08 12:16:37
问题 I have a unit and form which uses a worker thread to query a database. After each query is executed a method is called using Synchronize to update the UI. It seems that whenever a call to the methods using Synchronize() is made, the process stops until I shake the mouse or interact with the keyboard. Below is the basics of what I am doing. This example is complete other than that I did not provide a database connection or queries for a real database- I am hoping it will be enough to see the

Method called on thread using Synchronize does not return without moving the mouse

孤街浪徒 提交于 2021-02-08 12:14:42
问题 I have a unit and form which uses a worker thread to query a database. After each query is executed a method is called using Synchronize to update the UI. It seems that whenever a call to the methods using Synchronize() is made, the process stops until I shake the mouse or interact with the keyboard. Below is the basics of what I am doing. This example is complete other than that I did not provide a database connection or queries for a real database- I am hoping it will be enough to see the

HTTP Authorization in SOAP delphi

时光毁灭记忆、已成空白 提交于 2021-02-08 10:52:39
问题 I am trying to send a request to web service, this is the WSDL: http://www.smsmelli.com/class/sms/webservice/server.php?wsdl after long researching I underestand untyped array should replace with array of array of string; till here, it solved, but I realize my SOAP doesn't work properly. I check PHP action that works exactly same, then I find it sets Credential in Authentication in the header of HTTP from SOAP; in WireShark: -HyperText Transfer Protocol --Authorization: Basic Y3LIZ577838sdf=

Delphi assembler constant 'eof'

孤者浪人 提交于 2021-02-07 05:37:25
问题 There seems to be an undocumented constant eof in asm block context. This was tested using Delphi 7. program TestEof; {$APPTYPE CONSOLE} var example : Integer; begin asm mov example, eof end; writeln(example); readln; end. This prints out 14 . Where does that constant eof and it's value value $0E or 14 come from? EDIT: this is the compilation result ... call @InitExe // mov example, eof mov [example], $0000000e // writeln(example) mov eax, [$004040a4] mov edx, [example] call @Write0Long call

How to get instance of TForm from a Handle?

时光毁灭记忆、已成空白 提交于 2021-02-07 02:59:43
问题 I'm converting some functions into a DLL which relate to Windows 7 functionality. I can't pass a TForm through DLL, so I need to pass its handle instead. except, once I have that handle on the other side, how do I reconstruct it back into a TForm instance? Also, what's the appropriate way to pass the handle (HWND) through a Delphi DLL to be compatible to call from C# for example? If not possible, then I at least need to know how to change the color of a window using windows API only, no

delphi - strip out all non standard text characers from string

此生再无相见时 提交于 2021-02-06 15:28:40
问题 I need to strip out all non standard text characers from a string. I need remove all non ascii and control characters (except line feeds/carriage returns). 回答1: Something like this should do: // For those who need a disclaimer: // This code is meant as a sample to show you how the basic check for non-ASCII characters goes // It will give low performance with long strings that are called often. // Use a TStringBuilder, or SetLength & Integer loop index to optimize. // If you need really

delphi - strip out all non standard text characers from string

五迷三道 提交于 2021-02-06 15:28:36
问题 I need to strip out all non standard text characers from a string. I need remove all non ascii and control characters (except line feeds/carriage returns). 回答1: Something like this should do: // For those who need a disclaimer: // This code is meant as a sample to show you how the basic check for non-ASCII characters goes // It will give low performance with long strings that are called often. // Use a TStringBuilder, or SetLength & Integer loop index to optimize. // If you need really

delphi - strip out all non standard text characers from string

两盒软妹~` 提交于 2021-02-06 15:27:28
问题 I need to strip out all non standard text characers from a string. I need remove all non ascii and control characters (except line feeds/carriage returns). 回答1: Something like this should do: // For those who need a disclaimer: // This code is meant as a sample to show you how the basic check for non-ASCII characters goes // It will give low performance with long strings that are called often. // Use a TStringBuilder, or SetLength & Integer loop index to optimize. // If you need really

delphi - strip out all non standard text characers from string

浪子不回头ぞ 提交于 2021-02-06 15:26:59
问题 I need to strip out all non standard text characers from a string. I need remove all non ascii and control characters (except line feeds/carriage returns). 回答1: Something like this should do: // For those who need a disclaimer: // This code is meant as a sample to show you how the basic check for non-ASCII characters goes // It will give low performance with long strings that are called often. // Use a TStringBuilder, or SetLength & Integer loop index to optimize. // If you need really

How to Schedule a task programmatically

荒凉一梦 提交于 2021-02-06 04:42:38
问题 How can I schedule a task using delphi 7 like Google updater? I'm not using the registry because it gets detected by Kaspersky antivirus as a false alarm. Anything I add in the registry as a start-up item gets detected as a trojan so I decided to use task schedule 回答1: The following piece of code shows how to delete and create the task which will run the application at system startup with system privileges. It uses the following command line: However the Task Scheduler since Windows Vista