Jump to content

Damon

Members
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This is vcl. The project was started in 10.x but i have not opened it backwards. The pc is entirely new anyway. Only 11 is installed on it. So to follow up - the video i made yesterday showed the problem only on the laptop while at the office. I am home this morning and open Delphi and it goes to my add on monitor (100% dpi) and it now behaves fine. I moved the components and saved them and they stayed. I am wondering if there is a problem between the saved desktop settings and the ide when a monitor is not there along with the dpi problems. I unchecked the snap/scale grid with dpi setting and the ide is at least behaving better now when switching from maximized to windowed. Maybe i need to setup another desktop and switch between them... but remembering to do that every day is unlikely.
  2. Here's another issue that seems to be only high dpi occuring.
  3. First, yes, i have saved a layout and am aware of the setting. As a developer i've been struggling with high dpi for some number of years now with my own applications. 4k displays have been out a long time. I have never made the ide "non dpi aware" as suggested and never had these problems. It seems the dpi "additions" they have may in 11 vs 10.x have caused these issues. I used the exact same setup and while the failure to stay on the source monitor was still a thing, these weird form changes and glitches were not present.
  4. I can't be the only one going crazy with these problems. Laptop has a high resolution screen running 150% dpi, when at home office I use an external monitor as a second screen (extended desktop) at 100% dpi, when in the work office i'm just using the laptop. At home i put the ide on the second monitor. The ide does more wonky things than i can count. For example, it moves non-visual controls seemingly randomly which ones to places off screen. Font size in the code window changes/doesn't match dpi of monitor, along with certain objects/fonts in the design time areas. Some non-visual components are even lost at this point since they are so far off the screen i'm assuming. I have to search for them in the object inspector. On the multiple monitor front as well, why does the ide insist on always moving the debug application and itself back to monitor 1 every time you run? Then on exit of the application the ide goes back to the monitor you had it on, but it's not the same size. In fact it never remembers what size it was I don't think. It's very annoying and over hours of coding and debugging it's honestly a huge waste of time constantly resizing windows. 10.4 was less buggy with this behavior but still always moved apps to monitor 1.
  5. Happened to me this morning for the first time. Close/open the IDE resolved.
  6. Damon

    Tstringgrid grid index out of bounds

    Remy, this works. All i did was comment out the .col and .row assignment and put in this code. It selects the cell and completes the ondrawcell correctly to color the selected cell. I guess the other methods just does not work as intended. ?
  7. Damon

    Tstringgrid grid index out of bounds

    David, you are in fact correct. I am terrible at using the debugger even though i have been using delphi since 2.0. However, my code, albeit quite messy compared to Remy's worked fine and produced exactly the same results. That piece of code was written by me some 20 years ago for a project i am porting up from D5 and the BDE to D10.x and an SQL backend. I honestly don't even remember why the variables i decided to use were so cryptic, but they must have made sense to me at the time. There is no other bug causing it. I have traced every step to the error in my code, but i do take to heart your advice about debugging and my poor knowledge of the use of it.
  8. Damon

    Tstringgrid grid index out of bounds

    Remy, thank you. Your code is much cleaner than mine. Result is the same however. Grid index out of bounds when attempting to assign the col and row to make the desired cell selected (and thus highlighted in the draw routine). I'm confused as the variables show what seem to be valid numbers. For example, a grid with 1 fixed row and 1 fixed col, with 9 string rows and 1 string col - the variables setgridcol is 1 and setgrid row is 2 should (i would think) select the 2nd cell in the grid. Row, 2, Column 1 in my attached image. But it throws the error. Thank you for you assistance, Damon StringGrid1.Col := setgridcol; ShowMessage('col set'); StringGrid1.Row := setgridrow; ShowMessage('row set');
  9. Making me crazy. I build grid at runtime based on a db record with col and row counts. I display and populate strings with data for cells from detail table data. When the grid is shown (pagecontrol tab is active) i want to programatically select the row that matches some data (id for a record) i know what col and row this is but when i try to set col and row it says out of bounds which is a lie. I thought it maybe because of fixed row and col, but if i set col-1 and row-1 the result is the same. 😞 What am I missing? This is to build the grid: procedure Tmain.buildrackClick(Sender: TObject); var i, k, c, r, j, box, rb, cb : Integer; begin //showmessage('draw grid'); stringgrid1.ColCount := ddata.rackclientdataset.fieldbyname('c').asinteger+1; stringgrid1.RowCount := ddata.rackclientdataset.fieldbyname('r').asinteger+1; setgridrow := 0; setgridcol := 0; j := 0; box := 0; K := 0; with StringGrid1 do for J:= 0 to RowCount - 1 do for I := 0 to ColCount - 1 do begin K := K + 1; if (i = 0) or (j = 0) then begin rb := 0; end else begin box := box + 1; ddata.tubclientdataset.locate('Rackid;Tubid',vararrayof([listbox1.items[listbox1.ItemIndex],box]),[]); if ddata.tubclientdataset.fieldbyname('id').asstring = '' then Cells[I,J] := 'Bin '+IntToStr(box) else begin Cells[I,J] := 'Bin '+IntToStr(box)+' '+ddata.tubclientdataset.fieldbyname('id').asstring; if (dbedit17.text = listbox1.items[listbox1.ItemIndex]) and (dbedit18.text = inttostr(box)) then begin setgridrow :=J; setgridcol:=I; //showmessage('cell is row '+inttostr(j)+' col '+inttostr(i)); end; end; end; end; with StringGrid1 do for r := 1 to RowCount - 1 do begin Cells[0,r] := 'Row '+inttostr(r); end; with StringGrid1 do for c := 1 to ColCount - 1 do begin Cells[c,0] := 'Column '+inttostr(c); end; stringgrid1.defaultcolwidth := trunc((stringgrid1.Width-56)/stringgrid1.colcount); stringgrid1.defaultrowheight := trunc((stringgrid1.height-45)/stringgrid1.rowcount); stringgrid1.ColWidths[0] := 56; end; Then this is to select the cell and it will not work! Fails when trying to set col value. Can see valid grid cell on screen at time. Doesn't make sense. Vars have correct data. if (setgridcol <> 0) and (setgridrow <> 0) then begin //stringgrid1.refresh; showmessage(inttostr(setgridcol)+' is col '+inttostr(setgridrow)+' is row - try to set cell selected.'); //stringgrid1.SetFocus; showmessage('grid focused'); stringgrid1.col := setgridcol; showmessage('col set'); stringgrid1.row := setgridrow; showmessage('row set'); end;
  10. Damon

    External table not in the expected format

    This is the program you were helping me with before. I have the paradox tables on the target that are the same as the dev computer. Charset is same. I am using the MS standard odbc that comes with windows. This works on my dev computer both with firedac and ado connections, but both fail on the target. No BDE on target. The odbc is configured on both computers the same. MySQL is installed on both, but part works fine. It is the paradox file connection that is the problem. Sample data files here: https://degei.com/D5/D4to5MigrationTool/Degei4.zip Messagedlg('Load data process. Starting data migration...',mtinformation,[mbok],0); adoconnection1.Connected := true; //START TABLE PROCESSING... showmessage('Connection is done. Start query.'); countlabel.Caption := 'Working on ACTIVITY.DB table.'; countlabel.Update; adoquery1.SQL.Text := 'select count(*) from activity.db'; adoquery1.open; //---------------------------OPEN QUERY FAILS WITH "external table not in expected format" error. IT DOES THE SAME IF I USE FIREDAC CONNECTION. The connections works, so the odbc config is working. adoquery1.Active := true; showmessage('query active with '+inttostr(adoquery1.fields[0].asinteger)+' records'); progressbar1.Min := 1; if adoquery1.fields[0].asinteger > 0 then progressbar1.Max := adoquery1.fields[0].asinteger;
  11. I have used both firedac and ado connections to connect to old paradox files to read the data and process to a mysql server. I have gotten this working fin on my development machine. When installing and running on a test machine i get the error: external table is not in the expected format. This happens with both connection types and I cannot figure out what is missing for different from the text machines. Any suggestions?
  12. Damon

    Firedac connection to paradox via odbc

    I started from scratch with the FDconnection and finally got it to work i think. Thanks for sticking with me. There are some architecture errors when using FDTable, but not with FDQuery so i will just use that. The FireDAC seems very picky with these old paradox tables. But thanks again for all your help! Now i can start writing the import to MySql.
  13. Damon

    Firedac connection to paradox via odbc

    Still unsuccessful at this. I have tried both versions of the microsoft driver that are on windows with no luck. Every time the connection establishes fine, the FDTable will read the odbc and find all of the tables in the folder. Once I try to set the FDTable to active i get the error. The driver will not read the data. This is a FIREDAC config (my fault) or operational problem - as I can use the same ODBC that I created and it works just fine in Crystal reports as shown in the screen shots. I am completely baffled. Same error (11265) when trying to activate an FDQuery also. Damon
  14. Damon

    Firedac connection to paradox via odbc

    @emailx45 where does the connectionname property come from on the firedac connection? Is that the ODBC connection name? I'm working through your example, thank you. I notice that my app gives a different error at run time. When connecting the firedac connection it gives data source name not found and no default driver specified, but AT design time it says it is connected fine???
  15. Damon

    Firedac connection to paradox via odbc

    ================================ Connection definition parameters ================================ Database=C:\Degei4\Data ODBCDriver={Microsoft Paradox Driver (*.db )} DataSource=degei4migration DriverID=ODBC ================================ FireDAC info ================================ Tool = RAD Studio 10.4 FireDAC = 27.0.0 (Build 99682) Platform = Windows 32 bit Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR ================================ Client info ================================ Loading driver ODBC ... Loading odbc32.dll driver manager Creating ODBC environment handle Driver Manager version = 03.81.19041.0000 ================================ Session info ================================ Current catalog = Current schema = Driver name = odbcjt32.dll Driver version = 10.00.19041 Driver conformance = 3 DBMS name = PARADOX DBMS version = 05.00.0000 Master.DB Master.MB Master.PX Master.VAL
×