Jump to content

Pat Foley

Members
  • Content Count

    367
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Pat Foley


  1. Something like this?     It's like Borland's old 'side kick' only expanded to switch between different desktops. The thing can focus GE stuff so very handy. Here's a good start on it.  

    Applister
    const
      hour2dot3 ='hr %2.3f ';   //hour meter style
      hour2dot3wS ='hr %2.3f %s';
    
      GoodApps: Tarray<string> = ['Notepad', 'TAppBuilder', 'Window', 
       'Chrome_WidgetWin_1', 'Notepad++', 'TfrmMultiMain'];
    
    type
      ptrApp = ^TApp;
      TApp = record
        Handle: HWnd;
        ...
      end;
        
      TptrApps = class(Tlist<ptrApp>)
        AppBuilderCount: Integer; // mark BDS's as loaded    
        slLog: TStrings;  //ref to CB.Items
        sBanner: PString;  
        sgGrid: TStringGrid; //ref to Sg
        ChBx: TCheckListBox; //ref to chLB
        ...
      end;  

     

    MTD.thumb.png.9b0534361b64f85f330ae9e7d4c4f56a.png


  2. On 5/8/2023 at 7:16 AM, David Schwartz said:

    Any ideas?

    Use Android Studio and select Web App 🙂

     

    I like to use SMS since most phone message apps can dial the phone number or map the street address in the incoming text.    You just send a text to your phone number to start.  

     

    To connect from email use (Pho)-Num-ber@phonecompanytxtservice.com which most companies provide.

     

    Pat  


  3. On 4/12/2023 at 3:53 PM, S1ack said:

    OK, also not sure what to do with that.

    • Still should follow National Fire Code and National Electric Codes. 
    • Should able to type in a desired color number vs messing with editor.
    • Copying controls off the design screen into Notepad++ allows an easy compare of contents.

        The coloring of the controls was changed when a door interlock was added which caused the original 20 displays to lose their ability to reflect the status. The added control's status colors magic numbers were used to code the status color value somewhat then status color changes were commented out for original displays. Reverting to original intent colors reflecting status for all depictions could readily implemented.  

       Attached shows Two of Tee's added following their status settings all the controls are having their Color0 set. I added a diamond and alert kind. 

    Pat

    displayapp_4YvDlxOa2d.gif


  4. 14 minutes ago, Willicious said:

    Can you give an example of what you mean here? Also, how does this differ from the way I've set the Booleans already?

    I am thinking you may still have on change events connected to the buttons.  If so set a break point in a change event to see what can happen!   

    procedure TForm4.RadioGroup1Click(Sender: TObject);
    begin
      var rg :=  sender as TRadioGroup;
    
      case TuserSound(rg.itemIndex) of
       usHarsh:
         bTreble := True;
       usWarm:
         bBose := True;
       usBoomy:
         bSubwoofers := True;
      end;
    end;

     


  5. 1 hour ago, Willicious said:

    Can anyone see where I'm going wrong, and what I need to do to fix it?

    Try this user friendly code with enum type  like ~TuserSettings = (spHash, spWarm, usJustRight) to line up the friendly strings.   Save  load the radiogroups item index.   Use the enumtype with a case to set any Booleans  

    object RadioGroup1: TRadioGroup
      Left = 136
      Top = 232
      Width = 185
      Height = 105
      Caption = 'Settings'
      Items.Strings = (
        'Harsh'
        'Accurate'
        'Warm'
        'Fuzzy')
      TabOrder = 2
    end

         


  6. I suppose the D5 copy is the owner's.  My concern are the gas trains meeting ASME codes for the interlocks to work properly.*  I been in a plant where an intern changed the overall 16 color scheme and some things quit working.  This image is marked up with where to click at to bring the color property editor. Also a text box shows effect of copying a shape control and pasting it into a text editor. 

    * Not jumper wired or modified to prevent Tripping.

    Screenshot 2023-04-06 141110.png


  7. 18 hours ago, programmerdelphi2k said:

    // Application.MainFormOnTaskbar := True;

    Alt method for showing forms is using createparams in the forms. Then you can reinstate the OnTaskbar switch.  

     

    
       protected
         procedure CreateParams(var Params: TCreateParams) ; override;
    ...
    // This fixes alt tab issue showing selected form on top!
    procedure TfrmView.CreateParams(var Params: TCreateParams);
    begin
      inherited;
      Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
    end;

     

     

     


  8. 8 minutes ago, S1ack said:

    Does the above hits 'make it so'? i.e. your 'dropped on the form' is what happened.

    Yes, but it appears that the dfm was saved in binary.  Reading in text editor is enhanced when saving dfm as text. 

     

    Besides the standard TButton and TControls like VB, Delphi user could build or be provided a custom Control to drop on form (even nonvisual controls). The package or library is *.dpk that puts the Control on the rail and registers the control so IDE "knows" what is dropped in design window.  These components are streamed in and their events connected at runtime.


  9. Check the .dfm files by using a text editor. Most likely the classes you are looking were dropped on the form back in '97.  If so, you load those into IDE using package(s) *.dpks before opening the unit.pas   The unit's dfm loads with the {$rec *.dfm} directive in the implementation, or the classes could be loaded at runtime If available and pathed as p'2K mentions.  

     

    I think I have an Omron under the bench somewhere but it uses a 232 port. Sorry.    

    Pat


  10. 4 hours ago, Dalija Prasnikar said:

    procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose := not Processing; end;

    I like that I have used just a showmessage when CanClose is false;


  11. I am getting weary of 16/9 screens. 

     

    To get by I use the Tmemo.

      object Memo1: TMemo
        Left = 528
        Top = 66
        Width = 701
        Height = 569
        Lines.Strings = (
          'SELECT'#65279
          'DATE_FORMAT(co.order_date, '#39'%Y-%m'#39') AS order_month,'
          'DATE_FORMAT(co.order_date, '#39'%Y-%m-%d'#39') AS order_day,'
          'COUNT(DISTINCT co.order_id) AS num_orders,'
          'COUNT(ol.book_id) AS num_books,'
          'SUM(ol.price) AS total_price,'
          'SUM(COUNT(ol.book_id)) OVER ('
          '  ORDER BY DATE_FORMAT(co.order_date, '#39'%Y-%m-%d'#39')'
          ') AS running_total_num_books'
          'FROM cust_order co'
          'INNER JOIN order_line ol ON co.order_id = ol.order_id'
          'GROUP BY '
          '  DATE_FORMAT(co.order_date, '#39'%Y-%m'#39'),'
          '  DATE_FORMAT(co.order_date, '#39'%Y-%m-%d'#39')'
          'ORDER BY co.order_date ASC;'
          ''
           'end')
        TabOrder = 6
      end

     From the .dfm  
     


  12. 14 minutes ago, programmerdelphi2k said:
    • many IDE open, you can have many files (copy) opened!
    • Code Editor allow +1 window of same unit file opened
    • share file can cause confusion of course! the human-memory can fail :)))

    When saving said open file in one IDE, the other open IDE when focused will show fileXXX timedate changed update?  A Change in the DFM is called a in memory change as well!   Doing that will synchronize or import the changes to that IDE. // A change in a custom component needs a little more to see changes in the dfm.  

     

    Control-b will show the pathed files 

     

     


  13. 22 hours ago, PeterBelow said:

    The only thing that package does is registering the component, i. e. it contains the Register procedure the IDE looks for to add the component to the palette.

    That and reading the link got me running again.  In the past Before 11 I tried have design only.

    Quote

    "Later you compile your component again, as a Win64" from mentioned link

    I was not recompiling in 64.  

    Thanks Pat


  14.  I have noticed that Delphi adds Ios and Android deploy information even for packages.
       What switch adds this to .dproj
        <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>

     

      How to set the unit output for 32 and 64 in a MyPackage? 
      
      I tried the codegear dslusr and it would not allow dropping the control on a form in 64 mode. Controls could be placed on form in 32 mode though. I removed and made a fresh package that allows the controls to be placed on form. 🙂 

     

    And what about Versioning? 
      
      The following always brings 1.0.0 for myapp.  
     

    function TptrApps.getVersionasString(inAppName: string): string;
    var
      Major, Minor, Build: Cardinal;
    begin
      Try
        Major := 6;
        Minor := 6;
        Build := 6;
        GetProductVersion(inAppName, Major, Minor, Build);
        result := Format('%d.%d.%d', [Major, Minor, Build]);
      Except
        on E: Exception do
          result := E.ClassName + ':' + E.Message
        else
          result := 'Trouble ';
      End;
    end;

    Thanks, Pat


  15. 1 hour ago, Dalija Prasnikar said:

    have noticed that switching between platforms often chokes if you just compile or do syntax check. Full build works. It seems like some internal compiler status or cache is not properly cleaned during platform switching. 

    So, when error 2048 shows after switching platforms; Just switching back clears it. Which is pretty cool that 11.3 can recover.   

     

    The Syntax check magic does not work as well when installing a package.  That needs to be compiled to lose the vintage dcus/BPL.  In my case ignoring compiler warning about implicit files in a package build results in error 2048.  I just don't know how make separate include files for the different platforms and perhaps csDesigning mode bypass  so procedure not used in design mode is needed.       


  16. 3 hours ago, Stano said:

    You probably confirm what I wrote today. Big project - no problems. A small project - there are problems.
    Emb I know about it. He doesn't know why. Apparently, they would need some small project where they could study it. I don't have on

    Guess 1. windows freshens memory shuffle for big program that is grabs files from the files needing to written to disk 3.5 gigs on my machine.  This feature saves say 3 minutes on reboot buts retains the cache wreck 😞  Fix Kill some msedgebrower.x off vs reboot

       
    Guess 2. Windows swap file uses compressed memory. This compressed memory is shuffled in/out? on big job. 
    Fix shut off the swap file.


    Guess 3. Run apps like D and edge in full screen so Windows can manage memory for running apps better.  

     

    Knowing the above in 64 yields a running program with clickable menu items in Ide.    

    Here's what I did to find a problem switching to win11 machine I must have set build with runtime packages under packages. clicking find unit under Refactor yields what the IDE knows. The center forms show before after.

    Guess 4. ctrl Mouse down is to be shut down when App is running? IDE He (or She let's say D for Diapered) must think the program is compiled and running!  This is on win 11 D11.1

    64bit release 3.png


  17. 3 hours ago, Henry Olive said:

    if MyForm = Nil then
         MyForm := MyForm.Create(Self); // Problem is here,  even if i use  MyForm := TMyForm.Create(Self)

     MyForm.Show;
    end;

       

     You could try this if you want a form without a dfm. 

         MyForm := MyForm.TCreateNew(Self);  //was  MyForm := MyForm.Create(Self);

         //

        defaultDataGrid := Tdbxx.Create and set

        //Note add alignment after pix  

     Otherwise just autocreate your cardform.  As other's have mentioned what is it.

    procedure TfrmGettingStarted.Button3Click(Sender: TObject);
    var
      boardForm:TForm;
      boardGrid: TDBGrid;
    begin
      boardForm := TForm.CreateNew(Application);
    
        boardGrid:= TDBGrid.Create(boardform);
        boardGrid.Parent := boardForm;
        boardGRid.Align := alClient;
        boardGrid.DataSource := dsProducts;
    
      boardForm.Show;
      boardGrid.Show;
    end;

     

     

    new.png

×