delphi

阅读 / 问答 / 标签

请问, delphi 如何获取internet时间?

  设计步骤如下:  1、 新建一个工程;  2、 在窗体上放一个TEdit控件和一个TClientSocket(在Internet页下)控件。TEdit用来显示取得的格林尼治时间转化成北京时间后的时间,TClientSocket用来从Internet 时间服务器获取标准的格林尼治时间;  3、 程序代码如下:  procedure TForm1.FormCreate(Sender: TObject);  begin  ClientSocket1.Host :=tick.usno.navy.mil; // 海军天文台;  ClientSocket1.Port :=13;  ClientSocket1.Open;  end;  procedure TForm1.ClientSocket1Read(Sender: TObject;  Socket: TCustomWinSocket);  var  TempTime: TDateTime;  hh,mm,ss,ms: word;  sTime : string;  begin  sTime := Socket.ReceiveText; // 取得格林尼治时间;  sTime:=Copy(sTime,12,8); // 取得时间部分;

delphi Terminated需要加载什么单元

将要欲创建的控件,放在窗体上,选中控件,按F1,帮助中会显示要引用的单元,如 Button1,选择它,按F1,帮助中会显示要引用的单元是QStdCtrls;再如 BitBtn1,选择它,按F1,帮助中会显示要引用的单元是QStdCtrls等等。这样我们就能知道要引用那个单元,再在程序中动态创建控件.

Delphi 中的 Gauge 在哪里?

samples下

delphi中窗体的大小固定问题,描述如下

delphi中 有IntToStr ,有没有长整型、Ddword型转

delphi 组件属性详解 记得以前有一个小工具 鼠标移动到组件上能自动查看delphi组件的作用 求工具

Delphi 组件参考大全.!下这个电子书看一下吧!

简单介绍Delphi中form的borderstyle属性分别表示什么?

BorderStyle:=bsNone;//无标题栏BorderStyle:=bsDialog;//对话框窗体,即标题栏中只有关闭按钮,没有最小化和最大化;BorderStyle:=bsSizeable;//可改变大小的窗体,有最大化,最小化,关闭按钮。BorderStyle:=bsSizeToolWin;//工具栏式窗体,可改变窗体大小,标题栏中只有关闭按钮,没有最小化和最大化;BorderStyle:=bsToolWin;//工具栏式窗体,不可改变窗体大小,标题栏中只有关闭按钮,没有最小化和最大化;;自己设置一下,运行后看看效果。

delphi 怎么从一个tstrings对象中读取一个字符串添加到另一个tstrings对象中

assign搞定

delphi ftp下载文件问题

什么问题?

Delphi idtcpserver/client 用法是什么?

服务端发送:variFileHandle:integer;iFileLen,cnt:integer;buf:array[0..4096] of byte;=======================================================客户端接收:procedure TForm1.Button1Click(Sender: TObject);varrbyte:array[0..4096] of byte;sFile:TFileStream;iFileSize:integer;IdTCPClient1.ReadBuffer(rbyte,iFileSize);// .ReadBuffer(rbyte,iLen);sFile.Write(rByte,iFileSize);sFile.Free;ShowMessage("file get ok!");end;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

delphi 如何把任意类型的文件以16进制读取出来?

下面的程序是将文件读出以16进制写进文本文件varsfile:file;dfile:Textfile;byteread,i:integer;buffer:arrayofbyte;beginifopendialog1.Executethenassignfile(sfile,opendialog1.FileName)elseabort;ifsavedialog1.Executethenassignfile(dfile,savedialog1.FileName)elseabort;tryreset(sfile,1);rewrite(dfile);repeatblockread(sfile,buffer,sizeof(buffer),byteread);ifbyteread>0thenbeginfori1tobytereaddobeginwrite(dfile,format("%0.2x",));write(dfile,"");end;writeln(dfile,"");end;untilbyteread=0;finallyclosefile(sfile);closefile(dfile);end;

一个文本文件用delphi程序怎么把它清空

以写的方式(rewrite())打开它,在关闭(close())即可。

delphi语言简单删除txt中第一行 程序

//将数据先读入内存然后重新写入文件就可以了;//文件比较大建议用拷贝文件方式;//procedure TForm1.Button1Click(Sender: TObject);var f: TextFile; sfile:TStrings; filename,s:string; i:Integer; begin filename:="需要处理问题"; if FileExists(filename) then begin sfile:=TStringList.Create; AssignFile(f,filename); Reset(f); while not Eoln(f) do begin Readln(f,s); sfile.Add(s); end; Rewrite(f); for i := 1 to sfile.Count-1 do begin writeln(f,sfile.Strings[i]); end; CloseFile(f); sfile.Free; end; end;

delphi 动态连接mdb

给你个动态连接的例子,其中ado是打开对话框控件 ,adocon是tadoconnection控件函数描述:通过按钮打开的对话框 选择你要连接的数据库,并与数据库建立连接.procedure TForm1.Button2Click(Sender: TObject);var acname:string; //连接数据库 str:string; sfile,sfilename:string;begin adocon.Connected:=false; acname:=ExtractFileDir(Application.ExeName)+"db";//连接数据库, ado.InitialDir:=acname; if ado.Execute then begin sfile:=ado.FileName; sfilename:=dqc.File_GetFileName(sfile); sfilename:=acname+sfilename; adocon.ConnectionString:="Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=""dqc"";Data Source="+sfilename+";Persist Security Info=False"; adocon.Connected:=true; mtip.Lines.Add("连接本地数据库成功"); end else abort;end;

delphi中如何实现数字大小写转换.不要人民币金额转换的.

const S1="壹"; S2="贰"; S3="叁"; S4="肆";var Str: String; i: integer;begin Str:="1234"; edit1.Text:=str; for i:=1 to length(str) do case Str[i] of "1": label1.Caption:=S1; "2": label2.Caption:=S2; "3": label3.Caption:=S3; "4": label4.Caption:=S4; end;怎么没悬赏分的。

在Delphi中建立和使用别名[1]

  通常我们在Delphi外 通过使用Borland 数据库引擎(BDE)的设置单元(bdecfg exe)来建立和设置别名(Alias) 但是 实际上用户可以在Delphi或应用程序中用TDatabaseComponent或其他方法建立和使用别名 而不必在IDAPI CFG中预先定义   建立有效的别名是非常重要的 别名详细说明了数据库的定位信息和连接数据库服务器的参数 当发布应 用程序时不必担心IDAPI CFG中是否有某项设置    利用TDatabaseComponent建立别名   建立和设置一 个使用标准数据库的别名的步骤如下 //通过 对象观察器 建立BDE别名    建立一个新工程(Project)    将组件(Component)TDatabase TTable TDataSource TDBGrid 和TButton放在FORM上    双击TDatabaseComponent或在TDatabase快速菜 单上选择DatabaseEditor运行Database属性编辑器    将DatabaseName设置成 ZldchAlias 这个名字 将被当作别名 用来设置数据集组件TTable TQuery TStoredProc等的DatabaseName属性    将DriverName设置成STANDARD    单击Defaults按钮 将PATH=自动加在Parameter Overrides框中    将PATH=设置成PATH=C: 单击OK按钮关闭Database Editor    单击OK按钮关闭DatabaseEditor    将TTable的DatabaseName属性设置成 ZldchAlias    将TDataSource的DataSet属性设置成 Table    将DBGrid的DataSource属性设置成 DataSource    在Tbutton的OnClick事件过程中加入下列代码 procedureTForm Button Click(Sender:Tobject); beginTable Tablename= customer ; Table Active:=true; end;    运行程序  上面 ~ 步也可以用以下过程实现 MyAddStandAlias(AliasN:String;DbLocat:String;DriverN:string );//使用程序的方法建立BDE别名//{AliasN别名名 //DbLocat数据库定位目录 DriverN联结驱动类型}beginwithForm Database do< beginDatabaseName:=AliasN;DriverName:= STANDARD ;Params Clear;Params Add( PATH= +DbLocat);Params Add( DEFAULT DRIVER= +DriverN);endend procedureTForm Button Click(Sender:Tobject);beginMyAddStandAlias( ZldchAlias C:PARADOX );Table DatabaseName:= ZldchAlias ;DataSource DataSet:=Table ;DBGrid DataSource:=DataSource ;Table Tablename= customer ;Table Active:=true;end; lishixinzhi/Article/program/Delphi/201311/24816

