Pat Foley
Members-
Content Count
403 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Pat Foley
-
Is possible to examine the library-> search path when IDE not start?
Pat Foley replied to alogrep's topic in Delphi IDE and APIs
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. -
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.
-
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.
-
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
-
Is it really that bad to Use boolean parameters to make your functions do two things?
Pat Foley replied to Mike Torrettinni's topic in General Help
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. -
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.
-
Too many dog ears dog ears = tabs
-
Or in Design window the switch is in Options Show components captions
-
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 ...
-
Here's a screen shot of code realized.
-
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.
-
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.
-
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.
-
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.
-
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
-
There's a difference between focus and select. To help with combobox these bits should help. the Memo stuff only provides hints of selecting for your combobox //CB Recipe seasoning Procedure TG1.SelectMemoLine(Memo : TCustomMemo) ; Var LineNumber : Integer; Begin LineNumber := Memo.Perform(EM_LINEFROMCHAR, Memo.SelStart, 0); Memo.SelStart := Memo.Perform(EM_LINEINDEX, LineNumber, 0); Memo.SelLength := Length(Memo.Lines[LineNumber]) ; Memo.SetFocus; ... //CB dropdown freshened in the form procedure TfrmdrawFocused.remoteCBDropDown(Sender: TObject); begin remoteCB.Items := myLines; end; ... //CB text freshened with timer or update from mainform remoteCB.Text := referenced editbox.text from other form. remoteCB.Invalidate;
-
Here's a thought--take a screenshot and look for the mouse cursor? In the long past screen captures may had a cursor captured in it. Would cause great confusion with the running cursor. So the big G himself washes the imaged cursor out so you don't have too! Not exactly your question asked but a large part of why focus on active window is best.
-
runtime forms should feed mouseovers and form name back to creator form. Perhaps what you want is a windows balloon tip.
-
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; procedure Button1Click(Sender: TObject); procedure FormClick(Sender: TObject); procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } destructor Destroy; end; var Form1: TForm1; implementation uses unFocused; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin UF.IniZ(self); end; procedure TForm1.Button2Click(Sender: TObject); var I,C: integer; F: TForm; begin with Screen do begin for I := formCount - 1 downto 0 do begin F := Forms[I]; for C := 0 to F.ComponentCount - 1 do if F.Components[C] is TButton then begin F.Show; (F.Components[C] as TButton).parent.show; (F.Components[C] as TButton).Show; caption := F.Name; application.ProcessMessages; sleep(1200); Break; end; end; 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.FormClick(Sender: TObject); begin Caption := 'clicked by ' + (Sender as TForm).Name; Self.Show; Button1.SetFocus; end; procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin Caption := 'Mouse over ' + (Sender as Tcontrol).Name; end; end. unit unfocused; 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 TfrmdrawFocused = class(TForm) Button1: TButton; Image2: TImage; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } toFocusAhead: TForm; procedure ForwardFocus(Sender: TObject); procedure IniZ(anOwnerForm: TForm); Destructor Destroy; end; var UF, frmdrawFocused: TfrmdrawFocused; implementation {$R *.dfm} { TfrmUnfocused } procedure TfrmdrawFocused.Button1Click(Sender: TObject); begin beep; end; destructor TfrmdrawFocused.Destroy; begin tofocusAhead.free; inherited; end; procedure TfrmdrawFocused.ForwardFocus(Sender: TObject); begin //inherited; //squash local click toFocusAhead.OnClick(self); end; procedure TfrmdrawFocused.IniZ(anOwnerForm: TForm); begin Application.CreateForm(TfrmdrawFocused, UF); with UF do begin name := 'UF' + Screen.FormCount.ToString; Caption := name; setbounds(10,20,260,170); toFocusAhead := anOwnerForm; onclick := ForwardFocus; onmousedown := nil; onmouseMove := anOwnerform.OnMouseMove; Color := $1E69D2; show; end; end; end. Try these forms with aux forms Borderstyle set to bsnormal then no border.
-
The combo box drop down can only be opened in active window.
-
If there is flickering going on I would guess a onchange event is looping. radio buttons calling each other after being changed by the other. The user needs to know only one window is in focus at a time. To help the user we would still draw halo around the control using the popup, color the popup the same as launching form. Or showing form with image.picture.bitmap of a active form saved as bitmap would work when shown as toolbar. But not recommended.
-
Use the back of past year's calendar to draw out the redesign. Happy New Years.
-
Actually in VB I made video poker game. The enumerations allow say washing machine to be emulated when combined with a case statement. Each enum needs to be in order in the case statement. As you add more features you just insert additional enum. Also consider the scPlaying Its' ordinal value is zero so its first in case statement. More importantly it helps laying out the program. Until you get around to making the play routine routine it just passes through waiting for change in game status. I'll fab up a working example in week in week or two. A key or button click would change status then call procedure with case statement. Pascal with Excellence quotes Alexander Pope--A little learning is a dangerous thing, drink deep, or taste not. // I try to share knowledge so people need not read the documentation or hit a barn when learning to fly.
-
No need for that. Its your program and by doing it yourself will allow you to get higher up the hill. promote isplaying, isgameover,isplayer2turn booleans to enumeration of Tsolcon = (scPlaying, scGameover, scNewGameQ, scDeal) gamestatus:Tsolcon; global set gamestatus := scNewGameQ In a timer event place a case statement Case gameStatus of ... scNewGameQ: begin gamestatus := scDeal; // next timer event the code in scDeal will be called end; scDeal: //calls procedure dealCards end; Other events Buttonclick simply change gamestatus the timer's event acts on the status change
-
I used XL on Mac starting with 2 through XL 4. XL 4 added forms--by printing out the macro sheet and taping the sheets One had the big picture with all the forms and code together Not sure what goes on Apple side now. Example does not to be on macro sheet. cellname a b c 'name 'variable 'comment 'xvalue 1 'after being renamed "b2" shows as xvalue 'yvalue 1 'zvalue =xvalue+yvalue ' Naming ranges is number thing to do and use namemanager to help or F5 to navigate to named range F2 to edit in cell. To get VBA up <alt><f11> <alt><f10> new macro sheet? Also use record macro helps alot!I I been porting a XL Logging app to D. XL VBA is unsupported now. Easier to share install package then .xlsm today.