Jump to content

Jeff Steinkamp

Members
  • Content Count

    30
  • Joined

  • Last visited

Everything posted by Jeff Steinkamp

  1. I am attempted to do a bit of Word Automation. I have a template document for an evaluation report. I think I am able to search and replace text with the unique values for the report. But I have 3 images that I need to include in this report. I have not found any documentation on how to insert an image at a specific location, replace a dummy image with the current image, or replace text with the specific image. Can someone point me in the right direction? Thanks
  2. Jeff Steinkamp

    Print TDBGrid

    The community version of Delphi 11 does not contain any Reporting Components and I'm not going to spend a boatload of money for a component that I will rarely use. Can someone point me in the direction to help me devise a quick and easy way to send the data I have in a DBGrid to a printed output. I do have a couple of PDF components that should do this, PowerPDF and Winsodt's TPDF, but I am unbale to find much in the way of basic documentations for either of these components. Any hep will be much appreciated.
  3. Jeff Steinkamp

    Print TDBGrid

    Where is it?? I do not find any component called Fast Reports and based on the vidoes, I do not find any actual program on my computer called FastReports.
  4. I am using SQLite in this project along with some FireDAC controls. Both databases have a table called county which is the same table, but one table has different data. I need to be able to copy the county table data is Database B into the county table in database A after truncating that table of data. Someone had mentioned using the BatchMove component, but after trying to research this out it became almost as convoluted as moving a shot of Scotch from the planet Uranus to a picnic table in Key West with a few trips around Jupiter! What would be the best and easiest way to accomplish this feat? There are around 3300 records in this table. If I can create a solution for this, it will solve another major headache I have with my Window 7 users accessing secure data downloads that are currently unavailable to the Win 7 user due to the lack of SSL/TSL in their operating system.
  5. Jeff Steinkamp

    Copy table data between two different databases.

    I tired playing around with this and got Abstract Errors no matter what I did. However, I did find some more down to earth instructions on how to use BatchMove and the solutions was horribly simple. I just added this to my Data Module and it just works. Here is the code. procedure TDM.CloneCountry; begin WinData.ExecSQL('delete from country'); tmp.Open('select * from country'); // users table ddquery.Open('select * from country'); // default table // setup the writer LDataSetWriter.DataSet :=tmp; LDataSetWriter.Optimise := False; //setup the reader LDataSetReader.DataSet := ddquery; LDataSetReader.Optimise := False; // make it happen FDBatchMove.GuessFormat; FDBatchMove.Execute; end;
  6. Jeff Steinkamp

    Minimizing Forms

    I have a number of forms that are created from the main form, but those forms are created without an owner. But if those forms are showing and we minimize the main form, all of the forms, owned by the main form or not, get minimized. That certainly is not the behavior I would expect. These forms are not created at Applicaiton run time, but whenever the user clicks on the menu item for those forms. Here is a sample of the code: <code> begin dlg := TSelectContest.CreateNew(self, false); try if dlg.showmodal = mrok then begin tablename := dlg.tablename; TMyContest.Create(nil, tablename); end; finally dlg.Free end; </code> Tmycontest is the form that should remain visible. The form is actually shown in the forms create procedure after some other initialization. I have searched for a workaround on this but have not found anything remotely related. Is there some way to make this happen? Thanks
  7. Jeff Steinkamp

    Minimizing Forms

    I think we have beat this horse enough. I have two solutions that will work, and I have my beta testers evaluating each to determine which way we are going to go. Many thanks to everyone who provide input.
  8. Jeff Steinkamp

    Minimizing Forms

    I'll play with this and see what happens. Right now, what I am doing is creating the contest form with the main form as the owner, hiding the main form and launching the contest form as a Modal form. When the user closes the contest form and we retune with the modal result, I'm making the main form visible again. I'll discuss this with my team of user testers and see what they say. I'll test this code above and if this works, we'll use it. Thanks!!
  9. Jeff Steinkamp

    Minimizing Forms

    What is that going to do? That is NOT what the user has selected to do. I can intercept the minimize action and change it to hide, but then how is the user going to get that back as hiding a form does not place it on the task bar.
  10. Jeff Steinkamp

    Minimizing Forms

    Yes I did forget the Override directive. I have added that, and that procedure is now being called. I also now get the icon for that form in the taskebar. But, when I minimize the main form, the contest form still minimized, and the icon is removed from the task bar. I cannot believe this is such a freaking goat rope! How is it that a form that is created with NO owner is being manipulated by the main form.
  11. Jeff Steinkamp

    Minimizing Forms

    The form is not being shown as a modal form. But, Yes I do have a DataModule and I have tried passing that as the owner and still get the same behavior.
  12. Jeff Steinkamp

    Minimizing Forms

    If you read the code I posted, TSelectContest is NOT the issue. the Issue with TMyContest.Create(nil, tablename);
  13. Jeff Steinkamp

    Minimizing Forms

    I must say that I am completely perplexed and confused. I do not quite understand how a form that is created without an owner is being controlled by the mainform. Remember, this form is not being created at the application level with the Applicaiton.CreateForm syntax in the program module. It is an available form for creation at a later time. I did add this code: procedure TMyContest.CreateParams(var params: TCreateParams); begin inherited CreateParams( params ); params.ExStyle := params.ExStyle or WS_EX_APPWINDOW; end; But, as far as I can tell, it never gets fired. I placed a breakpoint in the code, but it never stops on the breakpoint even though the documentation says that this gets run when the form is created. Here is the create code for that form: constructor TMyContest.create(AOwner: TComponent; name: String); begin inherited create(AOwner); Tablename := name; show; end; and here is the calling code from the main form: dlg := TSelectContest.CreateNew(self, false); try if dlg.showmodal = mrok then begin tablename := dlg.tablename; TMyContest.Create(nil, tablename); end; finally dlg.Free So at this point, I have no clue how to create a form, show it and allow it to remain visible when the main form is minimized. I've coded in Visual Studio, QT and Swing and never run into this behavior.
  14. Jeff Steinkamp

    Round corners on FMX form

    I have a form that I'm going to use as a splash screen, and I have set the border style to none. How do I go about rounding the corners of this form. This was pretty simple in VCL but proving to be almost impossible with FMX. This will be a Windows Desktop application. Suggestions? Thanks
  15. On my form I have 2 radio buttons and 3 check boxes. If I change the font of the parent, the font of the control does change, but the foreground color remains black, both design time and runtime. I do have the ParentFont and ParentColor properties set to true. I have even attempted to change the font color of the individual component at runtime and they still remain black. The behavior I would expect is the component font properties would inherit from the parent. Is this a bug, or do I have something set incorrectly in the IDE?
  16. Jeff Steinkamp

    Radio Button and Check Box font color not changing with parent..

    That does appear to be a workaround, but it screws up the transparency of all the menu icons and removed all the images from the buttons. However, I can still select any of the themes this way, but with the image limitations I just provided. With runtime themes enable and selecting Windows as the default theme. I am able to change the colors and fonts of the form. The font style for the Radio Buttons and Check Boxes will change, It is just the font color that will not change on these two components. The font color does change for everything else on the form.
  17. Jeff Steinkamp

    SQLite varchar field overflow

    I am updating an older application I wrote in Visual Studio that uses SQLite as the underlying database. One of the tables has three fields that are defined as VARCHAR(30). Evidently, tables created with the System.Data.SqLite assembly did not truncate data that was longer than 30 characters and I now have a number of records where one or more of these fields is overflowing with up to 50 characters and I get the overflow error message when running a FireDac query that included these records. So, my dilemma is how to deal with this as I have close to 3000 users out there that may have similar records. Is there an easy way around this, or will I need to analyze each table when it's opened and if those 3 fields are dimensioned as VARVHAR(30), alter the table and increase the size? In most cases the tables should have less than 1000 records.
  18. Jeff Steinkamp

    TMainMenu shortcut key not working

    I'm somewhat baffled with this one. New VCL application created with Delphi 11 community. Most menu items have a short cut key assigned. New (CTRL-N), Open (CTRL-O), Exit (CTRL-E), etc. the OnClick event of each menu item has an assigned handler. Clicking the menu item launches the handler. However, taping the shortcut key does not. Is there something hidden is some obscure configuration that is prevent this? Never had this problem with any of the applications I've developed using 10.4. I did open an application I recently developed in 10.4 with 11 and added some short cut keys to the menu and those are working fine. I must be missing something here. Any ideas?
  19. Jeff Steinkamp

    TMainMenu shortcut key not working

    I think I have this figure out. If the forms BorderStyle property is set to bdDialog, then short-cut keys do not work. I'm not sure if this is intended behavior or a bug.
  20. Jeff Steinkamp

    SQLite varchar field overflow

    I also use SQLite Expert Pro, but this is not going to do my users any good. We need a method to do this on the fly and I think I have resolved that, see my previous post.
  21. Jeff Steinkamp

    SQLite varchar field overflow

    I know where the problem is and what columns are problematic. I have inspected the tables with an SQLite administration tool to verify this. I have also inspected a few users' databases and their tables have the same issues in that the data did not get truncated using the older methods. So, the task at hand is how to fix this on the fly when a table is opened? One of the limitations to SQLite is the ALTER TABLE command does not have a method to modify a columns definition. I came up with the following method to fix this on the fly. First run the following SQL on the table. PRAGMA table_xinfo(existing_table). I can loop over the results and test the 'type' column for VARCHAR(30). if the test is true, then we'll modify the table with the following steps. 1. Create a temporary table using the new field definitions 2. insert into the temp table form the existing table 3. Drop the existing table 4. Alter the temporary table and rename it to the existing table. Works fine, lasts long time, shouldn't rust, bust, or collect dust!! I will however have to make sure that when new data is inserted into these tables, I am testing these fields to make sure data is truncated to the length of the field.
  22. Jeff Steinkamp

    Split string on whitespace

    Can someone point me in the right direction for splitting a string based on white space in a string. In other words, the separator between elements could be 1 space, multiple spaces, or the tab character. Thanks
  23. Jeff Steinkamp

    Digitally Sign Applicaiton

    I am having a devil of a time trying to sign the compiled application file using the post build events. I have the following command in the post build events: signtool.exe sign /tr http://timestamp.digicert.com /f C:\Users\n7yg\OneDrive\Comodo\steinkamp.pfx /p MyPassword $(OUTPUTPATH) But I am getting the following error: [Exec Error] The command "signtool.exe sign /tr http://timestamp.digicert.com /f C:\Users\n7yg\OneDrive\Comodo\steinkamp.pfx /p MyPassword C:\Users\n7yg\Embarcadero\Studio\Projects\CallSearch\Win32\Release\CallSearch.exe" exited with code 9009. Now, I can copy and paste that whole command into a Command Window, and it runs fine and signs the file. So, what is going on with the IDE? It is possible the IDE still has an open hook to the executable when it tries to run the post build events?
  24. The project I am working on requires 4 external text files, 3 with SQL data and 1 with CSV data that can be read at runtime when necessary. How do we include these into the project, so they get read into the output folder. In Visual Studio, this was rather simple. Include the files in the project and set the property to include them in the output folder. I have yet to find anything similar in Delphi.
  25. Jeff Steinkamp

    Include External Text Files in Output Folder

    Thanks for all of the suggestions and recommendations. I have chosen to use the post-build commands as this way those files in the output folder will always be updated in the event I have to make modifications to those files during the development process.
×