Delphi7关于declaration expected but if found

if 上面一行没有加begin最后一行没有end。所以你这按钮点击过程是有语法错误的

delphi自己做了一个类,然后constructor Create;怎么来调用这个函数

var a:TAClass;a:=TAClass.create;最后记得a.free

delphi 高分请教!如何将TXT文件转换成BMP文件??

把文本中得内容读出来,然后按照一定得格式绘制在bmp上varbmp:TBitmap;beginbmp:=TBitmap.Create;bmp.Width?bmp.Height?iLine0;whilenoteof(f)dobeginReadLn(f,sLine);bmp.Canvas.TextOut(0,iLine,sLine);Inc(iLine,20);//行距为20向素end;end;

Delphi的DataSource控件是干嘛用的?

我只知道DataSource控件是连接数据库ADO类控件的,至于MainDataModule这是第三方控件把,我没用过。

Delphi里如何实现生成MHT格式的文件呢?

利用系统自带的接口来实现。在Delphi里选择ImportTypeLibrary这一项,再选择C:Windowssystem32cdosys.dll这个DLL,createunit可以得到这两个文件、CDO_TLB,ADODB_TLB导出为MHT的方法为:functionURLPageSaveAsMHT(AURL:string;AFileName:string):Boolean;varMsg:IMessage;Conf:IConfiguration;Stream:_Stream;beginResult:=False;tryMsg:=CoMessage.Create;

怎样触发delphi 中的progressbar

使用max,step,stepby等属性,大致如下(step : integer): step := 9000; progressbar1.Max := step; progressbar1.Step :=1; progressbar1.StepBy(250);delphi帮助有例子(传输文件):procedure TForm1.Button2Click(Sender: TObject);const // On Windows replace, myfile with a pathname such as c:autoexec.bat FName = "MyFile";var F: File; MyData: array[1..2048] of byte; BytesRead: LongInt;begin AssignFile(F, FName); try Reset(F); ProgressBar1.Max := FileSize(F); if (ProgressBar1.Max > 10) then ProgressBar1.Step := ProgressBar1.Max div 10 else ProgressBar1.Step := ProgressBar1.Max; while (ProgressBar1.Position < ProgressBar1.Max) do begin // read one Step size chunk of data to buffer BlockRead(F, MyData, ProgressBar1.Step, BytesRead); // move the ProgressBar Position using StepIt ProgressBar1.StepIt; // move by Step amount end; finally; CloseFile(F); end;end;

delphi中从DBGrid导出到excel功能的代码 谢谢

这么长的代码啊,但愿有用吧~

delphi ProgressBar 中的StepIt,StepBy是什么意思?

StepIt就是让进度条的position增加一个step值的大小(比如说你现在position为10,step步长为5,那执行一次StepIt,position就会增大5)StepBy与这个比较类似,但是它是可以指定position变化的数值,比如说StepBy(50)就是增大50

delphi中有个locate函数,有个疑惑,不清楚他是全字匹配还是像数据库中的like

试试就知道,不满足。

Delphi7的serialnumber和authorization key

SN:6AMD-PDJ686-APME9D-9CDR KEY:YVX-27C

DELPHI怎么从电脑中搜索文件并且将文件信息存入数据库

procedure TForm1.GetDirFileNameList(sDirPath, sExt: string);var sr: TSearchRec; function StrInFileName(s1, sName: string): Boolean; var str1, str2: string; begin Result := False; str1 := UpperCase(sName); str2 := UpperCase(Copy(s1, 1, Pos(".", s1)-1)); if Pos(str2, str1) > 0 then Result := True; end;begin if DirectoryExists(sDirPath) then begin if FindFirst(sDirPath + "*.*", faAnyFile, sr) = 0 then begin if (sr.Name <> ".") and (sr.Name <> "..") and StrInFileName(sExt, sr.Name) then Memo1.Lines.Add(sDirPath + "" + sr.Name); while (FindNext(sr) = 0) do begin if (sr.Name <> ".") and (sr.Name <> "..") and StrInFileName(sExt, sr.Name) then Memo1.Lines.Add(sDirPath + "" + sr.Name); end; end; FindClose(sr); end;end;procedure TForm1.Button1Click(Sender: TObject);begin GetDirFileNameList("E:king", "123.exe");end;这代码不是我写的,但和你的需要差不多,你可以参考一下至于写入数据库,那只是写条记录而已,没什么特别的

DELPHI中build和compile有什么区别

如果你对某个 delphi 工程文件,分别进行 build 和 compile,那么仔细观察下面的信息窗口:Build:Compile:仔细观察,你会发现: compile 会比 build 少了一些信息,其原因在于:Build编译全部与工程相关联的文件,可包括版本信息及工程中的预编译变量等;Compile只重新编译更改过的相关单元及文件,调试是Compile就可以了,若是发布,则Build为好。Build 会提示一些警告级别的提示信息,而 Compile 就直接忽略了。

delphi initialization写在什么位置

方法很多了。1、在主窗体的onCreate事件中写的代码2、在delphi程序的任何一个单元unit代码中末尾: initialization //这儿的代码在delphi程序初始化时自动执行 end.3、project文件(project.dpr)文件中: Application.Initialize; //这儿的在delphi程序运行时也会自动执行 Application.CreateForm(TForm1, Form1);等等。

Delphi中怎么通过http get方式来调用url

使用 TIdHttp 组件

delphi点击按钮Edit显示hint

edit应该有showhint 和hint属性吧

delphi这种情况下怎样显示hint?

处理对应控件的onenter事件

在Delphi编程中,如何让组件中的Hint中的文字显示更长的时间?

Application.HintHidePause=5000; // 提示信息停留5秒 (单位毫秒)

delphi设置好了hint,但没有显示?

没见过这种情况,试下关了Delphi 重开

delphi中hint窗口宽度怎么设置

加上换行和回车就可以了,不过要用指令加,不能在属性里加,如下:button1.Hint:="abcde"+#13#10+"fghij";

Delphi中的cxgrid如何设置hint属性,使其在鼠标移动上去的时候显示呀?

showhint属性设为true,才能显示hint的内容。如果需要动态显示,只能代码更改hint的内容

DELPHI 点击按扭显示HINT 怎么做?

点击的时候不成了单击或双击事件了吗?

delphi teechart 如何将不同数量级(Y轴)的多条曲线,都能明显的在同一chart里显示出来?

可以有左边和右边两条Y轴

delphi7 如何动态添加一个数据库字段?

方法比较简单,查找表中是否存在字段名,没有则添加altertableyourtableaddnewfieldvarchar(50)null...但有什么意义呢?随意修改数据库结构,不怕影响你的数据操作,建议采用临时表

用DELPHI编写消息发送程序

