Delphi

Resize problem using AcroPDF in Delphi

拜拜、爱过 提交于 2020-01-06 04:27:09
问题 I successfully added AcroPDF in my application. When a PDF needs to be displayed I create an instance of AcroPDF dynamically and insert it into a TPanel with align set to alClient. My problem is that when the Form/Panel is resized the AcroPDF does not follow. Only if a new file is loaded. I tried several solutions to no avail. What should I do? 回答1: It's a problem with recent versions of the Adobe OCX control, which you can work around by refocusing the control. In a preview dialog I have

Delphi TActionMainMenu Accelerators on Secondary Form

北城余情 提交于 2020-01-06 04:20:09
问题 I am working with Delphi XE7 in Windows 10. I have a TMainMenuBar on both a primary form and a modal secondary form. The problem is that the accelerator keys on the secondary form do not activate the menu if the secondary form also contains a TMemo. For example, if the secondary form has a File menu, Alt+F does not open the file menu. However, if alt is pressed and released, "File" is highlighted and "F" is underlined and pressing F will open the menu. Note that the problem disappears if the

Non-english text size too small in windows 7

て烟熏妆下的殇ゞ 提交于 2020-01-06 04:01:09
问题 I am trying to display the current date in Nepali language. I have declared constant string for the caption. It renders the text pretty fine on windows 8.1 but the same text is displayed too small in windows 7. Adjusting the font size also doesn't help much as it should. Things I tried Installed Nepali language pack for windows 7 Installed several Unicode fonts like arial unicode ms, segoe ui, microsoft neo gothic and others The source code has been saved as UTF-8 encoding But the problem

Error on TIdHTTP on Setting Host and Port at Runtime for SMS web service delivery

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-06 03:43:05
问题 I am trying to use an SMS API for Delphi from http://www.human.com.br but I get an 'access violation' error when the component tries to set the host and port of the webservice after creating an instance of Indy's TIdHTTP . host := TidHTTP.Create; host.Socket.Port := 80; // error right here! host.Socket.Host := 'system.human.com.br'; uri := TidURI.Create(); The original component was created in Indy60 and I have Indy170, so the was no Socket between host and Port and I had to put it. What is

System command executes but is immediately backgrounded

末鹿安然 提交于 2020-01-06 03:32:05
问题 I'm attempting to use the TProcess unit to execute ssh to connect to one of my servers and provide me with the shell. It's a rewrite of one I had in Ruby as the execution time for Ruby is very slow. When I run my Process.Execute function, I am presented with the shell but it is immediately backgrounded. Running pgrep ssh reveals that it is running but I have no access to it whatsoever, using fg does not bring it back. The code is as follows for this segment: if HasOption('c', 'connect') then

Why does my application using OmniThreadLibrary Parallel.Pipeline continue remain running in the background after being closed?

谁都会走 提交于 2020-01-06 03:31:07
问题 I'm using OmniThreadLibrary to implement a background pipleline for sending emails (refer to this SO question). I notice that after closing the application, it continues running in the background (seen in Windows Task Manager). That means that there is something wrong in my code in the way I implemented the OTL pipeline. Can you help me identify the trouble? Code follows: unit uEmailQueue; interface uses Classes, OtlCommon, OtlCollections, OtlParallel, Windows; type TEmailServer = record

list all files from a directory in a string grid with delphi

三世轮回 提交于 2020-01-06 02:59:10
问题 I am working with Delphi 7 and I would like to list all the files in a given directory in a string grid (one file per row and all in 1 column). I have searched for about an hour now and cannot find any examples on how to do this so any help you can provide would be appreciated. 回答1: This will fill a TStrings descendant (eg., TStringList , TMemo.Lihes , and so forth) with all of the files in a specified folder: function GetFiles(const StartDir: String; const List: TStrings): Boolean; var SRec:

TButton with transparent PNG image and glowing hover effect

烈酒焚心 提交于 2020-01-06 02:57:11
问题 I'm using Delphi XE and trying to update an old Delphi codebase. The software was originally developed with Delphi 7 and used a hacked version of TPNGButton written by Jonathan Hosking in 2001. TPNGButton had a support for transparency and glowing hover effect. Unfortunately when the project was ported on Delphi XE, all the images were stretched to fill the area of the whole button. I'm trying to create a similar kind of button with TButton but I'm hitting a wall. I created a new test project

How To Read and Write Delphi 2010 RibbonApplicationMenuBar Recent Items To A File

∥☆過路亽.° 提交于 2020-01-06 02:51:30
问题 How do you read and write RibbonApplicationMenuBar recent items to a file or an INI file? The help file is not very helpful for getting at the list of recent item strings to save and reload the recent items. I can add items to the recent items list by Ribbon1.AddRecentItem( APathFilename) and open the file associated with the recent item with the RecentItemClick event but I can not figure out how to save and reload recent filenames to the recent items list. 回答1: The TRibbonApplicationMenuBar

Delphi - multiple remote com objects

梦想与她 提交于 2020-01-06 01:58:49
问题 My D5 application is on a server being used remotely by a couple of users, so I need use the following function to create a COM object to launch another application (LmPos) installed back on that users PC upon launch: CreateRemoteComObject(const MachineName: WideString; const ClassID: TGUID): IUnknown; rather than creating a local COM object as before: EposServer := CreateOLEObject('POS.Server'); However, the MachineName and ClassID to connect to will depend on which users is launching this