

limelect
Members-
Content Count
923 -
Joined
-
Last visited
-
Days Won
1
Everything posted by limelect
-
Delphi's code formatter vs. GExperts' code formatter
limelect replied to dummzeuch's topic in GExperts
@dummzeuch Kind of off-topic What I liked very much with DelForExp that you could format the whole project. -
I just did something similar for my project 1.put TRxWindowHook 2. associate with your control . in my case it was a memo. catch Cnt C put this KeyCount boolean procedure TForm2.RxWindowHook1BeforeMessage(Sender: TObject; var Msg: TMessage; var Handled: Boolean); begin if msg.msg = WM_KEYDOWN then begin if (msg.wparam = 17) then KeyCount := true else if (msg.wparam = 67) and (KeyCount = true) then begin KeyCount := false; DoNotCopy := True; << i needed that on cont C end else KeyCount := false; end; end;
-
Double-dabble to convert binary to decimal
limelect replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
@Darian Miller Just for fun JUST FOUND NO BRACKET IN MY SOURCE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! what an HTML PAGE !!!!! plz fix x:= StrToInt(s); <<<<<<<<<<<< cannot put bracket i unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, JvExStdCtrls, JvEdit, JvValidateEdit, Vcl.Mask, JvExMask, JvSpin; type TForm1 = class(TForm) Button1: TButton; JvValidateEdit1: TJvValidateEdit; Label1: TLabel; Button2: TButton; JvValidateEdit2: TJvValidateEdit; Label2: TLabel; Button3: TButton; JvValidateEdit3: TJvValidateEdit; JvSpinEdit1: TJvSpinEdit; Label3: TLabel; Button4: TButton; Label4: TLabel; Label5: TLabel; Edit1: TEdit; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin Label1.Caption:='Answer'; Label2.Caption:='Answer'; Label3.Caption:='Answer'; end; procedure TForm1.Button1Click(Sender: TObject); //to binary var i,x:integer; ans:string; begin ans:=''; i:= JvValidateEdit1.Value; while i>0 do begin ans:=IntToStr(i mod 2) + ans ; i :=i div 2; //ans:=IntToStr(i mod 2)+ans ; //i :=i div 2; end; Label1.Caption:=ans; end; procedure TForm1.Button2Click(Sender: TObject); // to decimal var s:string; i,ans:Integer; begin ans:=1; s:=JvValidateEdit2.Text; for I := 1 to length(s)-1 do ans:=(ans*2) +StrToInt(s[i+1]); Label2.Caption:=IntToStr(ans); end; procedure TForm1.Button3Click(Sender: TObject); //fraction cal var f:real; i,x:integer ; ans:string; begin ans:='0.'; f:=JvValidateEdit3.Value; for I := 1 to Round(JvSpinEdit1.Value) do begin f:=f*2; x:=Trunc(f); f:=Frac(f); ans:=ans+IntToStr(x); end; Label3.Caption:=ans; end; // https://indepth.dev/the-simple-math-behind-decimal-binary-conversion-algorithms/ procedure TForm1.Button4Click(Sender: TObject); //binary to fruction var s:string; k:Real; i,x:Integer; ans:string; begin k:=0; s:=Edit1.Text; for I :=Length(s) downto 1 do begin x:= StrToInt(s); k:=(1/2)*(x+k); end; Label5.Caption:=FloatToStr(k); end; end. object Form1: TForm1 Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 283 ClientWidth = 552 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -13 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnCreate = FormCreate PixelsPerInch = 120 TextHeight = 16 object Label1: TLabel Left = 335 Top = 35 Width = 37 Height = 19 Caption = 'Label1' end object Label2: TLabel Left = 335 Top = 73 Width = 37 Height = 16 Caption = 'Label2' end object Label3: TLabel Left = 335 Top = 119 Width = 27 Height = 16 Caption = 'anse' end object Label4: TLabel Left = 187 Top = 155 Width = 16 Height = 21 Caption = '0.' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -17 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False end object Label5: TLabel Left = 335 Top = 159 Width = 27 Height = 16 Caption = 'anse' end object Button1: TButton Left = 66 Top = 32 Width = 110 Height = 25 Caption = 'To Binary' TabOrder = 0 OnClick = Button1Click end object JvValidateEdit1: TJvValidateEdit Left = 182 Top = 32 Width = 121 Height = 24 CriticalPoints.MaxValueIncluded = False CriticalPoints.MinValueIncluded = False EditText = '582' TabOrder = 1 end object Button2: TButton Left = 68 Top = 70 Width = 108 Height = 25 Caption = 'To Decimal' TabOrder = 2 OnClick = Button2Click end object JvValidateEdit2: TJvValidateEdit Left = 182 Top = 70 Width = 121 Height = 24 CriticalPoints.MaxValueIncluded = False CriticalPoints.MinValueIncluded = False EditText = '1001000110' TabOrder = 3 end object Button3: TButton Left = 66 Top = 116 Width = 110 Height = 25 Caption = 'Fruction Calc' TabOrder = 4 OnClick = Button3Click end object JvValidateEdit3: TJvValidateEdit Left = 182 Top = 117 Width = 121 Height = 24 CriticalPoints.MaxValueIncluded = False CriticalPoints.MinValueIncluded = False DisplayFormat = dfFloat DecimalPlaces = 10 EditText = '0.24' TabOrder = 5 end object JvSpinEdit1: TJvSpinEdit Left = 481 Top = 116 Width = 63 Height = 24 MaxValue = 10.000000000000000000 MinValue = 1.000000000000000000 Value = 8.000000000000000000 TabOrder = 6 end object Button4: TButton Left = 73 Top = 155 Width = 108 Height = 25 Caption = 'Binary Fruction' TabOrder = 7 OnClick = Button4Click end object Edit1: TEdit Left = 208 Top = 155 Width = 95 Height = 24 NumbersOnly = True TabOrder = 8 Text = '1011' end end -
Pining Expert program does not reopen on close program
limelect replied to limelect's topic in Delphi IDE and APIs
@Daniel Thanks -
Pining Expert program does not reopen on close program
limelect replied to limelect's topic in Delphi IDE and APIs
@Daniel Thanks -
Pining Expert program does not reopen on close program
limelect replied to limelect's topic in Delphi IDE and APIs
One more thing. I tried Gexpert demo project docking form example It has the same problem Is it an IDE problem or am I missing something? -
Pining Expert program does not reopen on close program
limelect replied to limelect's topic in Delphi IDE and APIs
@Daniel I hope this is better This is an IDE expert problem -
I do not know if it will help But Rxlib has has RxDateUtil.pas check it
-
Best way to prevent multiple instances? Mutex not working
limelect replied to bilbo221's topic in VCL
IsFirstInstance in OgFirst in tponguard librery for free does what you need. the above is old. The new onguard dose it differently but you can find here too Look for first instance https://documentation.help/TurboPack-OnGuard-FMX/documentation.pdf Put this function in the DPR -
Further to my small project and on D10.2.3 I am NOT using tool Pallet I am using ToolBar>Component as on d7. I want to detect the tabs and open one of them I am using also Winspector. FDelphiForm :=Application.MainForm; x:=TComponent(FDelphiForm.FindComponent('ComponentToolbarFrame')); x:=TComponent(x.FindComponent('TabControl'));<<< hear i tried also TTabControl instead of TComponent x IS NOT NIL. TTabControl(x).TabIndex:=3; <<<<< dose not work label1.caption:= TTabControl(x).Tabs[0] ; <<< Access violation Label2.Caption:=TComponent(x).name; ===TabControl Any thing with tabs give an error. I have tried many variations. As far as I recall @dummzeuch comented that multiline is not possible above D7 I tried it does not work. Maybe it is not possible to access the ToolBar ?
-
Found one drawback sx := TStringList(GetObjectProp(x, PropInfo)); // all the tabs this instruction cannot be made ONShow only On form create. It makes on second-time error. It has to execute only once. Which mean installing a new component will not update unless I restart Delphi.
-
Ok my software is OK Now for Embarcadero to give some Answers. I have 2 components bar. 1. D7 like. 2. Tool pallet. They differ in what the show position wise!!!!! For example, the Tool bar does not have BDE or ActivX in the same position !!!! What is going on?
-
@dummzeuch without your lead I could not have done it I was thrown away by thinking that it was TabControl Thanks Checking that it works got the list of my tabs sx=tstringlist PropInfo:= GetPropInfo(x.ClassInfo, 'Items'); sx:= TStringList(GetObjectProp(x,PropInfo)); Label2.Caption:=inttostr(Sx.Count); Memo1.Clear; for I := 0 to Sx.Count-1 do Memo1.Lines.Add(sx) ; Great why cannot write bracket i bracket ???????????
-
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/TypInfo.html Investigating
-
As of my last request reading an item like integer is no problem like PropInfo:= GetPropInfo(x.ClassInfo, 'LastShownIndex'); i:= GetOrdProp( x,PropInfo); Label2.Caption:=inttostr(i); But items=stringlist how?
-
@dummzeuch With the help of this link and IDE explorer IIIIII DDDDIDDDD IT. From here I got https://stackoverflow.com/questions/2071247/dynamically-access-a-property-in-a-delphi-component/2071398 var PropInfo: PPropInfo; x:=TComponent(x.FindComponent('TabControl')); PropInfo:= GetPropInfo(x.ClassInfo, 'TabIndex').; SetOrdProp(x, PropInfo, 3); it press tab 4. Thanks every body and see you on my next NOT EASY problem. P.S may some know how to get a list of items from PropInfo:= GetPropInfo(x.ClassInfo, 'Items') into StrinList?
-
The joke is on me. They did not implement it only the d7. Back to the search
-
I will look further with your advice that it is TGradientTabSet and not TabControl But if I use IDE explorer (sorry not yours) I see all the properties and I do not see TABS but Items so you might be correct On CnWizard there is something to associate the toolbar search for TGradientTabSet. I will investigate
-
Yes, I used your GREP already and I still, unfortunately, did not understand how to use it. Any idea? It will not work. For example, it has FTabList :TList; FTabList :TStringList; Is it allowed? Something fishy.
-
@dummzeuch I will try P.s i saw it before It is not implemented. No idea how to use it.
-
@dummzeuch Yes ClassName and more. Every thing checked. It is a TTabControl and I even did a hide that hides all the tabs. with IDE Explorer (Not yours) I can see all propeties. ComponentToolbarFrame>TabControl=TTabControl My only problem now is that TABS is not nil but using it give an error.
-
P.S TTabControl(x).Visible:=false; make all the tabs disapear. So I have control of the tabs but not on TTabControl(x).Tabs
-
@dummzeuch Thanks I used it. However, I sent you a personal mail with comments and changes to your software for you to add and publish. As for my problem, it seems I cannot reach the component tabs. Although TTabControl(x).Tabs in not nil it cannot be accessed.
-
I cannot find IDE Explorer. I use 1.3.11.64 experimental quit old I gess.
-
@dummzeuch I will try. However, what I did on each FindComponent I made sure it is not nil and save all components to file with ComponentCount Components.Name this how I found all the names.