服务端unit ServerMain;interfaceuses Windows, Messages, WinSock, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ImgList, ToolWin, XPMan, Menus, ExtCtrls;const WM_WORK1_ACCEPT = WM_USER + 12; WM_WORK1_READ = WM_USER + 13;type TForm1 = class(TForm) StatusBar1: TStatusBar; ToolBar1: TToolBar; ToolButton1: TToolButton; ToolButton2: TToolButton; ToolButton3: TToolButton; ImageList1: TImageList; XPManifest1: TXPManifest; PopupMenu1: TPopupMenu; N8: TMenuItem; Panel1: TPanel; ListBox1: TListBox; Memo1: TMemo; Splitter1: TSplitter; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure ToolButton3Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject); procedure N8Click(Sender: TObject); private { Private declarations } procedure InitSocket; procedure OnWork1Accept(Var message: TMessage); message WM_WORK1_ACCEPT; procedure OnWork1Read(Var message: TMessage); message WM_WORK1_READ; public { Public declarations } end; TCarCache = Record Pzh: String[10]; Cz: String[20]; Zs: Integer; end;var Form1: TForm1; Server_Socket : Integer; //服务器Socket号码 Conn_Socket : Integer; //连接后Socket号码implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);begin //初始化 InitSocket;end;procedure TForm1.FormDestroy(Sender: TObject);begin //释放WInSOck WSACleanup();end;procedure TForm1.OnWork1Accept(var message: TMessage);Var Client_Addr: TSockAddr; ClientLen: Integer;begin FillChar(Client_Addr,Sizeof(Client_Addr),0); ClientLen := Sizeof(Client_Addr); Conn_Socket := Accept(Server_Socket,@Client_Addr,@ClientLen); StatusBar1.Panels[1].Text := "已连接"; ToolButton1.Enabled := true; ToolButton3.Enabled := true; //读取/关闭 事件 WSAAsyncSelect(Conn_Socket, Form1.Handle, WM_WORK1_READ, FD_READ or FD_CLOSE);end; procedure TForm1.OnWork1Read(var message: TMessage);Var Buff: String[100]; RET: Integer;begin CASE WSAGETSELECTEVENT(message.lParam) OF FD_READ: begin Ret := Recv(Conn_Socket,Buff,Sizeof(Buff),0); if Ret = SOCKET_ERROR then begin showmessage("Read Error!"); end else if Ret > 0 then //接收 begin ListBox1.Items.Add(Buff); //返回 Send(Conn_Socket,Buff,Sizeof(Buff),0); end; end; FD_CLOSE: begin StatusBar1.Panels[1].Text := "已断开"; ToolButton1.Enabled := false; ToolButton3.Enabled := false; end; end;end;procedure TForm1.ToolButton3Click(Sender: TObject);var Buff: String[100]; i: Integer;begin for i := 0 to Memo1.Lines.Count - 1 do begin Buff := Memo1.Lines[i]; Send(Conn_socket,Buff,sizeof(Buff),0); end; Memo1.Clear;end;procedure TForm1.ToolButton1Click(Sender: TObject);begin CloseSocket(Conn_socket); StatusBar1.Panels[1].Text := "已断开"; ToolButton1.Enabled := false; ToolButton3.Enabled := false;end;procedure TForm1.N8Click(Sender: TObject);begin ListBox1.Clear;end;procedure TForm1.InitSocket;Var XL_WSADATA:TWSADATA; Sa: SockAddr_In; RET:Integer;begin //初始化WinSock库 RET:=WSASTARTUP(MakeWord(2,2),XL_WSADATA); IF RET=0 THEN begin //建立Sock Server_Socket:=Socket(PF_INET,SOCK_STREAM,0); IF Server_SOCKET=INVALID_SOCKET THEN begin Application.MessageBox("SOCKET创建失败","注意",mb_ok) end; //邦定 Sa.sin_family := PF_INET; Sa.sin_port := Htons(8080); Sa.sin_addr.s_addr := INADDR_ANY; RET := Bind(Server_Socket,Sa,sizeof(Sa)); IF RET = SOCKET_ERROR then begin Application.MessageBox("SOCKET邦定失败!","注意",mb_ok) end; //监听 Ret := Listen(Server_Socket,1); if Ret <> 0 then begin Application.MessageBox("监听失败!","错误信息",MB_OK); Exit; end; //连接事件 WSAAsyncSelect(Server_Socket,Form1.Handle,WM_WORK1_ACCEPT,FD_ACCEPT); end;end;end.客户端unit main;interfaceuses Windows, Messages, SysUtils, Winsock, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ImgList, ToolWin, ExtCtrls, StdCtrls, XPMan, Menus, Buttons;const WM_SOCKET_READ = WM_USER + 14;type TFrmMain = class(TForm) ToolBar1: TToolBar; ImageList1: TImageList; ToolButton1: TToolButton; StatusBar1: TStatusBar; ToolButton2: TToolButton; Panel_Left: TPanel; Panel_Main: TPanel; Memo1: TMemo; ToolButton3: TToolButton; Panel3: TPanel; XPManifest1: TXPManifest; GroupBox1: TGroupBox; MainMenu1: TMainMenu; N1: TMenuItem; N2: TMenuItem; N3: TMenuItem; N4: TMenuItem; N5: TMenuItem; N6: TMenuItem; N7: TMenuItem; BitBtn1: TBitBtn; Label1: TLabel; Label2: TLabel; Edit2: TEdit; Edit3: TEdit; BitBtn2: TBitBtn; BitBtn3: TBitBtn; Memo2: TMemo; PopupMenu1: TPopupMenu; N8: TMenuItem; procedure Panel3Resize(Sender: TObject); procedure ToolButton1Click(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure FormCreate(Sender: TObject); procedure ToolButton3Click(Sender: TObject); procedure BitBtn1Click(Sender: TObject); procedure BitBtn3Click(Sender: TObject); procedure BitBtn2Click(Sender: TObject); procedure N8Click(Sender: TObject); private { Private declarations } hostname:string; server_port:integer; xl_hostent:phostent; xl_sockaddrin:TSOCKADDRIN; xl_socket: Integer; psaddr:^longint; saddr:integer; Procedure LinkSock; procedure InitSock; procedure OnSocketRead(Var message: TMessage); message WM_SOCKET_READ; public { Public declarations } end; TCarCache = Record Pzh: String[10]; Cz: String[20]; Zs: Integer; end;var FrmMain: TFrmMain;implementation{$R *.dfm}procedure TFrmMain.Panel3Resize(Sender: TObject);begin Memo2.Width := Panel3.Width - 105; BitBtn1.Left := Panel3.Width - 90;end;procedure TFrmMain.LinkSock;Var RET: Integer;begin server_port:=StrToInt(Edit3.Text); hostname := Edit2.Text; xl_sockaddrin.sin_port := htons(server_port); xl_sockaddrin.sin_family := PF_INET; xl_hostent := GetHostByName(PCHAR(HOSTNAME)); IF xl_hostent = nil then begin saddr := inet_addr(PCHAR(HOSTNAME)); if saddr <> -1 then xl_sockaddrin.sin_addr.S_addr := saddr; end else begin psaddr := pointer(xl_hostent.h_addr_list^); xl_sockaddrin.sin_addr.S_addr := psaddr^; end; xl_socket:=socket(PF_INET,SOCK_STREAM,0); IF XL_SOCKET=INVALID_SOCKET THEN begin Application.MessageBox("SOCKET创建失败","注意",mb_ok); end; RET := CONNECT(xl_socket,xl_sockaddrin,sizeof(xl_sockaddrin)); if ret = socket_error then begin Application.MessageBox("SOCKET连接失败","注意",mb_ok); ret:=closesocket(xl_socket); if ret=0 then Application.MessageBox("SOCKET释放成功!","注意",mb_ok); end else begin Application.MessageBox("SOCKET连接成功!","注意",mb_ok); Panel_Main.Enabled := true; //读取/关闭 事件 WSAAsyncSelect(xl_socket, FrmMain.Handle, WM_SOCKET_READ, FD_READ or FD_CLOSE); end;end;procedure TFrmMain.ToolButton1Click(Sender: TObject);begin Panel_Left.Visible := ToolButton1.Down;end;procedure TFrmMain.InitSock;Var XL_WSADATA:TWSADATA; RET:INTEGER;begin //初始化WinSock库 RET:=WSASTARTUP(MakeWord(2,2),XL_WSADATA); IF RET<>0 THEN begin Application.MessageBox("初始化WInSock库失败!","错误信息",MB_OK); end;end;procedure TFrmMain.FormDestroy(Sender: TObject);begin WSAcleanup;end;procedure TFrmMain.FormCreate(Sender: TObject);begin InitSock;end;{ TSockServer }procedure TFrmMain.ToolButton3Click(Sender: TObject);begin CloseSocket(xl_socket); StatusBar1.Panels[1].Text := "已断开"; ToolButton3.Enabled := false; ToolButton1.Enabled := true;end;procedure TFrmMain.BitBtn1Click(Sender: TObject);var Buff: String[100]; i: Integer;begin {Buff.Pzh := "JA-88888"; Buff.Cz := "国务院"; Buff.Zs := 4; } for i := 0 to Memo2.Lines.Count - 1 do begin Buff := Memo2.Lines[i]; Send(xl_socket,Buff,sizeof(Buff),0); end; Memo2.Clear;end;procedure TFrmMain.OnSocketRead(var message: TMessage);Var Buff: String[100]; RET: Integer;begin CASE WSAGETSELECTEVENT(message.lParam) OF FD_READ: begin Ret := Recv(xl_socket,Buff,Sizeof(Buff),0); if Ret = SOCKET_ERROR then begin showmessage("Read Error!"); end else if Ret > 0 then begin {Memo1.Lines.Add("========== Server Call Back ============"); Memo1.Lines.Add("牌照号:" + Buff.Pzh); Memo1.Lines.Add("车 主:" + Buff.Cz); Memo1.Lines.Add("轴 数:" + IntToStr(Buff.Zs)); Memo1.Lines.Add("========== Call Back End ============"); } Memo1.Lines.Add(Buff); end; end; FD_CLOSE: begin StatusBar1.Panels[1].Text := "已断开"; ToolButton3.Enabled := false; ToolButton1.Enabled := true; end; end;end;procedure TFrmMain.BitBtn3Click(Sender: TObject);begin ToolButton1.Down := false; ToolButton1.Click;end;procedure TFrmMain.BitBtn2Click(Sender: TObject);begin LinkSock; ToolButton1.Down := false; ToolButton1.Click; StatusBar1.Panels[1].Text := "已连接"; ToolButton3.Enabled := true; ToolButton1.Enabled := false;end;procedure TFrmMain.N8Click(Sender: TObject);begin Memo1.Clear;end;end.不记得哪下的了,贴上来。

