Jump to content

Pat Foley

Members
  • Content Count

    367
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Pat Foley

  1. Pat Foley

    Keep D2006 vs Sydney aligned

    Very Good. I learned something too about default transparency being changed. I am working on a component that sighs, moans and grunts when Sydney gives up.
  2. Pat Foley

    Keep D2006 vs Sydney aligned

    Here is a paper by Marco Microsoft Word - Delphi-and-Unicode_Marco-Cantu.doc (embarcadero.com) What about editing your dfms in a memo. search for object: TLabel and insert the additional properties with offset. You just type the control type in one edit box and the offset to insert and property name value pair in additional edit boxes. when saved makes new improved dfm file. should be able to assign methods too. You need to cook your own search and insert coding. An improvement over the years is the flow panel. That may help in reducing number of views. Above is one way to make two way. You edit the dfms and change the objects types to TswLabels switched when running D10 to set the transparent property. and just TswLabel = class(TLabel) otherwise.
  3. Pat Foley

    CreateRectRgn Someone knows how to solve ?

    Some clues are clienttoscreen, windows.DrawFocusRect and .boundsrect. the form's mouse X is different than the screen's X.
  4. Pat Foley

    convert Procedure to a Unit??

    Could it be you wanting namespace? mainunithelpers.helpme in case you have other helpme procedures. I put drawing procedures in a routines.pas by adding arguments to the procedure being moved. The arguments use Timage, TPanel or TForm to reduce dependences. You simply pass the form you are working in to procedure into your routines.pas Unit routines uses forms; interface // Procedure DrawBackGroundBMP(const aWidth, aHeight: Integer; anImage: TImage); // TImage is best passing canvas is tough // procedure DrawthingsEX(athingList:Tstrings; aForm: TForm); //need to add forms to routines.pas // procedure DrawThings( aPanel:TPanel; Const FileandPathName:String; // aThingList:Tstrings; aForm: TForm); // A runtime control parent is assigned to aPanel and the controls onmousedown is assigned Aform.onMousedown procedure ShowBalloonTip(Control: TwinControl; Icon: integer; Title: pchar; Text: PWideChar; BackCL, TextCL: TColor); Implementation procedure ShowBalloonTip(Control: TwinControl; Icon: integer; Title: pchar; Text: PWideChar; BackCL, TextCL: TColor); const TOOLTIPS_CLASS = 'tooltips_class32'; TTS_ALWAYSTIP = $01; TTS_NOPREFIX = $02; TTS_BALLOON = $40; TTF_SUBCLASS = $0010; TTF_TRANSPARENT = $0100; TTF_CENTERTIP = $0002; TTM_ADDTOOL = $0400 + 50; WM_User = $01; TTM_SETTITLE = (WM_USER + 32); ICC_WIN95_CLASSES = $000000FF; type TOOLINFO = packed record cbSize: Integer; uFlags: Integer; hwnd: THandle; uId: Integer; rect: TRect; hinst: THandle; lpszText: PWideChar; lParam: Integer; end; var hWndTip: THandle; ti: TOOLINFO; hWnd: THandle; begin hWnd := Control.Handle; hWndTip := CreateWindow(TOOLTIPS_CLASS, nil, WS_POPUP or TTS_NOPREFIX or TTS_BALLOON or TTS_ALWAYSTIP, 0, 0, 0, 0, hWnd, 0, HInstance, nil); if hWndTip <> 0 then begin SetWindowPos(hWndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE); ti.cbSize := SizeOf(ti); ti.uFlags := TTF_CENTERTIP or TTF_TRANSPARENT or TTF_SUBCLASS; ti.hwnd := hWnd; ti.lpszText := Text; Windows.GetClientRect(hWnd, ti.rect); SendMessage(hWndTip, TTM_SETTIPBKCOLOR, BackCL, 0); SendMessage(hWndTip, TTM_SETTIPTEXTCOLOR, TextCL, 0); SendMessage(hWndTip, TTM_ADDTOOL, 1, Integer(@ti)); SendMessage(hWndTip, TTM_SETTITLE, Icon mod 4, Integer(Title)); end; end;
  5. Could 3D shutter glasses be rewired for your needs. Just wire the shutters to shutter together to reduce brightness.
  6. Design package DX still makes a BPL. Can the .dproj help switching the packages from 32 to 64 or hide them in mmx.
  7. Hopefully the experts will comment further. Custom components need to have unique names and learning how packages work use a project group.
  8. Pat Foley

    Mapping or Cartography, that's the question

    Track editor yielded music "track" first Trail Editor found following // did not try since not secure. Trail Tech's Ride Leader GPX Editing Software In the western mountains trails are called either, one track ~ one person wide or two track ~ wagon wide. Often web pages have embedded additional terms for the search engine to find. Meaning use your terms for product naming and add terms so others can find your site.
  9. Pat Foley

    Mapping or Cartography, that's the question

    the US has various terms for what think you are searching for. Sharing gps locations along a "trail" Outdoors Mobile Apps | AllTrails Example of "tracking" term. https://community.fitbit.com/t5/iOS-App/Why-does-Fitbit-track-my-location/td-p/2808126 May help with terms https://ortho.gis.iastate.edu/
  10. Pat Foley

    record with null-terminated string

    S:array[0..23] of ansichar THeader = Record flags : integer; dummy : integer; name: S; //padding: integer; end; That may be enough to get you started just determine the array size and the correct encoding. If you wanting to do the easy way use component streaming or simply loadfromfile and value pairs. This example was "streamed" by copying from design and pasted here. You can "stream" it by copying it and pasting in your design. object Memo1: TMemo Left = 56 Top = 40 Width = 185 Height = 89 Lines.Strings = ( 'Flag=true' 'Dummy=" "' 'name=Pete2005' '') TabOrder = 0 end
  11. Is there a Unit1 already present in the source folder, if not in the Project? When creating a new unit, the IDE looks at existing units in the folder and chooses the highest unused sequential number. Or in the Default folders under Tools either shared repository or Default project.
  12. Pat Foley

    GeocodeReverse on Android

    Hey, It must be same issue as before you need to force repaint. The FMX.locationdemo updated location data when I changed from map view back to show location data.
  13. Pat Foley

    GeocodeReverse on Android

    procedure TForm1.LocationSensor1LocationChanged( ... // Translate location to address if Assigned(FGeocoder) and not FGeocoder.Geocoding then FGeocoder.GeocodeReverse(NewLocation); //As described earlier, after Reverse Geocoding is completed, an OnGeocodeReverseEvent is fired. From sample. I will bring out the win 7 machine with the FMX stuff on it but probably two days out. I want to make two FMX programs this year Phone app that caches local data or least miles from North pole and miles West of home when cell towers down or out of range. A program to read topo map from Garmin 600t would nice too.
  14. Pat Foley

    GeocodeReverse on Android

    I just tried the FMX.locationdemo on my android and the current address is working on that demo. So maybe try the location demo and try edit boxes on it to see what that demo does.
  15. Pat Foley

    GeocodeReverse on Android

    Ok from your sample is your likewise event happening and is then using cached data or simply not getting new data since in background. procedure TForm1.LocationSensor1LocationChanged(Sender: TObject; const OldLocation, NewLocation: TLocationCoord2D); var URLString: String; begin // code for previous step goes here // Show Map using Google Maps URLString := Format
  16. Pat Foley

    GeocodeReverse on Android

    On webbrowser side try a reload. Or the equivalence of the F5 key in a webbrowser.
  17. 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.
  18. 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.
  19. 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.
  20. 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
  21. 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.
  22. 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.
  23. Pat Foley

    Turn off title on a TImage??

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

    Turn off title on a TImage??

    Or in Design window the switch is in Options Show components captions
  25. 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 ...
×