

Ian Branch
Members-
Content Count
1431 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Ian Branch
-
Yes, I am playing with it att with mixed results.
-
Hi Team, I'm not having much luck here. I now have this code: procedure TMainForm.CaptureDialog(WindowHandle: HWND; SaveToClipboard: Boolean; FileName: string = ''); var dcWindow: HDC; dcMem: HDC; bmp: TBitmap; begin dcWindow := GetDC(WindowHandle); try dcMem := CreateCompatibleDC(dcWindow); try bmp := TBitmap.Create; try bmp.Width := GetSystemMetrics(SM_CXSCREEN); bmp.Height := GetSystemMetrics(SM_CYSCREEN); SelectObject(dcMem, bmp.Canvas.Handle); // Adjust PrintWindow options as needed PrintWindow(WindowHandle, dcMem, $1); if SaveToClipboard then begin Clipboard.SetAsHandle(CF_BITMAP, bmp.Handle); end; if FileName <> '' then begin bmp.SaveToFile(FileName); end; finally bmp.Free; end; finally DeleteDC(dcMem); end; finally ReleaseDC(WindowHandle, dcWindow); end; end; procedure TMainForm.Button1Click(Sender: TObject); begin CaptureDialog(Application.ActiveFormHandle, False, GetDesktopPath+'ScreenCapture2015.bmp'); end; When I click the button on the form I get an 'image' saved OK but it is all white and looks suspiciously like an all white screen. 😞 Thoughts/suggestions appreciated. Regards & TIA, Ian
-
Hi Team, Using D12. It may be my missunderstanding but.. I have the following code: Suppliers.First; // while not Suppliers.eof do begin // sSelected := Suppliers.FieldByName('SupplierCode').AsString; sDescription := Suppliers.FieldByName('SupplName').AsString; // Parts.Close; Parts.SQL.Clear; Parts.SQL.Text := 'Select * from Parts where SupplierCode = ' + quotedStr(sSelected) + ' and BusCode = ' + QuotedStr(sBusCode); Parts.Prepare; Parts.Open; // if Parts.eof then begin // TaskMessageDlg('No parts available!', 'There are no Parts on record for Supplier - ' + sDescription + ' at location ' + sLocation + '.', // mtInformation, [mbOK], 0) Label1.Caption := 'There are no Parts on record for Supplier - ' + sDescription + ' at location ' + sLocation + '.'; // Suppliers.Next; // Continue; // end else begin // Omitting the Suppliers.Next for the moment, I allways thought that a Continue would have automatically caused Suppliers to move to the next record by virtue of the 'while not Suppliers.eof do'. In my case of the code above, it doesn't, I had to insert the Suppliers.Next; line. Was my understand incorrect or is there some other explanation? Regards & TIA, Ian
-
Thanks Guys, It's surprising I have operated under this missunderstanding for so long.... 😞 All good now. Again, thank you. Regards, Ian
-
Hi Stano, Tks for the reference. OK, so it doesn't cause the step. I need to review a few other pieces of code. 😞 Rightly or wrongly, I have always worked on it stepping.
-
INTAServices.AddMasked seems to be broken in Delphi 12
Ian Branch replied to dummzeuch's topic in GExperts
Dowloaded and installed the latest rev 4182. After 20 minutes of testing, all good so far. -
INTAServices.AddMasked seems to be broken in Delphi 12
Ian Branch replied to dummzeuch's topic in GExperts
Downloaded and installed. What specifically would you like tested? -
Hi Team, D11.3. This may be a setting I am not aware of and/or have forgotten about, I do not recall experiencing this in D11.2. Occasionally, after I have edit a Unit and saved it, exited, and come back to it later, I find my edits have not taken. It's as if the edits didn't happen. Yes, I am confident I have saved my work. Have I missed some setting?? Anybody else experience this?? Regards & TIA, Ian
-
Hi Team, I can't find any worked examples of the above. Anybody got any experience? Appreciate any examples. Regards & TIA, Ian
-
How to use the Jedi JVCL TJvLoginDialog component??
Ian Branch replied to Ian Branch's topic in General Help
Disregard - All sorted. Happy New Year... -
Handing over the baton to Thomas and Lars
Ian Branch replied to Daniel's topic in Community Management
Hi Daniel, Thank you for all the work & effort you have put in to this valuable tool. Very much appreciated. Regards, Ian -
I have downloaded it OK.
-
Warn about second instance of the IDE starting
Ian Branch replied to Jud's topic in Delphi IDE and APIs
If its an issue for you, I suggest RunTime ToolKit -
Warn about second instance of the IDE starting
Ian Branch replied to Jud's topic in Delphi IDE and APIs
There isn't one per se. It tells you that it has tried to open a second instance of GExperts. -
Warn about second instance of the IDE starting
Ian Branch replied to Jud's topic in Delphi IDE and APIs
GExperts works fine in D12... -
Hi Team, D12. I have the following function: function GetWeekDates(const GivenDate: TDateTime; const SOWDay: string; out startDate, endDate: TDateTime): Boolean; I want to modify it so that SOWDay has a default value of 'SU' if SOWDay isn't supplied. As SOWDay must be By-Value or a Constant, I can't do this: function GetWeekDates(const GivenDate: TDateTime; var SOWDay: string = 'SU'; out startDate, endDate: TDateTime): Boolean; is what I am after possible? Delete Reference: I did it with an overloaded function. Regards & TIA, Ian
-
Hi pmvgee, Your assumption was correct. This option has fascinated me a little but I can't help wondering if it is technology for the sake of technology... I can't see 'out' parameters dissappearing in any forseeable future so what advantage do tuples bring to the table/keyboard? As far as I can see, In order to implement them you need another code set to support them. I found 'generics.tuples.pas' from Malcolm Groves, on the face of it, it seems a whole lot of code for little gain. Ian
-
Hi pmcgee, Interesting, never come across them nor can I say I have seen them. What does FAIL represent? Ian
-
How should spaces after a comment be handled by the formatter
Ian Branch replied to dummzeuch's topic in GExperts
If they must code like that, :-(, make it one space after the comment. -
Hi Team, I had both D11 & D12 installed while I validated all my Apps into D12. No problems there. I had Parnassus Bookmarks installed in both. Today I deinstalled D11 and D12 won't start properly because it can't fine ParnassusCoreEditor.dll. 😞 What do I need to delete and where to get D12 to start fully so I can reinstall Bookmarks?? Regards & TIA, Ian
-
Uninstalled D11, now D12 won't start....
Ian Branch replied to Ian Branch's topic in Delphi IDE and APIs
Resolved. Deleted both Parnassus BookMarks & CoreEditor entries in the registry just to be safe, then used AutoGetit to reinstall it/them. All good now. -
Uninstalled D11, now D12 won't start....
Ian Branch replied to Ian Branch's topic in Delphi IDE and APIs
None found in the entire registry. 😞 -
I think I eventually discovered the same thing. Too long ago now... 😉
-
Tks uligerhart. That's what I did initially to get it going. I will adapt to the reordered parameters. Ian
-
Ahhhhhhh. That was what I was missing. I was not aware of that. Thank you FPiette. I will just have to remember the order of parameters when I call the function. 😉 Regards, Ian