Jump to content

Pat Foley

Members
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

3 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. C:\Program Files (x86)\Embarcadero\Studio\20.0\bin what error(s) does clicking on bds.exe show in above directory. I put a bds.exe on win 7 and its error message "xxx.bpl missing...Try reinstalling the program" Walk up the error messages displayed fixing the errors or simply reinstall.
  2. Pat Foley

    Panel invalidate won't refresh information.

    If that's all you need just try show or set focus event to get the windows attention. I think it would work better without the thread your callback event would simply wait its turn behind mouse events.
  3. Pat Foley

    Strange new behavior TDBEdit

    I would put a breakpoint on the helper form.show line. Or simply drag the mainform around to see if the form is lurking behind.
  4. Pat Foley

    SMS via my phone..

    Lifted from How to Send Text From Computer (6 Working Ways) 2019 (techviral.net // In Email account use following for address Now in the field To you will write the mobile_number@carrieraddress according to your carrier addresses given below: -> AT&T: number@txt.att.net -> T-Mobile: number@tmomail.net -> Verizon: number@vtext.com -> Sprint: number@messaging.sprintpcs.com or number@pm.sprint.com -> Virgin Mobile: number@vmobl.com -> Tracfone: number@mmst5.tracfone.com -> Metro PCS: number@mymetropcs.com -> Boost Mobile: number@myboostmobile.com -> Cricket: number@sms.mycricket.com -> Nextel: number@messaging.nextel.com -> Alltel: number@message.alltel.com -> Ptel: number@ptel.com -> Suncom: number@tms.suncom.com -> Qwest: number@qwestmp.com -> U.S. Cellular: number@email.uscc.ne // Note the site has things not to click on but does mention hooking a phone into windows 10 session which I haven't tryed. I know above works well with phonenu@vtext
  5. I think using verbs is better. //old way procedure runTimer(bRuntimer); timer.enabled := bRuntimer; // better two procedures Procedure Run timer.enabled := True; Procedure Stop timer.enabled := False; // later expand the functionality Procedure Step timer.enabled := False timer.timer // to walk through code // // Nick Hodges in his book says always program against an interface. I say always program against a 5 inch X 3 inch UX or 3 X 5 UI. Also consider this for codebase T: Boolean Inside procedure What T := T and B or A Doing this preserves the T incoming state. This latching allows T's state set elsewhere be used reducing the tests in What.
  6. Pat Foley

    Converting C struct to Delphi

    On the Gary Darby site http://delphiforfun.org/Programs/oscilloscope.htm said "I cleaned up a few things ... using Windows wavein API multistep protocol" It is a fantastic straddle.
  7. Pat Foley

    Turn off title on a TImage??

    Too many dog ears dog ears = tabs
  8. Pat Foley

    Turn off title on a TImage??

    Or in Design window the switch is in Options Show components captions
  9. Pat Foley

    Turn off title on a TImage??

    Pretty sure TImage does not have caption prop View the xxx.bmp in Pbrush to if text captured in original image. D10.4.1 Out of text view of .DFM object Image2: TImage Left = 0 Top = 0 Width = 360 Height = 249 Align = alClient Picture.Data = { 07544269746D61704E010100424D4E0101000000000036040000280000006301 0000B6000000010008000000000018FD00000000000000000000000100000000 ...
  10. Pat Foley

    Popup window with focus inside.

    Here's a screen shot of code realized.
  11. Pat Foley

    Popup window with focus inside.

    These forms show using CB items being created once referred then after. Showing the CB dropdown using messages. Using the CB to navigate other forms using only one list. Most of it is done by creating the ancillary form(s) in runtime. unit mainFocused; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Edit1: TEdit; Memo1: TMemo; mainCB: TComboBox; procedure Button1Click(Sender: TObject); procedure FormClick(Sender: TObject); procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure Button2Click(Sender: TObject); procedure Memo1Change(Sender: TObject); procedure Edit1Change(Sender: TObject); procedure FormCreate(Sender: TObject); procedure mainCBChange(Sender: TObject); private { Private declarations } public { Public declarations } formsSL, Headings: Tstrings; destructor Destroy; override; end; var Form1: TForm1; implementation uses formAncillary; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin Headings.text := edit1.Text; UF.IniZ(self, formsSL, Headings); end; procedure TForm1.Button2Click(Sender: TObject); var I,C: integer; F: TForm; Ctrl: Tcontrol; begin with Screen do begin for I := 0 to formCount - 1 do // downto 0 do begin F := Forms[I]; for C := 0 to F.ComponentCount - 1 do if F.Components[C] is TCombobox then begin Ctrl := F.Components[C] as Tcontrol; F.Show; Ctrl.parent.Show; Ctrl.Show; caption := F.Name; sleep(20); Ctrl.Perform(CB_ShowdropDown,1,0); application.ProcessMessages; sleep(1200); Ctrl.Perform(CB_ShowdropDown,0,0); application.ProcessMessages; Break; end; end; Headings.Text := Headings.Text + format(' %d',[I]);//I.ToString; end; end; destructor TForm1.Destroy; var I: integer; begin onclick := nil; with Screen do begin for I := formCount - 1 downto 0 do begin Forms[I].close; end; end; end; procedure TForm1.Edit1Change(Sender: TObject); begin Headings.Text := Edit1.Text; end; procedure TForm1.FormClick(Sender: TObject); begin Caption := 'clicked by ' + (Sender as TForm).Name; Self.Show; Button1.SetFocus; end; procedure TForm1.FormCreate(Sender: TObject); begin Headings := TStringList.Create; formsSL := mainCB.items; //borrowing created list formsSL.Add(self.Name); end; procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin Caption := 'Mouse over ' + (Sender as Tcontrol).Name; end; procedure TForm1.mainCBChange(Sender: TObject); var I: integer; S: String; begin for I := 0 to Screen.FormCount - 1 do begin S := mainCB.Items[mainCB.ItemIndex]; if S <> Screen.Forms[I].name then continue else Screen.Forms[I].show; end; end; procedure TForm1.Memo1Change(Sender: TObject); begin beep; end; end. Runtime created unit formAncillary; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls; type TfrmAncillary = class(TForm) Button1: TButton; Image2: TImage; remoteCB: TComboBox; procedure Button1Click(Sender: TObject); procedure remoteCBChange(Sender: TObject); procedure remoteCBDropDown(Sender: TObject); private { Private declarations } public { Public declarations } myHeadings, myLines: Tstrings; rfrmBoss: TForm; procedure IncomingTextUpdate(Sender: TObject); procedure ForwardFocus(Sender: TObject); procedure IniZ(bossForm: TForm; someLines, Headings: Tstrings); end; var UF : TfrmAncillary; implementation {$R *.dfm} procedure TfrmAncillary.Button1Click(Sender: TObject); begin beep; end; procedure TfrmAncillary.remoteCBChange(Sender: TObject); var I: integer; S: String; begin for I := 0 to Screen.FormCount - 1 do begin S := remoteCB.Items[remoteCB.ItemIndex]; if S <> Screen.Forms[I].name then continue else Screen.Forms[I].show; end; end; procedure TfrmAncillary.remoteCBDropDown(Sender: TObject); begin remoteCB.Items := myLines; remoteCB.Text := myHeadings.Text; end; procedure TfrmAncillary.ForwardFocus(Sender: TObject); begin rfrmBoss.OnClick(self); end; procedure TfrmAncillary.IncomingTextUpdate(Sender: TObject); begin remoteCB.Invalidate; end; procedure TfrmAncillary.IniZ(bossForm: TForm; someLines, Headings: Tstrings); begin Application.CreateForm(TfrmAncillary, UF); with UF do begin mylines := someLines; myHeadings := Headings; remoteCB.Items := someLines; name := 'UF_' + Screen.FormCount.ToString; myLines.Add(name); Caption := name; setbounds(10,20,360,270); rfrmBoss := bossForm; onclick := ForwardFocus; onmousedown := nil; onmouseMove := bossForm.OnMouseMove; Color := RGB(random(255),random(255),random(255)); show; end; end; end.
  12. Pat Foley

    Popup window with focus inside.

    Good points. Where I am the users don't use keyboards or even have them in some rooms. the application writes messages to combo boxes. So over the years forgot some applications would allow user to change information in a combo box.
  13. Pat Foley

    Popup window with focus inside.

    Most users do not know that they can edit in combo box but they do know that they can see old 'text messages' with dropdown. It depends on purpose in application.
  14. Pat Foley

    Popup window with focus inside.

    Sorry viewer = "UI" "UX". Correctly the term should be viewport. Memo1.text := 'Allows this text to be viewed' Since the CB has a text and dropdown we need pass string and strings to keep it updated. The improvement is rather than passing the information each time. We simply update using the references provided in the creation of form. I suspect some programs use timers to provide updates. I will try to improve naming of the examples say 30 hours out.
  15. Pat Foley

    Popup window with focus inside.

    The combo box (CB) should only be used as a viewer. To set up a CB viewer do this This scheme lets simple Tform, TStrings, {String} to allow code reuse. {String} Is commented out untried but someLines will show current memo lines readily. the memo.sel is not needed here. presented simply to provide message flag to find its sisters in the source. in TfrmdrawFocused ... myLines: Tstrings; myCBtext: String; .. procedure TfrmdrawFocused.IniZ(anOwnerForm: TForm;var someLines: Tstrings; {aText: string}); begin Application.CreateForm(TfrmdrawFocused, UF); with UF do begin mylines := someLines; {myCBtext := AText} // remoteCB.Items := someLines; does not work needs freshened {remoterCB.Text := aText} name := 'UF' + Screen.FormCount.ToString; Caption := name; setbounds(10,20,360,270); toFocusAhead := anOwnerForm; onclick := ForwardFocus; onmousedown := nil; onmouseMove := anOwnerform.OnMouseMove; Color := $1E69D2; show; end; end; ple
×