delphichart获取坐标问题,求指教

这么简单还用问?在chart控件的onMouseMove事件里面实现啊,那个例子里面有的,只不过你要注意程序中的全局变量的使用oldx和oldy等在onmousemove事件中vartmpX,tmpY:Double;procedureDrawCross(AX,AY:Integer);beginwithchartscan,CanvasdobeginPen.Color:=CrossHairColor;Pen.Style:=CrossHairStyle;Pen.Mode:=pmXor;Pen.Width:=1;MoveTo(AX,ChartRect.Top-Height3D);LineTo(AX,ChartRect.Bottom-Height3D);MoveTo(ChartRect.Left+Width3D,AY);LineTo(ChartRect.Right+Width3D,AY);end;end;beginif(OldX-1)thenbeginDrawCross(OldX,OldY);//0);//OldY);{drawoldcrosshair}OldX:=-1;end;{checkifmouseisinsideChartrectangle}ifPtInRect(chartscan.ChartRect,Point(X-chartscan.Width3D,Y+chartscan.Height3D))thenbegin{setlabeltext}if(CrossHCount=0)thenbegin//Series2.Value[X];//oldcode=GetVertAxis.LabelValue(Trunc(tmpy))ifSeries2.MaxYValue<=0then<br>beginStatusBar1.Panels[1].Text:="I="+GetVertAxis.LabelValue(Trunc(tmpY));endelsebeginStatusBar1.Panels[1].Text:="I="+GetVertAxis.LabelValue(Trunc(tmpY))+"Imax="+inttostr(Round(Series2.MaxYValue))+"I/Imax="+format("%.2f%%",[tmpY/Series2.MaxYValue*100]);end;endelsebeginStatusBar1.Panels[1].Text:="I=0";end;if(not(tmpX=0))thenbeginStatusBar1.Panels[2].Text:="d="+format("%7.4f",[ParMem.FWAV/(2*sin(DegToRad(tmpX/2)))]);//[ParMem.FWAV/(sin(tmpx*3.14/180))]);endelsebeginStatusBar1.Panels[2].Text:="d=";end;exceptStatusBar1.Panels[0].Text:="";StatusBar1.Panels[1].Text:="";StatusBar1.Panels[2].Text:="";end;end;endelsebeginStatusBar1.Panels[0].Text:="";StatusBar1.Panels[1].Text:="";StatusBar1.Panels[2].Text:="";end;end;其实demo中的例子就很简洁的,可以根据你自己的需要进行发挥给你提个建议,你先把那个例子的关于你需要的内容进行剪裁,执行正常后,进行你需要的内容的修改和添加,我当初就是这么干的,在网上也问过同样的内容,无果,只好自己动手啦

关于delphi的编程问题II

好久没用Delphi了,是Date、Time吧

怎样实现delphi7中statusbar组件文字可以滚动(从左到右或从右到左)

去找个 raize 组件包,各个delphi网站都有的,有源码的或者用定时器,刷新文字就行了

如何更改TWICImage的像素格式在Delphi 2010

解决方法Bummi和Warren P问我发布了我之前添加的答案.这是答案:对于那些可能想知道的人,我尝试过这个工作,它似乎工作起来(它由Developer Express使用TcxImage,但我怀疑TImage也会工作):procedure TForm1.N16bitBGR1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat16bppBGR555, WICBitmapDitherTypeNone, nil, 0,WICBitmapPaletteTypeMedianCut );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N16bitGray1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat16bppGray, WICBitmapDitherTypeSolid, nil, 0,WICBitmapPaletteTypeFixedGray16 );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N24bitGBB1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat24bppBGR, WICBitmapDitherTypeNone, nil, 0,WICBitmapPaletteTypeMedianCut );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N2bitIndexed1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat2bppIndexed, WICBitmapDitherTypeNone, nil, 0,WICBitmapPaletteTypeMedianCut );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N32bitGray1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat32bppGrayFloat, WICBitmapDitherTypeSolid, nil, 0,WICBitmapPaletteTypeFixedGray256 );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N32bitGRBA1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat32bppPBGRA, WICBitmapDitherTypeNone, nil, 0,WICBitmapPaletteTypeMedianCut );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N4bitIndexed1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat4bppIndexed, WICBitmapDitherTypeNone, nil, 0,WICBitmapPaletteTypeMedianCut );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N8bitGray1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat8bppGray, WICBitmapDitherTypeSolid, nil, 0,WICBitmapPaletteTypeMedianCut );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;procedure TForm1.N8bitIndexed1Click( Sender: TObject );varwicImg: TWICImage;wicBitmap: IWICBitmap;iBmpSource: IWICBitmapSource;puiWidth, puiHeight: UINT;iConverter: IWICFormatConverter;beginif cxImage1.Picture.Graphic is TWICImage thenbeginScreen.Cursor := crHourGlass;trywicImg := TWICImage( cxImage1.Picture.Graphic );wicImg.ImagingFactory.CreateFormatConverter( iConverter );iBmpSource := wicImg.Handle as IWICBitmapSource;iBmpSource.GetSize( puiWidth, puiHeight );iConverter.Initialize( iBmpSource, GUID_WICPixelFormat8bppIndexed, WICBitmapDitherTypeNone, nil, 0,WICBitmapPaletteTypeFixedGray256 );wicImg.ImagingFactory.CreateBitmapFromSourceRect( iConverter, 0, 0, puiWidth, puiHeight, wicBitmap );if Assigned( wicBitmap ) thenwicImg.Handle := wicBitmap;cxImage1.Repaint;cxImage1.Update;cxImage1.Invalidate;dxStatusBar1.Panels[ 0 ].Text := ExtractFileDir( AFilename );dxStatusBar1.Panels[ 1 ].Text := ExtractFileName( AFilename );dxStatusBar1.Panels[ 2 ].Text := "Width: " + IntToStr( WICImageWidth( cxImage1 ) );dxStatusBar1.Panels[ 3 ].Text := "Height: " + IntToStr( WICImageHeight( cxImage1 ) );dxStatusBar1.Panels[ 4 ].Text := "Pixel Format: " + WICGetPixelFormat( cxImage1 );finallyScreen.Cursor := crDefault;end;end;end;

