Delphi

Proper use of IdUDPClient.ReceiveBuffer

我怕爱的太早我们不能终老 提交于 2020-01-14 06:47:08
问题 Thank you for your help. I am converting an older version of Delphi to XE5 and I am getting stuck with the Indy compnent. Need to use IdUDPClient.ReceiveBuffer Here is my code: while not Terminated do begin try lenUDP:= IdUDPClient.ReceiveBuffer(myBuf, buffLength, -1 ); if lenUDP<> 0 then Synchronize(ReceivedLine); except Terminate; end; end; where, myBuf = packed array [0 .. buffLength -1] of char; All help is greatly appreciated. Thank you, Mike 回答1: As I told you in comments to your

DelphiTwain how to show form setting

天大地大妈咪最大 提交于 2020-01-14 06:36:08
问题 I'm using Delphitwain (delphitwain.sourceforge.net) to add scan functionality to my app. Everything was fine, when i click scan button on my app it will show scan mode with scanner's Properties such as Page Size, Scanning Side (canon dr-3010c) and there is a Scan button and Cancel button. If i click cancel of course all the properties back to it's value before. How can I show this Scanner's Properties only to change properties without Scan, since i can do scan without showing properties Twain

Is there any way I can load a image in to text file in Delphi [closed]

前提是你 提交于 2020-01-14 06:04:10
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I have a Image and i want to upload this image in a text file.is there any way I can do it using Delphi. Consider the image is a Barcode image and i want this image to be there at a particular location in the

How to edit an IBAN number in four character groups?

主宰稳场 提交于 2020-01-14 05:32:07
问题 https://en.wikipedia.org/wiki/International_Bank_Account_Number#Practicalities The IBAN should not contain spaces when transmitted electronically: when printed it is expressed in groups of four characters separated by a single space, the last group being of variable length as shown in the example below: A typical IBAN looks like this: GR16 0110 1250 0000 0001 2300 695 (taken from the above link). I want to make it easier for users to enter IBAN numbers. Currently I use a TDBEdit to display

Delphi工程文件(*.dpr)组成

放肆的年华 提交于 2020-01-14 04:45:35
一个典型的Delphi工程文件组成 如下: 1,命令行程式 2,窗口程式 3,动态库 组成部分为:程序头、[uses]、主程序块。 1. 程序头 project 程序名 library 动态库名 2. [uses] 主程序块中使用到的.pas文件的名称必需列在uses,如窗口程式。 3. 主程序块 用 begin 与 end 所包围起的一段代码. PS :项目文件中的 全局标识符 必须声明于begin 之前 来源: CSDN 作者: 木生火 链接: https://blog.csdn.net/msh2016/article/details/103745845

Delphi - Making asynchronous calls to WinRT API using TTask.Future

丶灬走出姿态 提交于 2020-01-14 04:23:10
问题 Related to this question, I am trying to implement a procedure that uses the WinRT API to set the desktop wallpaper. To mimic the await functionality in C#, I am using TTask.Future (link) as outlined here and here. My implementation looks like this: class procedure TUtilityWin.SetWallpaper(AFileName: String); var lStorageFile: IStorageFile; liao_storagefile: IAsyncOperation_1__IStorageFile; lFutureTask: IFuture<IAsyncOperation_1__IStorageFile>; begin //WinRT Implementation if TUserProfile

How to listen to microphone and detect sound loudness in Delphi 7

杀马特。学长 韩版系。学妹 提交于 2020-01-14 04:17:26
问题 I need a program to catch an event when microphone input gets louder than certain threshold value. So probably I need to constantly listen to mic, and somehow measure sound amplitude? Is it possible to do that in Delphi 7? 回答1: I recommend you to look AudioLab 回答2: I recommend you to use the BASS Audio Library http://www.un4seen.com/bass.html BASS is an audio library .. to provide developers with powerful stream (MP3.. OGG.. ) functions. All in a tiny DLL, under 100KB in size. it's very easy

I'm getting Chinese Text when using Windows 10 pipes in Delphi. How do I make it in English?

北战南征 提交于 2020-01-14 03:39:06
问题 I'm getting Chinese Text when using Windows 10 pipes in trying to read and write to the command prompt in Delphi. How do I make it in English? The information from Communicate With Command Prompt Through Delphi is outdated for Delphi 10.3 and I had to modify a few variables to meet the compiler's wants. Changed a few integers to cardinals, etc. It's just outputting gibberish! Here is the code for the component I'm trying to create based on the above link: unit gtCommandPrompt; interface uses

How can I assign a .NET 4 WinForm application to the owner property of a Delphi 7 form?

孤街浪徒 提交于 2020-01-14 03:10:28
问题 I need to assign a .NET 4 Winform application as the owner of a Delphi 7 form. I have created a .dll in Delphi which contains the form. The Delphi .dll exports methods to create and display the form. I have successfully loaded the Delphi .dll in my .NET app, and displayed the form. Now I need to be able to assign the .NET app (or main form of the .NET app) as the owner of the Delphi form. I have previously created a Delphi app that interops to .NET through COM, and assigns the Delphi app as

How can I assign a .NET 4 WinForm application to the owner property of a Delphi 7 form?

痴心易碎 提交于 2020-01-14 03:10:05
问题 I need to assign a .NET 4 Winform application as the owner of a Delphi 7 form. I have created a .dll in Delphi which contains the form. The Delphi .dll exports methods to create and display the form. I have successfully loaded the Delphi .dll in my .NET app, and displayed the form. Now I need to be able to assign the .NET app (or main form of the .NET app) as the owner of the Delphi form. I have previously created a Delphi app that interops to .NET through COM, and assigns the Delphi app as