lazarus

How to call a list of the physically attached hard disks using Free Pascal, or, failing that, Delphi?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 14:29:45
问题 Further to this question and this one that I asked more recently but without the correct specifics...and lastly this one that I asked at the Free Pascal forum specifically.... Can anyone provide me with guidance, examples or a link to something somewhere that explains how to call a list of the physically attached hard disks using Free Pascal, or, failing that, Delphi, regardless of whether the disks have been mounted by the operating system or not? An example is shown in the screenshot of

Lazarus: How to list all the available network connection on a system?

泪湿孤枕 提交于 2019-12-01 09:37:32
I am writing a program on a Linux system using Lazarus IDE. The program is supposed to connect to the Internet or Intranet. So, I want to display to the user list of all the available network connections that they can use to connect to the Internet or Intranet like wifi, if there are two active network cards on the system, then this program should display their available connections. At the moment, I don't know where to start or what tool(s) to use. Any hints, clues or advice will be greatly appreciated. You can use ifconfig to list all available network interfaces and their status. Edit: For

get pointer of member function delphi

拈花ヽ惹草 提交于 2019-12-01 00:21:19
Is there some trick how to get pointer of a member function in Lazarus / delphi? I have this code which won't compile.... Error is in Delphi: variable required in Lazarus: Error: Incompatible types: got "<procedure variable type of function(Byte):LongInt of object;StdCall>" expected "Pointer" The code: TClassA = class public function ImportantFunc(AParameter: byte): integer; stdcall; end; TClassB = class public ObjectA: TClassA; ImportantPtr: pointer; procedure WorkerFunc; end; function TClassA.ImportantFunc(AParameter: byte): integer; stdcall; begin // some important stuff end; procedure

get pointer of member function delphi

梦想的初衷 提交于 2019-11-30 18:38:20
问题 Is there some trick how to get pointer of a member function in Lazarus / delphi? I have this code which won't compile.... Error is in Delphi: variable required in Lazarus: Error: Incompatible types: got "<procedure variable type of function(Byte):LongInt of object;StdCall>" expected "Pointer" The code: TClassA = class public function ImportantFunc(AParameter: byte): integer; stdcall; end; TClassB = class public ObjectA: TClassA; ImportantPtr: pointer; procedure WorkerFunc; end; function

How Is Syntax Highlighting Built?

雨燕双飞 提交于 2019-11-30 16:45:47
I'm now building a developers editor using Lazarus and as every good developers editor, it needs to have a syntax highlighting, because of this that I want to know some things: How is syntax highlight normally built(using many if s to change the font on a TextField ? TSynEdit is very nice to do this? How to use TSynEdit (links and resources)? You can actually see an excellent example for yourself if you look at the editor for SharpDevelop . It's implemented in C# but uses great OOP that should be readily portable to other platforms or languages. Most home-brewed syntax highlighters tend to use

Delphi TFrame Create/Destroy

空扰寡人 提交于 2019-11-30 10:04:18
How to create (when I want to show it) and destroy (when I want to hide it) frames on the main TForm? Frames' align = alClient. I tried this: The form: unit main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, uFrame1, uFrame2; type TFormMain = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } f1: TFrame1; f2: TFrame2; end; var FormMain: TFormMain; implementation {$R *.dfm} procedure TFormMain.FormCreate(Sender: TObject); begin f1 := TFrame1.Create(Self); f1.Parent :=

MessageBox中文乱码解决方法

ε祈祈猫儿з 提交于 2019-11-30 03:57:27
procedure TForm1.Button1Click(Sender: TObject); var ad:widechar; s:LPCSTR; s2:string; begin s2:='s多少付' ; // s:= pchar(CP936ToUTF8(s2)); s:=pchar( UTF8ToCP936(s2)); showmessage(s); MessageBox(0,PChar(UTF8ToAnsi('正常显示中文')),'1',MB_OK or MB_ICONEXCLAMATION); MessageBox(0,s,'1',0); end; https://blog.csdn.net/poolord/article/details/77488704 在Lazarus中对字符串进行代码页转换 2017年08月22日 22:29:26 池龙 阅读数 885 更多 分类专栏: Delphi / Lazarus 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接: https://blog.csdn.net/poolord/article/details/77488704 由于Lazarus基于UTF-8,因此当读写Windows建立的纯文本文件的时候,由于其中的中文使用GBK(CP936)编码

How to deploy Python to Windows users?

时光毁灭记忆、已成空白 提交于 2019-11-30 03:09:12
I'm soon to launch a beta app and this have the option to create custom integration scripts on Python . The app will target Mac OS X and Windows, and my problem is with Windows where Python normally is not present. My actual aproach is silently run the Python 2.6 install. However I face the problem that is not activated by default and the path is not set when use the command line options . And I fear that if Python is installed before and I upgrade to a new version this could break something else... So, I wonder how this can be done cleanly. Is it OK if I copy the whole Python 2.6 directory,

Xcode 5.0 Error installing command line tools

老子叫甜甜 提交于 2019-11-30 01:48:11
I just downloaded the last version for Xcode (5.0) and need it develop some Pascal codes on Lazarus. However, the installation requires me to use command line tools, which have a problem downloading. When I click install, the program sends me this error message: "Failed to install 'Command Line Tolls' An unknown error occurred. Please try again later." I have also tried using other IDEs, like lightweight, but they all require Free Pascal, which is the tool that needs command line tools. Does anyone know what the problem is? Thanks in advance :) zaph Xcode 5.1 and OSX 10.9. xcode-select -

How Is Syntax Highlighting Built?

陌路散爱 提交于 2019-11-30 00:13:30
问题 I'm now building a developers editor using Lazarus and as every good developers editor, it needs to have a syntax highlighting, because of this that I want to know some things: How is syntax highlight normally built(using many if s to change the font on a TextField ? TSynEdit is very nice to do this? How to use TSynEdit (links and resources)? 回答1: You can actually see an excellent example for yourself if you look at the editor for SharpDevelop. It's implemented in C# but uses great OOP that