delphi刷新问题

这个没办法statusbar就这样

delphi statusbar控件(状态栏)

//statusbar1单击事件var Pt: TPoint; I,Idx,PC,W,H: Integer; R: TRect; S: string;begin //先粗略取坐标,看是点在哪个格子上的 GetCursorPos(Pt); Pt := StatusBar1.ScreenToClient(Pt); Idx := -1; R := Rect(0,0,0,StatusBar1.Height); PC := StatusBar1.Panels.Count - 1; for I := 0 to PC do begin R.Left := R.Right; if I = PC then R.Right := StatusBar1.Width else R.Right := R.Left + StatusBar1.Panels[i].Width; if PtInRect(R,Pt) then begin Idx := I; Break; end; end; if Idx = -1 then Exit; //现根据文字宽度,确定在否在文字上 S := StatusBar1.Panels[Idx].Text; W := StatusBar1.Canvas.TextWidth(S); H := StatusBar1.Canvas.TextHeight(S); InflateRect(R,-1,0); if W < R.Right - R.Left then case StatusBar1.Panels[Idx].Alignment of taLeftJustify: R.Right := R.Left + W; taRightJustify: R.Left := R.Right - W; taCenter: InflateRect(R,- (R.Right - R.Left - W) div 2,0); end; if H < R.Bottom - R.Top then InflateRect(R,0,-(R.Bottom - R.Top - H) div 2); if not PtInRect(R,Pt) then Exit; //这里idx就是点中文字格子索引,自己选择,打开网页,这里是将文字做为网址打开,你可以自己维护一个网址表 ShellExecute(Application.Handle, nil, PChar(S), nil, nil, SW_SHOWNORMAL);end;

Delphi 如何判断鼠标指针是否在窗口中

如何才认为是在窗口中?与窗体的焦点有关系么?还有窗体是本进程的窗体还是其他进程的窗体?给你些提示把,使用API函数GetCursorPos获取当前鼠标位置(屏幕坐标)ScreenToClient从屏幕坐标转换为客户区坐标GetWindowRect获取窗体大小只要判断客户区坐标是不是都大于0,小于窗体长宽就行了。该方法支持进程外窗体。

用delphi statusbar 的控件 怎么显示当前登录的用户名?

这里的sb就是statusbar 的控件. sb.Panels[0].Text:="Ready"; sb.Panels[1].Text:="当前用户:"+username; 设计时候,你双击statusbar控件,会有个设计器,你可以把statusbar分成几个区域, 每个区域可以设置宽度. 那么Panels[0] 就是第一个,,下面依次类推..【补充:建议你的sql不要select * 用到什么字段就取什么字段。sqlstr:="select username,usertel From t_user where loginID="+chr(39)+edit1.Text+chr(39); Adoquery1.SQL.Add(sqlstr); ADOquery1.Open;if (AdoQuery1.recordcount>0) thenStatusBar1.Panels[0].Text:="用户名:"+Adoquery.fields[0].AsString;//这里的fields[0]就是取select 的第一个字段的值,以此类推。。

NBA球队PHI是不是Philadelphia 76ers的缩写

是的,费城76人队的英文全称是Philadelphia76ers,简称PHI,在今天早上进行的NBA东部半决赛中,费城76人队在抢七大战中,遭遇猛龙队绝杀,止步半决赛。

NBA球队PHI是不是Philadelphia 76ers开头三个字母

是的,费城76人队的英文全称为Philadelphia76ers,英文名称简写为PHI,球队的知名人物有威尔特·张伯伦,朱利叶斯·欧文,摩西·马龙,阿伦·艾弗森,曾获得3次NBA总冠军。

Philadelphia 76ers名字里的76ers是怎么来的?

费城是1776年美国宣布独立的地方~

求:电影《Philadelphia》中一首歌

是Q Lazzarus唱的Heaven,歌词 Everyone is trying to get to the bar. The name of the bar, the bar is called Heaven. The band in Heaven plays my favorite song. They play it once again, they play it all night long. Heaven is a place where nothing ever happens. Heaven is a place where nothing ever happens. There is a party, everyone is there. Everyone will leave at exactly the same time. Its hard to imagine that nothing at all could be so exciting, and so much fun. Heaven is a place where nothing ever happens. Heaven is a place where nothing ever happens. When this kiss is over it will start again. It will not be any different, it will be exactly the same. It"s hard to imagine that nothing at all could be so exciting, could be so much fun. Heaven is a place where nothing every happens Heaven is a place where nothing every happens

谁可以详细解释一下,每段是什么意思吗?我是个DELPHI 7的初学者。

memo这个控件的lines.add属性是执行一次就自动新增一行,你每次接收到数据都一个ADD,所以每次都换行了。如果你只要显示当前接收到的结果,你可以用memo1.text:=‘sbuf";如果要全部显示,可以用 Memo1.Lines.Text := Memo1.Lines.Text+sbuf;,也可以是 Memo1.Text := Memo1.Text+sbuf;

Philadelphia Passed a Soda Tax

