delphi-xe7

How to get the list of running processes including full file path?

北城以北 提交于 2020-05-13 13:34:11
问题 I use the JCL function JclSysInfo.RunningProcessesList to get the list of running processes. However, many of the returned processes consist only of the exe file names, while others contain the whole file path, for example: dopus.exe C:\Program Files\Listary\Listary.exe C:\Program Files (x86)\Direct Folders\df.exe Everything.exe etc... The code: uses ..., JclSysInfo; procedure GetRunningProcesses; var RunningProcesses: TStringList; begin RunningProcesses := TStringList.Create; try if

How to get(extract)/set parameters from URL?

萝らか妹 提交于 2020-04-17 07:18:40
问题 I have URL like this (for example): https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=delphi+url+parameters+ I need to get/set value of parameter by name ("sourceid", "ion", ...). How can i do this? Delphi has TIdURI class, it helps to parse URL but not parameters, it returns all parameters as single string (property Params). Of course i can create my own parser but it is so basic functionality, there should be some standard way (i hope). I surprised that TIdURI

How to get(extract)/set parameters from URL?

放肆的年华 提交于 2020-04-17 07:18:08
问题 I have URL like this (for example): https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=delphi+url+parameters+ I need to get/set value of parameter by name ("sourceid", "ion", ...). How can i do this? Delphi has TIdURI class, it helps to parse URL but not parameters, it returns all parameters as single string (property Params). Of course i can create my own parser but it is so basic functionality, there should be some standard way (i hope). I surprised that TIdURI

Connect via Bluetooth with Delphi XE7 using portable printer

戏子无情 提交于 2020-03-17 06:51:46
问题 I'm trying to communicate with a Sewoo LK-P32 printer via Bluetooth. For this, I am using Delphi XE7 . I made a few examples that come with Delphi and am not having success. I put the paired printer on tablet and even then I am not able to print continuously. When I print something have to restart the application, so I can print something again. Below my sources. Could someone help me? Support on this issue? My time is short to try other technologies. Method that initiates communication with

Warning on comparing a SmallInt with result of Ord function

陌路散爱 提交于 2020-02-15 04:42:40
问题 I'm comparing a SmallInt variable with the result of the Ord function. Example: var MySmallInt : SmallInt; begin MySmallInt := 5; if(MySmallInt > Ord('C')) then ShowMessage('True') else ShowMessage('False'); end After doing this, the following warning message is shown (W1023): W1023 Comparing signed and unsigned types - widened both operands Delphi's hint on the Ord function says that it should return a SmallInt and that's why I can't understand what causes the warning message. (I've looked

Warning on comparing a SmallInt with result of Ord function

末鹿安然 提交于 2020-02-15 04:39:38
问题 I'm comparing a SmallInt variable with the result of the Ord function. Example: var MySmallInt : SmallInt; begin MySmallInt := 5; if(MySmallInt > Ord('C')) then ShowMessage('True') else ShowMessage('False'); end After doing this, the following warning message is shown (W1023): W1023 Comparing signed and unsigned types - widened both operands Delphi's hint on the Ord function says that it should return a SmallInt and that's why I can't understand what causes the warning message. (I've looked

How to get the current project name in Delphi directories settings?

不打扰是莪最后的温柔 提交于 2020-02-02 14:53:26
问题 In the project directory settings, I often need to use the project name, say 'MyProject' , as part of the output paths. I would prefer to avoid hardcoding the project name in the settings. Is there a variable, like $(Config) and $(Platform) , to dynamically obtain the current project name (without extension)? 回答1: You can use $(SanitizedProjectName) for this purpose. Be aware that the debugger might not support that. 来源: https://stackoverflow.com/questions/58461383/how-to-get-the-current

How to get the current project name in Delphi directories settings?

社会主义新天地 提交于 2020-02-02 14:50:50
问题 In the project directory settings, I often need to use the project name, say 'MyProject' , as part of the output paths. I would prefer to avoid hardcoding the project name in the settings. Is there a variable, like $(Config) and $(Platform) , to dynamically obtain the current project name (without extension)? 回答1: You can use $(SanitizedProjectName) for this purpose. Be aware that the debugger might not support that. 来源: https://stackoverflow.com/questions/58461383/how-to-get-the-current

How to use generics as a replacement for a bunch of overloaded methods working with different types?

久未见 提交于 2020-02-02 07:36:44
问题 I have a bunch of overloaded methods, all of them get an array of some type as a parameter and return a random value from that array: function GetRandomValueFromArray(Arr: array of String): String; overload; begin Result := Arr[Low(Arr) + Random(High(Arr) + 1)]; end; function GetRandomValueFromArray(Arr: array of Integer): Integer; overload; begin Result := Arr[Low(Arr) + Random(High(Arr) + 1)]; end; etc. How can I use generics to create a single method for array of any type? Something like

form:Transparent, Control on form:non Transparent?

∥☆過路亽.° 提交于 2020-01-23 02:43:29
问题 How can change alphablend of a form without affect on control in form? Delphi XE7 回答1: One solution to this problem is to use Multi-Device Application (if using VCL is not possible). If you need to leave a transparent TForm just changing a property Transparency = True . If you need to leave a semi-transparent component, all components have the Opacity property that can be assigned a more transparent value between 0 and 1, where 0 is closer to that component. For example you could put the