lazarus

How to deploy Python to Windows users?

瘦欲@ 提交于 2019-12-03 18:57:37
问题 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

MessageBox中文乱码解决方法

匿名 (未验证) 提交于 2019-12-03 00:09:02
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)编码

lazarus Textout中文字符串乱码

匿名 (未验证) 提交于 2019-12-03 00:09:02
https://wenda.so.com/q/1560151974218812 lazarus Textout中文字符串乱码 5 ȡnmlgb 10级分类: 编程开发 被浏览146次2019.06.10 检举 我用Textout在窗口输出 '你好'系统却显示其它字体,求懂内行的帅哥美女指教一下,这是我的代码 TextOutA(hdcb,100,100,'你好',4);显示的却是图片上的字 满意答案 whoami1978 来自团队: 快乐助人 乐帮达人 因为lazarus 缺省常量是utf8的,你要先转成unicode,最简单的方法是 TextOutw(h,100,100,pwchar(utf8decode('你好')),4); 但后面可能有尾巴,你可以先转成数组再输出 来源:博客园 作者: 旷野轻尘一个人 链接:https://www.cnblogs.com/delphi-xe5/p/11555931.html

Drawing on a paintbox - How to keep up with mouse movements without delay?

亡梦爱人 提交于 2019-12-02 15:39:07
问题 I decided to have a little go myself at making a map editor for a simple RPG game. The map will allow drawing tiles at 32x32 into the map, nothing too fancy, but to give an idea: I am using Lazarus again but this applies to Delphi as well. Now the problem I am facing is when drawing tiles, if the mouse is moved rather quickly then tiles are not been drawn and I think this is something to do with not been able to process the Mouse X,Y coordinates quick enough. To give an idea, look at the

Call procedures from different forms

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 04:59:06
I am using Lazarus and I have a form called TForm1 and the unit name's Unit 1. Inside here I have a procedure called mergeDATfile(a:shortint); that makes some stuff. By the way I had to create another form called TForm2 and inside this I have button (Button1). When it is pressed, it must call mergeDATfile(a:shortint); from the 1st form. How could I do it? The obvious solution is to move the MergeDatFile function into a common unit which can then be used by both form units. I am assuming that the method is a method of TForm1 because it operates on the members of TForm1 . In which case you would

How to create a component property that lists other components?

风流意气都作罢 提交于 2019-12-02 02:25:40
问题 The SynEdit component has the property "Highlighter", which contains a dropdown-list in which all the currently existant Highlighters are listed (design-time). To me this seems like a very important concept for design-time components, but I'm simply unable to find out how it works: Let's assume you drop down a TSynEdit and a TSynPasSyn onto your form. Then you click the TSynedit which has the property Highlighter. You are now able to select the previously created TSynPasSyn. If you create

How to create a component property that lists other components?

浪尽此生 提交于 2019-12-02 00:29:28
The SynEdit component has the property "Highlighter", which contains a dropdown-list in which all the currently existant Highlighters are listed (design-time). To me this seems like a very important concept for design-time components, but I'm simply unable to find out how it works: Let's assume you drop down a TSynEdit and a TSynPasSyn onto your form. Then you click the TSynedit which has the property Highlighter. You are now able to select the previously created TSynPasSyn. If you create another TSynPasSyn, it will be added to this list too. My question: Which is the best way to do such a

Setting a DBGrid column format in Delphi

时间秒杀一切 提交于 2019-12-01 17:39:27
I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid. Someone knows how? Germán Estévez -Neftalí- You can set the DisplayFormat of the Field You can handle OnGetText event. This approach allows to do more complex operations with the value. If you don't add the fields to field Editor list you can get the formating by code as : TFloatField(MyQuery.fieldByName('MyField').DisplayFormat := '0.00'; if you don't want to show the zeros replace '0.00' with '#.##'; The first port of call is the

Setting a DBGrid column format in Delphi

最后都变了- 提交于 2019-12-01 17:29:19
问题 I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid. Someone knows how? 回答1: You can set the DisplayFormat of the Field You can handle OnGetText event. This approach allows to do more complex operations with the value. 回答2: If you don't add the fields to field Editor list you can get the formating by code as : TFloatField(MyQuery.fieldByName('MyField').DisplayFormat := '0.00'; if you don

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

孤街浪徒 提交于 2019-12-01 16:35:10
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 what I am trying to achive (what is shown in this screenshot is by another software product). So pulling a