张志峰的博客

水滴石川,积少成多。

导航

上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 120 下一页

2016年5月30日

摘要: Delphi可以通过创建开机启动项键值的方法,将程序添加到开机启动项中。通过本实例代码就可以为您的程序添加到快速启动中,随着Windows一起启动,开机即运行的程序。该实例代码简单,主要是通过添加注册表键值来实现。具体的功能代码如下所示:unit dy97;interfaceuses Windows 阅读全文

posted @ 2016-05-30 17:17 ╰★张志峰★╮ 阅读(648) 评论(0) 推荐(0)

摘要: 这是个困惑我很长时间的问题,到今天终于得到解决了。 话说Delphi有个很强的窗体设计器,这一点让VC粉丝垂涎三尺而不可得。但是,Delphi里设计的窗体并没有自动适应屏幕分辨率的属性,也就是说,软件设计时调整完美的窗体控件布局,在不同屏幕分辨率的机器上运行时可能会变得面目全非。控件之间会相互移位, 阅读全文

posted @ 2016-05-30 16:29 ╰★张志峰★╮ 阅读(1297) 评论(0) 推荐(1)

摘要: 给你一段代码,网上转的:unit uMyClassHelpers;//实现窗体自适应调整尺寸以适应不同屏幕分辩率的显示问题。// 陈小斌,2012年3月5日interfaceUses SysUtils,Windows,Classes,Graphics, Controls,Forms,Dialogs, 阅读全文

posted @ 2016-05-30 15:31 ╰★张志峰★╮ 阅读(2367) 评论(0) 推荐(1)

2016年5月27日

摘要: 1.RGB转换为Tcolor function RGBToColor(R,G,B: byte): Tcolor;begin Result := B Shl 16 or G shl 8 or R;end; 2.Tcolor转换为RGB proceudre Tform1.Button1Clink(Sen 阅读全文

posted @ 2016-05-27 14:44 ╰★张志峰★╮ 阅读(543) 评论(0) 推荐(0)

2016年5月25日

摘要: var b: Byte; s: string;begin s := '31'; //16进制字符串 b := StrToInt('$' + s);end; 不过要注意一点,如果在程序调试时想看b的值,看到的将会是10进制的值 阅读全文

posted @ 2016-05-25 15:07 ╰★张志峰★╮ 阅读(1204) 评论(0) 推荐(0)

摘要: //数据异或校验function BytesXor(buffer:array of byte):Integer;var i:integer;begin Result:=$0; for i:=Low(buffer) to High(buffer) do begin result:=result xor 阅读全文

posted @ 2016-05-25 13:56 ╰★张志峰★╮ 阅读(2758) 评论(0) 推荐(0)

摘要: delphi 按位运算 not and or xor shl shr delphi 按位运算 not and or xor shl shr unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graph 阅读全文

posted @ 2016-05-25 10:58 ╰★张志峰★╮ 阅读(3018) 评论(0) 推荐(0)

摘要: 求用delphi编写的LRC校验位算法函数,急!!! 某命令串为":010200000001FC" 其16进制为“3A 30 31 30 32 30 30 30 30 30 30 30 31 46 43 0D 0A”。其中第一个为起始符,2-13为数据,14-15即“FC”为LRC校验码,有人能写一 阅读全文

posted @ 2016-05-25 10:52 ╰★张志峰★╮ 阅读(1008) 评论(0) 推荐(0)

摘要: 如何把一个整数转化为3个十六进制字节 delphi比如把整数149259(都是6位数据整型数) 转换为十六进制为2470B然后再分开为三个字节02 47 0B,求实现代码示例var ID: Integer; ByteBuf: array[0..2] of Byte;begin ID := 14925 阅读全文

posted @ 2016-05-25 09:49 ╰★张志峰★╮ 阅读(558) 评论(0) 推荐(0)

2016年5月18日

摘要: var S:String; P:PChar; B:array of Byte;begin S:='Hello'; SetLength(B,Length(S)+1); P:=PChar(S); CopyMemory(B,P,Length(S)+1); ShowMessage(Char(B[0]));e 阅读全文

posted @ 2016-05-18 15:01 ╰★张志峰★╮ 阅读(3627) 评论(0) 推荐(0)

上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 120 下一页