delphi 中如何用memo显示16进制数字 大家好,我想将edit中的数字在memo中用16进制显示,该如何做?谢谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Edit1: TEdit; Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begin memo1.text := '$'+IntToHex(StrToInt(Edit1.Text),2 );end;end. var I: Integer;begin I := 10; Memo1.Lines.Add(IntToHex(i, 16));end; 问一个比较少见的 关于上下标存储的问题 没有见过的问题 请问如何在edit中保证输入只能是数字? 当tabsheet太多时怎样让pageControl分多行显示,而出现个箭头让用户点,就象菜单控件一样 一个简单的问题,100分,马上结贴。 要显示一个jpg图片,需要改变其长宽比例,比如从2:1到1:1,大小无限制,该怎么做? 有关WORD文件的打开,,, 总有一些怪事!!? 求救!关于循环引用的问题! 如何在默认的popupmenu上附加自己的menuitem? char 中的转换疑惑,紧急求助! 如何在memo中显示16进制数字
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.text := '$'+IntToHex(StrToInt(Edit1.Text),2 );
end;end.
var
I: Integer;
begin
I := 10;
Memo1.Lines.Add(IntToHex(i, 16));
end;