The fifth largest city in the US passed a significant soda tax proposal that will levy 1.5 cents per liquid ounce on distributors. 美国第五大城市费城通过了一项重要的“苏打水征税”提案,该提案决定对经销商征收每液体盎司1.5美分的税。Philadelphia"s new measure was approved by a 13 to 4 city council vote. It sets a new bar for similar initiatives across the country. 费城的这项新措施以13票比4票获得了市议会的通过。它为美国全国范围内的类似举措设置了新的标准。It is proof that taxes on sugary drinks can win substantial support outside super-liberal areas. 这证明,即使在超自由主义领域之外,对含糖饮料征税也可以赢得大量支持。Until now, the only city to successfully pass and implement a soda tax was Berkeley, California, in 2014. 目前为止,加州的伯克利是唯一一个成功通过并实施了苏打水征税的城市,该税法于2014年通过。The tax will apply to regular and diet sodas, as well as other drinks with added sugar, such as Gatorade and iced teas. 该税不仅适用于佳得乐和冰茶等其他含糖饮料,也适用于普通汽水和无糖汽水。It"s expected to raise $410 million over the next five years, most of which will go toward funding a universal pre-kindergarten program for the city. 预计在未来五年中,它将征集到4.1亿美元,其中大部分将用于资助该市的一项普及学前教育项目。While the city council vote was met with applause inside the council room, opponents to the measure, including soda lobbyists, made sharp criticisms and a promise to challenge the tax in court. 虽然市议会投票结果在议会厅内赢得了欢呼,但是该项提案的反对者,包括苏打水游说者,却对此进行了尖锐的批判,并且发誓会在法庭上反对这一税收。"The tax passed today unfairly singles out beverages — including low- and no-calorie choices," said Lauren Kane, spokeswoman for the American Beverage Association. 美国饮料协会发言人劳伦·凯恩(Lauren Kane)称,”今天通过的这项税收专门针对饮料——包括低卡和零卡饮料,这很不公平。”"But most importantly, it is against the law. So we will side with the majority of the people of Philadelphia who oppose this tax and take legal action to stop it." “但最重要的是,这是违法的。因此,我们将与大多数费城人站在一起,反对这项税收,并采取法律行动阻止它。”An industry-backed anti-tax campaign has spent at least $4 million on advertisements. The ads criticized the measure, characterizing it as a "grocery tax." 一场由行业支持的反税运动已花费了至少400万美元用于广告宣传。这些广告批判了这项税收,并将其描绘为“杂货税。”Public health groups applauded the approved tax as a step toward fixing certain lasting health issues that plague Americans. 公共健康组织则支持这项已通过的税收,并称赞这是解决某些长久困扰美国人的健康问题所迈出的一步。"The move to recapture a small part of the profits from an industry that pushes a product that contributes to diabetes, obesity and heart disease in poorer communities in order to reinvest in those communities will sure be inspirational to many other places," said Jim Krieger, executive director of Healthy Food America. "Indeed, we are already hearing from some of them. It"s not "just Berkeley" anymore." 优食美国(Healthy Food America,一个致力于促进健康饮食的组织)的执行主任吉姆·克里格(Jim Krieger)说:“从一个所推广的产品会让较贫困社区的人口患上糖尿病、肥胖症和心脏病的行业拿回一小部分利润,以再投资于这些社区,这种举措肯定会对其他许多地方产生启发。”“事实上,我们已经收到了一些地方的来信。不会只有伯克利一个城市。”Similar measures in California"s Albany, Oakland, San Francisco and Colorado"s Boulder are becoming hot-button issues. Health advocacy groups have hinted that even more might be coming. 类似措施在加州的奥尔巴尼、奥克兰、旧金山和科罗拉多州的博尔德正成为热点问题。健康组织暗示未来可能会有更多城市。

《Philadelphia》的歌词大意

有时我想,我知道什么是关于爱的所有当我看到光明我知道我会好起来的。我有在世界上的朋友,我有我的朋友当我们是男孩和女孩而秘密来到白布。城市的兄弟之爱地方,我给家里打电话不要把你对我回我不想独自爱到永远。有人在谈论我,叫我的名字告诉我,我不怪我不会感到羞耻的爱。费城城市的兄弟之爱。兄弟之爱。有时我想,我知道什么是关于爱的所有当我看到光明我知道我会好起来的。费城。

Philadelphia 歌词

歌曲名:Philadelphia歌手:john mark mcmillan专辑:the medicineJohn Mark McMillan - PhiladelphiaYou step through meAnd the screen door hits the woodAnd your packing all your thingsYou say your moving out to there to HollywoodAnd I can"t do a thingYou say there"s nothing for youIn this cardboard townAnd every bridge you crossYour gonna burn it to the groundYou wont listen to a word that I"m telling yaSo who"s running through the hallsIn the houses of painThat are staring back at meLike the ocean from a planeI swear I"ve seen your eyesin the ghost of PhiladelphiaI think about you late at night sometimesWhen I can"t sleepCause I can hear the trainIt"s always thereYou just don"t know itTill a quarter to threeYou just can"t hear it in the dayWhen every body"s got your numberIn a plexy glass townWhere the birds ain"t got wingsBut no one makes a soundCause they all know how to flyJust I wouldn"t buy what they"re selling yaI run into your old man every once and againMostly in the springReminds me of our younger and more genuine days whenYou weren"t so out of reachStill for all your runningYou just can"t change a mileOf the things you carry aroundIn the closet of your mindAnd the days keep coming manThey never fail yaYour never gonna run awayFrom what your hanging round your headFrom what you saidhttp://music.baidu.com/song/28283682

philadelphia是哪个州

美国宾夕法尼亚州

求philadelphia电影简介

安德鲁(汤姆u2022汉克斯 Tom Hanks 饰)和米勒(丹泽尔u2022华盛顿 Denzel Washington 饰)认识于法庭上,两人都是年轻有为的律师,各为其主。然而,年轻的安德鲁不久后因为同性恋和身染艾滋病被老板发现,以莫须有理由解雇了。 遭解雇后的安德鲁四处寻找律师为他讨回公道。当安德鲁找到米勒时,米勒一开始拒绝了他。因为米勒像普通人一样憎恨同性恋和惧怕艾滋病,但当他看到安德鲁在图书馆搜索“艾滋病歧视”时遭到管理员的白眼,听着妻子缓慢而平静地说出他们的姨妈、朋友有很多也是同性恋时,他决定受理安德鲁的案件。 在最后的法庭上,病危的安德鲁毅然出庭…… 如果你要是打《费城故事》的话,会有更多信息的。

Philadelphia费城英语怎么读啊?最好是中文译音.

