Jump to content

Pat Foley

Members
  • Content Count

    78
  • Joined

  • Last visited

Everything posted by Pat Foley

  1. Pat Foley

    Scanning and printing projects.

    What about using Model View as a start and save each UML Class Diagram. In the past I put start up data in non visual components at design time and years later spent a little time trying to determine how the program was able to start... Looking at the DFM component's event assignments is another part of how the program works. Here's a program for cad files. https://www.iseekcorp.com//copy-of-cadseek-adviser
  2. Try streaming Tpanel with child objects in it object Panel1: TPanel Left = 536 Top = 24 Width = 251 Height = 106 Caption = 'Panel1' ParentBackground = False TabOrder = 0 object Button2: TButton Left = 24 Top = 16 Width = 75 Height = 25 Caption = 'Button1' TabOrder = 0 OnClick = Button1Click end object Edit1: TEdit Left = 112 Top = 72 Width = 121 Height = 21 TabOrder = 1 Text = 'Edit1' end end Simply copy paste these into a form in design window. then follow delphi - How to save and restore a form? - Stack Overflow
  3. Pat Foley

    QueryPerformanceCounter precision

    There's some D5 code for adjusting 10MHz transmitters elsewhere on site https://vk4adc.com/web/index.php/software-projects/55-vk4adc-utils/181-gps2time
  4. Pat Foley

    Determining why Delphi App Hangs

    Disable the controls When data is loaded have future event enable controls. Rather than a progress bar have windows 10 olympic ring showing until future event happens.
  5. Pat Foley

    TTouchKeyboard when in modal dialog

    Question Is the modal box selections touchable? Should be able to change settings just touching and tapping. I would only surface the keyboard for passwords and text edits The Tnumberbox should be just the ticket here.
  6. Pat Foley

    Copy a form in a project?

    After saving as new form name Go in Object inspector and change the name of the form. the form new name is applied in the implementation as well. Or simply show controls in sequence setting visibility as needed.
  7. Pat Foley

    How to gracefully get rid of the use of dictionaries?

    You might consider white boarding or build simple model. Consider N,S,E,W as UI. Use a heading for instance. So the instance turns left West or right East when heading North. Heading South turning left means heading East on the UI. Then the business of quarter turns could be solved by quadants or (heading + 360 +/90) mod 360. Or given TDirection = (dirN, dirE, dirS, dirW) // note changed heading: TDirection; Const quarterTurn = 1 halfTurn = 2 //change direction by adding subtracting the turn Heading := TDirection((4 + ord(Heading) + quarterTurn)mod 4);
  8. Pat Foley

    How to compare performance between Delphi versions?

    I run 10.3 together with 10.4.1 and now 10.4.2. 10.2 seems old school
  9. Pat Foley

    TTreeNode leak when VCL styles are active

    some of the trouble is the windows need destroyed downto in for loop. Destroying the top window first changes the indexes of the window. So with for LItem in LItem in FRegisteredStyleHooks do LItem.Value.Free; We need a "downin" source VCl.themes line 7510. My take.
  10. Pat Foley

    IDE Hang

    TAppBuilder ... WindowsForms10.Window.8.app.0.1629f15_r56_ad1 This form found in search menu item Find Class shows whatever namespace is scoped in the editor. Once a "class" or whatever is in the namespace is selected it moves to it in the edit window. The find references can then be clicked. These "gems" would be nice if they didn't hang the program.
  11. Pat Foley

    Can Delphi randomize string 'Delphi'?

    Was thinking that its not getting up to 6 letters... So you saying simply throwing 6 dice with 52 lettered faces take more 2^10 throws.
  12. Pat Foley

    Can Delphi randomize string 'Delphi'?

    shouldn't cPhrases array be 0 based?
  13. Maybe a build all projects will surface them
  14. Pat Foley

    A Component Named xxxx Already Exists.

    I been having the same issues with some custom components added to a package. I renamed the old BPLs to BPLxxs and seemed to have fixed it. //The IDE uses BPLs for showing components in design Have you used shift+ctrl+F to look for compxxx. When it was happening the component disappeared taking its method assignments with it. I would start second IDE and load back up copy to copy and paste aberrant component with property and method assignments. // When compiler detects unitsearchpath error I cancel loading fix the path first. If you sanitized your system could the problem be transported in the myProject.dproj? Maybe compare with earlier dproj? 10.2.3 (is Stoic does not "leave the room" or disappear like 10.4) when using find class in search menu then control B to see paths in IDE code editor.
  15. Thanks. would creating a new form be good solution for this case.
  16. How to use Explicit properties to restore positions? Iteration or Is there simple revert message undocumented somewhere.
  17. Pat Foley

    A Component Named xxxx Already Exists.

    I been having the same issues with some custom components added to a package. I renamed the old BPLs to BPLxxs and seemed to have fixed it. Have you used shift+ctrl+F to look for compxxx. When it was happening the component disappeared taking its method assignments with it. I would start second IDE and load back up copy to copy and paste aberrant component with property and method assignments.
  18. Pat Foley

    IDE Hang

    https://stackoverflow.com/questions/6255248/controlclick-on-function-is-not-working-in-delphi-xe Just hovering over a unpathed unit in an uses clause can cause a quick ending. Issue with browsing path? The form screen position button in Design just happens to be in Bermuda triangle hot zone lower right hand code scrollbar edge.
  19. 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.
  20. 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.
  21. 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.
  22. 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;
  23. Could 3D shutter glasses be rewired for your needs. Just wire the shutters to shutter together to reduce brightness.
  24. Design package DX still makes a BPL. Can the .dproj help switching the packages from 32 to 64 or hide them in mmx.
  25. Hopefully the experts will comment further. Custom components need to have unique names and learning how packages work use a project group.
×