

Ian Branch
Members-
Content Count
1456 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Ian Branch
-
Strange issues using multiline strings (was "Is it just me?? ")
Ian Branch replied to Ian Branch's topic in Delphi IDE and APIs
Hi Team, For what ever reason, it doesn't happen anymore. I didn't take notes, but I'm wondering if it was somehow related to the other issue I posted about which has been resolved. Seemingly corruption of some sort that I couldn't identify. Unfortunately, I can't recall if I experienced this issue in those Projects specifically, or in others. 😞 Certainly the issue reproduceable and annoying. Everything is working as expected now. Thank you all for your contributions. I will keep my fingers crossed... Regards, Ian -
D12 + Patch. I just double clicked on the FormShow event of a Form to create the event. I got a "Cannot find implementation of method FormShow.: error. I checked, the declaration is in the Form Class and the procedure is in the code. Huh?? I added some code into the FormShow procedure but it doesn't run. I don't get any error messages. Any thoughts/suggestions?? Regards, Ian
-
Strange issues using multiline strings (was "Is it just me?? ")
Ian Branch replied to Ian Branch's topic in Delphi IDE and APIs
😞 -
I backtracked through the versions and found that three developed the issue in mid January and one in mid Dec. Doing the usual file comparisons, I couldn't find a change/difference in the sour dfm files. 😞 All restored now and working as desired. Thanks for looking. Ian
-
Update - I just went through the 30 projects in the ProjectGrp. 4 projects are exhibiting the issue. 😞 I guess that narrows it down to what do those 4 have in common....
-
Hi Dave, No it didn't happen on a new project. And it isn't happening on/in all my projects in the proj Gp. But it is happening in more than one. 😞 I can't really post the form/project as it has 3rd Pary components on it and there is proprietary information in it. Whilst I could mask the information, it would still be dependant on you having the 3rd Party components to open the unit. What's a little more annoying is that I don't know how long this 'isssue' has existed and therefore how long existing FormShow procedures in the relevant Apps hasn't been functioning. 😞 Ian
-
GetIt installation does not work
Ian Branch replied to PeterPanettone's topic in Delphi IDE and APIs
My KSVC update seemingly installed OK but when I went to update my project it couldn't find some KSVC components. I had to de/re install KSVC and all was good. Does anybody know what the KSVC update changed/updated? Regards, Ian -
Hi Team, D12. What would/could prevent me being able to widen my MainForm? There are no Constraints and the form is sizable. It is a Normal form. I can change the height OK, but not the width. 😞 Any thoughts/suggestions appreciated. Regards & TIA, Ian
-
Found it! One of the components on the form ahd constraints for some reason. All fixed now. Thanks to all for your input. Regards, Ian
-
Hi Brian, I could be wrong, this is not in code, this is in the IDE at Design time. Ian
-
Hi Team, Books have been written about what I don't know about threading... 😉 I have experimented with Anonympus threads. Is it possible to prevent the App doing anything except being moved, and parhas resized, while a thread is running? Regards & TIA, Ian
-
Preventing and allowing things to happen in a Thread???
Ian Branch replied to Ian Branch's topic in General Help
Because I still want them to be able to move and resize the App/Form while the thread is running. If I do it in the main thread the form becomes unresponsive. -
Well done to Uwe, Peter, & any others, for seeing this issue through. Ian
-
Hi Team, Like most of us I have my own local pattern procedure/function library. I have been commenting them like this: What this gives me then is a dropdown when I hover over the procedure/finction in my code that looks something like this: All very handy and a useful reminder of the procedure/function definition. I forget where I got this from. 😞 Can somebody point me to where this style of documentation/technique is documented please? Regards & TIA, Ian
-
They don't appear to have a D12 version yet. 😞
-
Excellent! Thanks Dalija. Regards, Ian
-
FYI - Several Embarcadero services are currently unavailable
Ian Branch replied to Keesver's topic in General Help
Of course, all of this is dictated by available Budget and/or Risk/Impact analysis. -
FYI - Several Embarcadero services are currently unavailable
Ian Branch replied to Keesver's topic in General Help
Here's a thought. What impact, if any, has this outage had on the next update to D12?? -
Hi Team, Delphi 12. I am trying my hand at Semaphores. Never touched them before this. ATT I have the following code: // // Create the named semaphore (if it doesn't already exist) GlobalSemaphore := TSemaphore.Create(nil, 1, 1, 'DBiAdminSemaphore'); // try // if GlobalSemaphore.Acquire then begin I understand that if the Semaphore 'DBiAdminSemaphore' already exists, it won't be created again. If it already exists, I want to test for its existance, hence the thought of Acquire, but it seems Acquire doesn't return a Boolean. How do I test if the Semaphore already exists? The objective here is to prevent the following code exceuting if the Semaphore exists. Regards & TIA, Ian
-
Hi Jon, Tks. The code is in the MainForm.FormShow Event. The App is accessed by multiple Users via ThinFinity (WEB), RDP & LAN. If one of the App has the GlobalSemaphore created, I don't want any of the other Apps running this piece of code. I don't know that I need to use Acquire at all? If WaitFor(1) works as suggested, I will be fine. Regards, Ian
-
wuppdi Welcome Page for Delphi 11 Alexandria?
Ian Branch replied to PeterPanettone's topic in Delphi IDE and APIs
Hi Guys, FWIW, I am using both without issue in D12. Ian -
Getting to be a habit... 😞
-
No need to apologise, we have all done something like that in our lifetimes.....
-
Hi Team, Need some help. Using D12, 32bit App. I would like to capture just the current form, in some format, and send it to the clipboard, so the User can then paste it into an email. I found this code: procedure TMainForm.CaptureDialogToClipboard(WindowHandle: HWND); 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); PrintWindow(WindowHandle, dcMem, PW_CLIENTONLY); // Adjust options as needed Clipboard.SetAsHandle(CF_BITMAP, bmp.Handle); finally bmp.Free; end; finally DeleteDC(dcMem); end; finally ReleaseDC(WindowHandle, dcWindow); end; end; Which I think will do the job, but I can't find out where/how PW_CLIENTONLY is declared/defined. What unit do I need to add??? Regards & TIA, Ian
-
Hi Team, I came across this code and it works straight-up. I just need to do some tweaks: procedure ScreenShot(activeWindow: bool; destBitmap: TBitmap); var w, h: integer; DC: HDC; hWin: Cardinal; r: TRect; begin if activeWindow then begin hWin := GetForegroundWindow; dc := GetWindowDC(hWin); GetWindowRect(hWin, r); w := r.Right - r.Left; h := r.Bottom - r.Top; end else begin hWin := GetForegroundWindow; dc := GetDC(hWin); w := GetDeviceCaps(DC, HORZRES); h := GetDeviceCaps(DC, VERTRES); end; try destBitmap.Width := w; destBitmap.Height := h; BitBlt(destBitmap.Canvas.Handle, 0, 0, destBitmap.Width, destBitmap.Height, DC, 0, 0, SRCCOPY); finally ReleaseDC(hWin, DC); end; end; procedure TMainForm.Button1Click(Sender: TObject); var path: string; b: TBitmap; begin // b := TBitmap.Create; try ScreenShot(TRUE, b); Clipboard.SetAsHandle(CF_BITMAP, b.Handle); b.SaveToFile(GetDesktopPath + 'Screenshot_1.bmp'); finally b.FreeImage; FreeAndNil(b); end; // end; Thank you all for your input. Appreciated. Regards, Ian