Philadelphia的发音是:[,filu0259"delfju0259; -fiu0259] 中文发:非了 呆非恶

philadelphia是哪个州

费城是位于宾夕法尼亚州的

Philadelphia 歌词

歌曲名:Philadelphia歌手:NEIL YOUNG专辑:Philadelphia - Music From The Motion PicturePHILADELPHIA / Neil YoungSometimes I think that I knowWhat love"s all aboutAnd when I see the lightI know I"ll be all right.I"ve got my friends in the world,I had my friendsWhen we were boys and girlsAnd the secrets came unfurled.City of brotherly lovePlace I call homeDon"t turn your back on meI don"t want to be aloneLove lasts forever.Someone is talking to me,Calling my nameTell me I"m not to blameI won"t be ashamed of love.PhiladelphiaCity of brotherly love.Brotherly love.Philadelphia.http://music.baidu.com/song/8803496

Philadelphia是什么意思﹖

费城philadelphia在词典上的解释:(名词,n)费城费城:philadelphia 费城 是美国最老、最具历史意义的城市,在美国城市排名第四,居民共约六百二十万人,费城是德拉瓦河谷都会区的中心城市,位于宾夕法尼亚州(Pennsylvania)东南部,市区东起德拉瓦河,向西延伸到斯库基尔河以西,面积334平方公里。它在美国史上有非常重要的地位。同名电影《费城》则是一部反应艾滋病,同性恋,人权,自尊的经典影片。“费城”也是美国NBA中的一支老牌蓝球队。费城还是中国山东省费县费城镇的名称。

philadelphia怎么读

philadelphia的中文意思、音标、例句及语法单词音标英语音标:[u02ccfilu0259u02c8delfju0259]美语音标:[u02ccfilu0259u02c8delfju0259]转载需注明“转自音标网yinbiao5.com”,违者必究中文翻译n.费城单词例句用作名词 (n.)She got caught kite flying in Philadelphia. 她在费城到处开空头支票时被抓住。

philadelphia怎么读

Philadelphia 英[u02ccfu026alu0259"delfju0259] 美[u02ccfu026alu0259"delfju0259] n. 费城(美国宾西法尼亚州东南部港市); [例句]The document composed in Philadelphia transformed the confederation of sovereign states into a national government.在费城起草的这份文件使具有独立主权的各州组成的邦联变成了国家政府。

Delphi 求mp3文件的持续时间

procedure TForm1.FormCreate(Sender: TObject);begin mediaplayer1.FileName :="f:mudan.mp3"; mediaplayer1.Open ; label1.Caption :=inttostr(mediaplayer1.Length );//播放长度end;procedure TForm1.Button1Click(Sender: TObject);begin mediaplayer1.Play ;//播放end; ***************************8吧代码贴出来,别人才好帮助你呀,这种小儿科的问题无须保密。

Delphi中的nil和数字0是什么意思啊

Delphi中的SendMessage函数,其实就是C语言中的SendMessage函数,在C语言中,其函数原型为:LRESULT SendMessage(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam); 参数: hWnd:其窗口程序将接收消息的窗口的句柄。如果此参数为HWND_BROADCAST,则消息将被发送到系统中所有顶层窗口,包括无效或不可见的非自身拥有的窗口、被覆盖的窗口和弹出式窗口,但消息不被发送到子窗口。 Msg:指定被发送的消息。 wParam:指定附加的消息指定信息。 lParam:指定附加的消息指定信息。 返回值:返回值指定消息处理的结果,依赖于所发送的消息。 wParam与lParam的数据类型都是无符号整数,wParam 通常是一个与消息有关的常量值,也可能是窗口或控件的句柄。 lParam 通常是一个指向内存中数据的指针。 不同的消息,要求不同,有的用到wParam与lParam,有的不用。因为他们的数据类型为无符号整形,所以,不用时传个0就行了。

为什么费城philadelphia别称是brotherly love

根据词根,philein爱+adelphos兄弟。两个都是来自希腊语。

DELPHI写投票软件 Bad Request (Invalid Header Name)

应该是COOKIE改变了

delphi中为什么提示incompatible types

q/2是浮点数,你要改成整除的q div 2才行

delphi求助~提示是说append(f)那里出现incompatible types,请教一下应该怎么改?

change the filetype to textfilef:textfile;

delphi 7 关于onclick事件

楼主说的不明白 建议再说具体下你想实现的真的是递归?

delphi ehlib4.1.4安装问题

1. 把 EhLib 中的 common 和 DataService 文件拷贝到 Delphi7 目录中. 2.在 TOOLS->Environment Options->Library->Library Path 中添入EHLIB路径。 3.打开新建文件夹中的 EHLIB70.DPK ,编译一下,但不要安装。 4.打开Ehlib中的DclEhLib70.DPK,编译,安装 5. 在Delphi 7中打开DclEhLib70.dpk,编译并

delphi中的undeclared identifier

Form1重复定义了,edit1没有定义。很基础的错误,楼主的代码应该是粘帖过来的吧,所以有控件名不对。

delphi错误Undeclared identifier

N13Enabled:=False;//设置“修改密码”菜单项失效 少了个点

Delphi中的错误undeclared identifier

undeclared identifier:没有定义的标识符,也就是说这些标识符你没有指定为常量?变量?如果是常量,你要const定义它,如果是变量,你要在函数体开始前用var修饰符定义它

undeclared identifier"SQL" delphi

1)with ... do后面跟多条语句需要 begin end;你少了个begin2) exec SQL;这个,中间多了个空格3)try后面是不用跟 begin end的。try 到 except或finally之间默认视为一个语问块。你的try直接对应的end。错

delphi中case语句代替if...else if的问题

lankii35同学已经给出了方向,用枚举应该可以解决问题,这段代码不错啊,有时候我学一些技巧可以自己试试,或者参考VCL源代码

DELPHI中Outline控件如何使用

