

Pat Foley
Members-
Content Count
424 -
Joined
-
Last visited
-
Days Won
2
Pat Foley last won the day on August 9 2023
Pat Foley had the most liked content!
Community Reputation
54 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
-
Retrieving outlook contact emails
Pat Foley replied to Connie McBride's topic in Algorithms, Data Structures and Class Design
I used the code for reverse phone lookup that's for an xxx with xx,xxx outlook accounts. You need to make a custom list of clients, a Client group email and ... then as employees come and go you add remove their access to the companies Client email account. Or you could enhance your application by logging when clients are added, contacted, removed from client list. I sent out emails and SMS each week to departments as client schedules were updated. -
Retrieving outlook contact emails
Pat Foley replied to Connie McBride's topic in Algorithms, Data Structures and Class Design
Again I would use OutLook to make the output using export. example mapping https://jkp-ads.com/rdb/win/s1/outlook/mail.htm Also here is some old (2017) Excel code from Ron's earlier site Sub DemoAE() Dim colAL As Outlook.AddressLists Dim oAL As Outlook.AddressList Dim colAE As Outlook.AddressEntries Dim oAE As Outlook.AddressEntry Dim oExUser As Outlook.ExchangeUser Set colAL = Outlook.session.AddressLists '("Offline Global Address List") For Each oAL In colAL 'Address list is an Exchange Global Address List If oAL.AddressListType = olExchangeGlobalAddressList Then Set colAE = oAL.AddressEntries For Each oAE In colAE If oAE.AddressEntryUserType = _ olExchangeUserAddressEntry _ Or oAE.AddressEntryUserType = _ olExchangeRemoteUserAddressEntry Then Set oExUser = oAE.GetExchangeUser ' Debug.Print (oExUser.JobTitle) ' Debug.Print (oExUser.OfficeLocation) ' Debug.Print (oExUser.BusinessTelephoneNumber) ' Range("A1").Offset(X, 1) = oExUser.JobTitle Range("A1").Offset(X, 9) = oExUser.ID 'OfficeLocation Range("A1").Offset(X, 8) = oExUser.MobileTelephoneNumber 'HomeTelephoneNumber Range("A1").Offset(X, 7) = oExUser.Name 'Range("A1").Offset(X, 5) = oExUser.PrimarySmtpAddress X = X + 1 End If Next End If Next End Sub -
Even holding the mouse over the symbol should show its unit and line! // since I loaded it look how TStrings Visualizer vs the IDE code screen in rendering in 12.2
-
Retrieving outlook contact emails
Pat Foley replied to Connie McBride's topic in Algorithms, Data Structures and Class Design
One way is save as .pst file or .csv file inside of Outlook. Second way is use VBA to learn the names of methods that Outlook uses to save lists in different formats. -
I think the issue lies in the coding, each series properties needed be updated consistently. This example shows renaming the series and the labels to allow a consistent means of updating the control. Consistently meaning each control deals only with the data it was named and Created for. procedure TForm1.Button1Click(Sender: TObject); const labelAft = 'Afternoon'; labelNite = 'Nite'; labelDay = 'Day'; ShiftDayFraction = 8/24; clNite = clRed; var seDay, seAfternoon, seNight: TGanttSeries; begin seDay := Series1; seAfternoon := Series2; seNight := Series3; seNight.Clear; seDay.Clear; seAfternoon.Clear; var addC: Boolean := CheckBoxBreakLabels.Checked; var startDate: TDateTIme := Now; startDate.SetTime(4, 0, 0, 0); seDay.AddGanttColor(startDate + ShiftDayFraction, startDate + 2 * ShiftDayFraction, 1, labelDay, clGreen); if addC then seAfternoon.AddGanttColor(startDate + 2 * ShiftDayFraction , startDate + 3 * ShiftDayFraction, 3, labelAft, clBlue); seNight.AddGanttColor(startDate, StartDate + ShiftDayFraction, 2, labelNite, clNite); // seNight.AddGanttColor(startDate, StartDate + ShiftDayFraction, 1, 'Sametimeline', clNite); end;
-
GroupDescendentsWith - Why 'TCustomAction' is promoted to TControl?
Pat Foley replied to GabrielMoraru's topic in VCL
So that it is found in the controls list of the control or component vs the components list of a form or application. -
Problem with selection markes in Delphi IDE for Controls with SubControls
Pat Foley replied to Tom Mueller's topic in Delphi IDE and APIs
Somewhere I have a control that draws a focus rect and tests rect intersect of all controls in componentlist to add to selected list. Just as lost is a control that draws a connector between selected controls using clienttoscreen. I will look for the controls later. I'll attach the mention control. Depending how you assign the mouse events either drop on the form or resize it manually the TCustomPanel does not have the align prop. Unsure why I was drawing the focus rect with DC back then. I use a Tshape brush style set to bsClear and pen dotted line now. -
Problem with selection markes in Delphi IDE for Controls with SubControls
Pat Foley replied to Tom Mueller's topic in Delphi IDE and APIs
To reveal the markers add to source or set in Object Inspector BorderWidth = 5 -
Problem with selection markes in Delphi IDE for Controls with SubControls
Pat Foley replied to Tom Mueller's topic in Delphi IDE and APIs
I should have included this procedure TTestSelectMarker.WMSIZE(var message: TWMSIZE); begin // FPanel.setbounds(10,10,Width- 2 * 10, Height - 2 * 10); Fpanel.Align := alClient; end; -
Problem with selection markes in Delphi IDE for Controls with SubControls
Pat Foley replied to Tom Mueller's topic in Delphi IDE and APIs
You need to add the paint event to draw the control in the IDE plus WMSIZE to allow sizing of controls being drawn. Changing to descend from Tpanel allows working control base to add control to. Later the control can be switched to TCustomControl or TWinControl. unit uTestSelectMarker; interface uses Classes, Vcl.Controls, Vcl.ExtCtrls, Winapi.Messages; type TTestSelectMarker = class(TPanel) //change to TcustomControl or TWinControl private FPanel: TPanel; protected procedure Paint; override; procedure WMSIZE(var message:TWMSIZE); message WM_SIZE; public constructor Create(AOwner: TComponent); override; end; procedure Register; implementation uses Graphics; constructor TTestSelectMarker.Create(AOwner: TComponent); begin inherited;// Create(AOwner); Color := clBtnFace; FPanel:= TPanel.Create(self); // FPanel.SetSubComponent(True); // Uwe mentioned this in SO post FPanel.Parent:= self; FPanel.BevelOuter:= bvNone; FPanel.Color:= clCream; FPanel.Visible := True; end; procedure Register; begin RegisterComponents('Test', [TTestSelectMarker]); end; procedure TTestSelectMarker.Paint; begin inherited; FPanel.Caption := Name; end; procedure TTestSelectMarker.WMSIZE(var message: TWMSIZE); begin FPanel.setbounds(10,10,Width- 2 * 10, Height - 2 * 10); end; end. -
Here's my logger I had suspected some issue with timer restarting I wrapped the timer event to disable the timer when in the event seemed to help and removed a show event on the logging form seemed to have fixed. The following sleep states are available on this system: //Pats win 11 pro Standby (S0 Low Power Idle) Network Connected Hibernate Fast Startup The following sleep states are not available on this system: Standby (S1) The system firmware does not support this standby state. This standby state is disabled when S0 low power idle is supported. Standby (S2) The system firmware does not support this standby state. This standby state is disabled when S0 low power idle is supported. Standby (S3) This standby state is disabled when S0 low power idle is supported. Hybrid Sleep Standby (S3) is not available. The hypervisor does not support this standby state. //Events app1 sidebar memoShowMessages h18.834 ZeroIndex 985940 Comp 199704 18.835 TSideBar on top//1 18.838 Shell_TrayWnd on top // closing logged on App1 18.858 Windows.UI.Core.CoreWindow on top//opening App1 18.861 LockScreenControllerProxyWindow on top 18.861 Shell_TrayWnd on top 18.864 TSideBar on top //events Second running App sidebar memoShowMessages 18.826 TSideBar on top 18.827 CabinetWClass on top 18.829 Shell_TrayWnd on top 18.834 on top 18.834 TSideBar on top //1 18.838 Shell_TrayWnd on top// closing logged on App2 18.858 on top 18.859 Windows.UI.Core.CoreWindow on top//opening logged on App2 18.861 LockScreenControllerProxyWindow on top 18.861 Shell_TrayWnd on top 18.864 TSideBar on top // made with this coding var TopWinControl: HWND; procedure TSideBar.TaskTimerTimer(Sender: TObject); const MAX_VALUE = 255; var pcClassName: Array [0 .. MAX_VALUE] Of Char; aClassName: string; Hnd: HWND; begin TaskTimer.Enabled := False; Hnd := GetForegroundWindow; // shows apps being used. if Hnd <> TopWinControl then begin TopWinControl := Hnd; GetClassName(Hnd, pcClassName, MAX_VALUE); aClassName := Trim(pcClassName); label1.Caption := aClassName; memoShowMessages.Lines.add(format('%2.3f %s on top', [Time * 24, aClassName]));//Screen.Forms[0].Name]); end; // show now can change bringtofront getfocus best not use here //boo 100xs Jumper.Show; // not needed and perhaps fighting the debugger TaskTimer.Enabled := True; end; Needs to be 64 bit.
-
Desktop App Development with Object Pascal
Pat Foley replied to PhilBoy's topic in Algorithms, Data Structures and Class Design
No Too much new stuff just I was switching to use bootstrap now they switched to CSS and "pseudo" buttons or maybe SVG based components in Laz. This use of Generics to hook up the tags in the IC to controls needs perhaps needs 500 words to describe the how and the why for it. No excuse for multiple seat reference when OP mentioned desktop though. -
Desktop App Development with Object Pascal
Pat Foley replied to PhilBoy's topic in Algorithms, Data Structures and Class Design
One. Generics allow the tags to be quickly set to the Sims IC initial conditions, adjusted with the various faceplates and output to the UI chart and legends. as so TsimUIout = Record faceplate: Tform; Controller:Tsimcontroller; Value: Pdouble; Span, Min: Integer; end; procedure Update; Compute; var UIstuff := TList<^TmyUIout>; for var ui in UIstuff do update; end; Two. Use a transpiler pas2js can emit JS that runs on a browser. Three. Value = validity, number of seats , subject matter. If the simulator can increase interaction and communication between the crew members during training-- knowledge transfer plus teamwork can happen 🙂 -
Desktop App Development with Object Pascal
Pat Foley replied to PhilBoy's topic in Algorithms, Data Structures and Class Design
Much of the roadmap should include reticulation of the system you are modeling. Bond graphs allow cause effect, modular construction, and the relationship between the domains to be surfaced with causal strokes the bonds (effort vs flow) are drawn . To avoid paying 20 K to Twente sim, I draw the system out in bound book. these drawings help in connecting sources to sinks. A book on bond graphs mentioned that eigenvalue would be easier to understand written as characteristic wert. 🙂 Delphi to Laz. // in lpr was dpr {$IFDEF FPC} {$MODE Delphi}// saves using specialize in generic constructs {$ENDIF} uses {$IFnDEF FPC} {$ELSE} Interfaces, // lets the laz work {$ENDIF} -
Making both vertical axis visible at all times in TeeChart
Pat Foley replied to dummzeuch's topic in VCL
I found this This one works well. Thank you pep. at http://teechart.net/support/viewtopic.php?t=4313