有什么区别
TFuncOfIntToString = reference to function(x: Integer): string;
Run Code Online (Sandbox Code Playgroud)
和
TFuncOfIntToString = function(x: Integer): string of object;
Run Code Online (Sandbox Code Playgroud)
我使用的是对象
我的应用程序基于MainForm,DetailForms和DialogForms.在任务栏上,我可以看到MainFormButton以及DetailForms.因此我使用:
procedure <DetailForm>.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
Params.WndParent:= GetDesktopWindow;
end;
Run Code Online (Sandbox Code Playgroud)
我使用delphi 2010并设置了Application.MainFormOnTaskbar:= True; 当我在Detailform中使用PromptForFileName或TSaveDialog时,DetailForm会在Mainform后面.关闭对话框后,DetailForm返回.
当我使用DialogForm(具有属性PopupMode:pmAuto的TForm的Showmodal)时,我的DetailForm保持在主和对话之间.如何强制TSaveDialog像一个showmodal与属性PopupMode:pmAuto或如何防止我的detailform落后于mainform
演示:
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Run Code Online (Sandbox Code Playgroud)
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ImgList, ActnList;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations } …Run Code Online (Sandbox Code Playgroud) 在使用FMX.Helpers.Android for XE6时,存在SharedActivityContext
但对于XE7,我在使用FMX.Helpers.Android时找不到SharedActivityContext.还有另一种方法是将它转移到另一种用途吗?
是否可以知道函数或过程是私有的,受保护的还是公共的.现在我必须滚动到顶部以查看方法是否是私有的.是否有工具或结构(代码资源管理器),以查看方法是私有,受保护或公共whitout滚动到顶部.
例:
unit .....
// 100 line code
private
// 1000 line code
procedure A(); // <-- Here I can't see if the procedure is private. Must scroll to the top
// 2000 line code
...
procedure A(); // <-- Here I can't see if the procedure is private. Must scroll to the top
begin
...
end;
Run Code Online (Sandbox Code Playgroud)
我现在唯一可以设置(私有,保护或公开)它的摘要描述
在Code Explorer中,我看到蓝色表示程序,绿色表示功能,但没有私人,受保护或公共图标.
我更改了探索代码的属性,现在我有私有,受保护或pulic的地图.
但是当我转到代码中的过程时,探索代码中没有像项目管理器视图中那样的选定项.探索代码的情况相同.必须向上滚动到地图以查看它是否是私有的,受保护的或公共的.一个替换是在搜索已探索的代码时编写方法.然后,这是一个提示弹出窗口.
我找到了可能的解决方案:将方法和过去复制到资源管理器代码的搜索框中.组合框列表弹出窗口给了我想要看到的内容(私有,受保护......)
我有一个问题,从SQL查询获得结果.我需要两个where子句的结果.我使用SQLServer2014
table1:产品
ProductID
1
2
3
4
5
Run Code Online (Sandbox Code Playgroud)
表2:供应商
SupplierID
1
2
3
Run Code Online (Sandbox Code Playgroud)
table3:Product_Supplier
ProductSupplierID|ProductID|SupplierID|Reference
1 |1 |1 |Ref001
2 |1 |2 |Ref002
3 |2 |1 |Ref003
4 |3 |2 |Ref004
5 |4 |2 |Ref005
Run Code Online (Sandbox Code Playgroud)
我想要的结果是当我设置:
其中(ProductID <4)和(SupplierID = 2)
我必须得到结果:ProductID 4下的所有产品都与SupplierID 2相关,如果Product_Supplier中不存在,我必须得到Reference = Null
ProductID|SupplierID|Reference
1 |2 |Ref002
2 |2 |Null
3 |2 |Ref004
Run Code Online (Sandbox Code Playgroud)
我启动一些sql脚本,但我无法得到正确的结果
select a.ProductID, b.SupplierID, C.Reference from Product as a
left outer join Product_Supplier as c on c.ProductID= a.ProductID
left outer join Supplier as B on …Run Code Online (Sandbox Code Playgroud)