不知你有没有接触过VF编程,如果有过的话,对OLE这个东西应该不会很陌生. 但不管你有没有接触过它,相信你看了下面的内容,会对你有所帮助的. VFP的OLE技术应用详解 VisuaLFoxPro3.0(以下简称VFP)使用了OLE2.0技术,使VFP应用程序的适应能力大为加强。 VFP提供两种类型的OLE对象:一种是OLE控件(.OCX文件),这是一种自定义控件,通常在WINDOWSSYSTEM目录下,拥有自己的事件、方法,类似于VFP的基本类,这种控件可以用VC、VB5.0、DeLphi、SDK2.0等编程工具开发。VFP缺省提供了四种可供使用的OLE控件,即通信(MSCOMM32.OCX)、消息应用程序接口MAPI(MSMAPI32.OCX)、OutLine(MSOUTL32.OCX)和图片裁剪(PICCLP32.OCX);另一种是可插入型OLE对象,这是由其他应用程序创建的,它们没有自己的事件集合。这一种可插入型OLE对象又可分为限制性可插入型OLE对象和非限制性可插入型OLE对象。 VFP提供两种引用OLE对象的途径都是通过VFP中的控件实现的:一种是通过OLE容器控件链接或嵌入对象,OLE容器控件可以引入OLE控件和非限制性可插入型OLE对象;另一种是通过OLE绑定型控件链接或嵌入数据表的通用类型字段中所存放的OLE对象,这通常是些限制性可插入型OLE对象。 在VFP中OLE对象是通过链接或嵌入操作方式进行操作的。链接和嵌入操作之间的区别在于OLE对象所存放的地点:链接操作中的OLE对象仍然存放在创建它的源文件中数据表或表单仅仅存储源文件的位置,即一个指针,在更改源文件时,被链接的OLE对象将被及时更新。被链接的OLE对象始终保持着与源文件之间的联系,除非人为断开这种联系;嵌入操作的OLE对象只能存储在数据表或表单中。这些OLE对象不与创建它的源文件保持联系。如果源文件做了更改,它们不会自动反映在VFP应用程序中,除非你再次进行嵌入操作。链接操作通常用于如下场合:OLE对象(数据或图形)可能被经常更改、应用程序必须包含最新版本的OLE对象、存放OLE对象的源文件可以在计算机之间或通过计算机网络进行更新、存放OLE对象的源文件必须被其他应用程序共享。嵌入操作通常用于如下场合:应用程序不需要具有最新版本的OLE对象、嵌入的OLE对象不需要被多个应用程序使用、源文件在被链接后不会被更新。 要注意的是VFP本身只是一个OLE客户机,而不是一个OLE服务器。 使用OLE对象 在应用程序中使用OLE对象首先要考虑OLE对象的类型,针对不同类型的OLE对象,使用不同的方法来引用它们。当程序中要引用的可插入型OLE对象较多时就要考虑用数据表的通用型字段来存储它。 1、在VFP的数据表中添加OLE对象 方法一:使用数据表设计器给数据表添加一个通用型字段,然后将可插入型OLE对象链接或嵌入到通用型字段的每个记录中。通用字段包含一个10字节的指针,它指向该字段真正的内容,通用型字段的真正类型和数据大小取决于创建这些对象的OLE服务器。这些OLE对象是以链接方式还是以嵌入方式进行操作与该应用程序有关。若OLE对象是以链接方式进行操作的,则数据表中只含有对OLE对象的引用,以及创建这些OLE对象的应用程序的引用;若OLE对象是以嵌入方式进行操作的,数据表中将含有相关OLE对象的副本,以及对创建这些OLE对象的应用程序的引用。通用字段的大小仅受可用磁盘空间的限制。 方法二:使用APPENDGENERAL命令从文件中导入OLE对象并将其放入通用型字段中。语法: APPENDGENERALGeneraLFieLdName 〔FROMFiLeName FROMMEMOPictureFieLdue011Name〕 〔DATAcExpression〕 〔LINK〕 〔CLASSOLECLassName〕 2、使用限制性可插入型OLE对象 使用通用型字段中所存储的限制性可插入型OLE对象需要使用OLE绑定型控件,步骤如下: (1)在表单设计器中,将一个OLE绑定型控件添加到表单中。 (2)通过设置对象的ControLSource属性指定包含OLE对象的通用型字段。如果数据表名为Inventory,通用型字段名为Current,那么可以将ControLue011Source属性设置成Inventory.Current。 (3)在表单上添加按钮或菜单命令,用以浏览ControLSource属性指定的通用型字段。 3、使用OLE控件(.OCX文件)及非限制性可插入型OLE对象 这两类对象需要使用OLE容器控件。OLE容器控件允许向应用程序中加入OLE对象,包括OLE控件(.OCX文件)、非限制性可插入型OLE对象。OLE容器控件与OLE绑定型控件不同在于,它不与VFP表的一个通用型字段相连接。 若要在表单中添加OLE控件及非限制性可插入型OLE对象可按如下步骤进行: (1)在表单设计器中,向表单中添加一个OLE容器控件。 (2)在“InsertObject”对话框中,选择“CreateNew”或“CreatefromFiLe”或“InsertControL”选项。 (3)从显示的列表中选择适当的OLE控件或创建适当类型的对象或增加一个嵌入文件。 在插入控件时如果所要的控件没有出现在列表中,可选择“AddControL”按钮将其添加到列表中。也可以通过将OLE控件添加到表单控件工具栏中而将其添加到表单中。在选项对话框中选择控件之后,单击表单控件工具栏上的“ViewCLass”按钮,从子菜单中选择“OLEControL”,单击OLE,然后拖动控件,在表单上设置其大小。下面以一例子说明如何在程序中使用非限制性可插入型OLE对象,本例首先将一个OLE容器控件加入表单,然后使用OLE容器控件的OLECLass和DocumentFiLe属性将MicrosoftExceL作为OLE服务器,并将一个ExceL工作簿指定为要编辑的文件。DocumentFiLe属性指定了在C驱动器中ExceL路径下一个名为BOOK1.XLS的工作簿。如果在DocumentFiLe属性中指定的文件或路径不存在,则本例程不能正常运行,这时需要修改DocumentFiLe来指明一个存在的路径和工作簿文件。另外BOOK1.XLS只能读不能修改,下面是其VFP源代码及其说明。 frmMyForm=CREATEOBJECT(′Form′)&&创建表单 frmMyForm.CLosabLe=.F.&&废止控制菜单框 frmMyForm.AddObject(′cmdCommand1′,′cmdMyCmdBtn′) frmMyForm.AddObject(〃oLeObject〃,〃oLeExue011ceLObject〃) frmMyForm.cmdCommand1.VisibLe=.T. frmMyForm.oLeObject.VisibLe=.T. frmMyForm.oLeObject.Height=50 frmMyForm.Show frmMyForm.oLeObject.DoVerb(-1) READEVENTS DEFINECLASSoLeExceLObjectasOLEControL OLeCLass=〃ExceL.Sheet〃 DocumentFiLe=〃C:EXCELBOOK1.XLS〃 ENDDEFINE DEFINECLASScmdMyCmdBtnASCommandue011Button Caption=′ CanceL=.T. Left=125 Top=210 Height=25 PROCEDURECLick CLEAREVENTS ENDDEFINE 4、使用OLE对象的属性 OLE对象有一系列属性可供使用,但是对包含在OLE容器控件中的OLE对象,要确保引用的是OLE对象的属性而不是其容器的属性,这需要将容器的Obue011ject属性加到OLE对象名当中。 5、使用OLE对象的方法 除了设置和读取OLE对象的属性外,还可以使用OLE对象的方法来操作OLE对象。例如,下面的程序使用了Exue011ceL对象的Add方法来创建ExceL工作簿,然后使用Save方法保存该工作簿,并使用Quit方法结束ExceL的本次运行: oLeApp=CREATEOBJECT(”Exue011ceL.AppLication”) oLeApp.VisibLe=.T. oLeApp.Workbooks.Add oLeApp.CeLLs(1,1).VaLue=7 oLeApp.ActiveWorkbook.SaveAs(”C:TEMP.XLS”) oLeApp.Quit 与使用属性一样,如果用容器控件创建对象,应确保将“Object”加到引用对象方法的控件名称当中。 6、访问集合中的OLE对象 一个对象类型可以代表单个对象或若干相关对象的集合。 在程序中,集合是一个未经排序的链表结构,每当有对象被添加到集合中或从集合中移去时,其余对象的位置都可能改变。使用集合的Count属性对集合遍历,可以访问集合中的所有对象。Count属性可用来返回集合中项的数目。另外,可以使用Item方法返回集合中的某一项。 也可以访问集合内的集合。例如,使用下列程序代码可以在一个单元格区域内访问某一单元格集合: oLeApp=CREATEOBJECT(”ExceL.sheet”) oLeApp.Range(oLeApp.CeLLs(1,1),oLeApp.CeLLs(10,10)).VaLue=100 7、使用OLE对象的数组利用OLE技术,不但可以将数组传递给OLE对象的方法,而且可以接收OLE对象传来的数组。传递数组的方式必须是按引用传递,即必须在数组名前加@符号(用VFP不能将二维以上的数组传递到OLE对象中)。例如,要发送一个VFP数组到ExceL中,可以使用以下程序代码。它先在VFP中创建一个数组,给数组赋一些值,然后启动ExceL,创建一个工作簿,并给工作表的第一个单元格设置一个初始值,再将此值复制到数组中的其他工作表中:其中用到了ExceL的工作簿集(Workbooks对象),工作表集(Sheets对象)的相关属性及方法和ExceL对象的GetCustomListContents方法。下列代码将数组传递给方法FiLLAcrossSheets,以便将Sheet1中的第一区域内容复制到其它工作表的相同区域。 DIMENSIONaV(2) aV(1)=〃Sheet1〃 aV(2)=〃Sheet2〃 oLeApp=CREATEOBJECT(〃Exue011ceL.AppLication〃) oLeApp.Workbooks.Add oLeI=oLeApp.Workbooks.Item(1) oLeI.Sheets.Item(1).CeLLs(1,1).VaLue=100&&初始值 oLeI.Sheets(@aV).FiLLAcrossSheets(oLeI.Worksheets(〃Sheet1〃).CeLLs(1,1)) oLeApp.VisibLe=.T. 下列代码将一个数组返回到VFP,并显示数组的内容: oLeApp=CREATEOBJECT(〃Exue011ceL.AppLication〃) aOLeArray=oLeApp.GetCustomListContents(1)&&改变数组下标可以显示其它内容 FORnIndex=1toALEN(aOLeArray) ?aOLeArray(nIndex) ENDFOR

delphi 中 控件 outline 的使用

用outline不知道怎么实现用treeview控件还是可以的。

delphi 中的move()和pos()函数究竟是怎样用的?

Delphi没有move函数吧?函数的用法,推荐你去下载一个PDF文档《Delphi函数参考大全》,里面几乎包括了所有常用的函数。百度可以搜到。

Delphi中 override和overload有什么区别

1.方法的重写Overriding和重载Overloading是Java多态性的不同表现。重写Overriding是父类与子类之间多态性的一种表现,重载Overloading是一个类中多态性的一种表现。如果在子类中定义某方法与其父类有相同的名称和参数,我们说该方法被重写 (Overriding)。子类的对象使用这个方法时,将调用子类中的定义,对它而言,父类中的定义如同被“屏蔽”了。如果在一个类中定义了多个同名的方法,它们或有不同的参数个数或有不同的参数类型,则称为方法的重载(Overloading)。Overloaded的方法是可以改变返回值的类型。2. Delphi 的函数覆盖(Override)与重载(overload)而Delphi 就是用override 关键字来说明函数覆盖的。被覆盖的函数必须是虚(virtual)的,或者是动态(dynamic)的,也就是说该函数在声明时应该包含这两个指示字中的一个,比如:procedure Draw; virtual;在需要覆盖的时候,只需要在子类中用override 指示字重新声明一下就可以了。procedure Draw; override;
 首页 上一页  1 2 3 4 5  下一页  尾页