Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/05/20 in all areas

  1. David Heffernan

    How to make app with tabbed set of VNC windows

    Cross process window parenting relationships never end well. Don't try this. https://devblogs.microsoft.com/oldnewthing/20130412-00/?p=4683
  2. David Heffernan

    What are your compiler settings for debug builds?

    Irrespective of what any poll says, opt off, range & overflow checks on is the correct thing to do
  3. HolgerX

    How to make app with tabbed set of VNC windows

    hmm I played with TightVNC as a test. Get the window handle (FindwindowW (..)) from the VNC and then used the following: var VNCHandle : HWND; .. VNCHandle := FindwindowW(nil, PWideChar(WindowCaption)); if VNCHandle <> 0 then begin Windows.SetParent(VNCHandle,Panel1.Handle); WPM.Length:=SizeOf(WPM); GetWindowPlacement(VNCHandle,@WPM); Rect.Top :=0; Rect.Left :=0; Rect.Right :=Panel1.Width; Rect.Bottom:=Panel1.Height; wpm.rcNormalPosition:=Rect; SetWindowPlacement(VNCHandle,@WPM); end; This shows the VNC window in the panel. Do this several times, each with its own panel and you can then manipulate the panels with the VNC windows as you like.
  4. Lars Fosdal

    How to make app with tabbed set of VNC windows

    @David Schwartz Have you guys tried https://remotedesktopmanager.com/ ? It is freaking awesome for managing a large server park! We have literally hundreds of servers and would be lost without it. It supports pretty much every remoting protocol you can think of: https://remotedesktopmanager.com/features/remote-connection-management You can have the windows tabbed, cascaded, tiled vertically or horizontally. You can lock the Windows hotkeys so that you have to use the mouse to get out of the context of the remote view. I.e. Alt-Tab happens within the focused remote connection. There is a free version for personal use, but if you have a team, you want the enterprise version.
  5. @Mike Torrettinni I hope you did not feel triggered by me. I am really interested in your use case. I have users, that simply don't care about IT, they are forced into using my software (healthcare professionals especially midwifes sometimes seem to have chosen their job, because they hoped to never use a computer). So I have to keep the error messages to a minimum, in very rare cases resulting in a painful process of almost restarting the complete application - unbeknownst to the user. Just so they don't find a reason to stop using the software, and believe me, they are looking for one all the time
  6. Remy Lebeau

    Overloaded generic methods

    While it is true that you can't pass T itself directly without using a constraint on T, you can use T's RTTI to get its Interface Guid or Class Type at runtime, and then pass that to Supports()/InheritsFrom() instead of T. For example, something like this: uses ..., TypInfo; type TComponentHelper = class helper for TComponent public function FindComponents<T>: IBSEnumerable<T>; end; function TComponentHelper.FindComponents<T>: IBSEnumerable<T>; type PIInterface = ^IInterface; PTComponent = ^TComponent; var ix : Integer; lst : IBSList<T>; tmp : T; comp : TComponent; ClsType: TClass; IntfGuid: TGUID; begin case GetTypeKind(T){PTypeInfo(TypeInfo(T)).Kind} of tkClass: begin lst := TBSGenerics.GenList<T>; ClsType := GetTypeData(PTypeInfo(TypeInfo(T))).ClassType; for ix := 0 to ComponentCount - 1 do begin comp := Components[ix]; if comp.InheritsFrom(ClsType) then begin PTComponent(@tmp)^ = comp; lst.Add(tmp); end; end; end; tkInterface: begin lst := TBSGenerics.GenList<T>; IntfGuid := GetTypeData(PTypeInfo(TypeInfo(T))).Guid; for ix := 0 to ComponentCount - 1 do begin if Supports(Components[ix], IntfGuid, PIInterface(@tmp)^) then lst.Add(tmp); end; end; else raise ...; end; Result := lst; end;
  7. Mike Torrettinni

    What are your compiler settings for debug builds?

    By now you should know I'm in some sort of denial (especially when it comes how much dev books I should read) 😉 I didn't want to hijack this thread, but as always I will get something out these debates, even though I got a little triggered by some comments. I'm just releasing new software and I will rethink the whole Range on/off in release version. Thanks!
  8. David Heffernan

    What are your compiler settings for debug builds?

    No you wouldn't. Giving the user the wrong results is always worse than showing an error, even if the error is poorly worded.
  9. Lars Fosdal

    What are your compiler settings for debug builds?

    Same as @dummzeuch We also leave range checks on for release versions. For us, API and database access times dwarf the array access times, and there is nothing quite like live data to throw curveballs at your algorithms.
  10. Hans♫

    Just wanted to brag a bit :-)

    It's all native. We use the TMS iCL components for the GUI, only the screen instruments are custom FMX components, wrapped by a FMX wrapper.
  11. Dave Nottage

    How to disable automatic adding of units to interface-uses

    Change the ClassGroup property on the service (data) module to System.Classes.TPersistent before adding any components
  12. Attila Kovacs

    What are your compiler settings for debug builds?

    This makes Greta even more sad.
  13. Dany Marmur

    What are your compiler settings for debug builds?

    Range checking ON for ALL builds.
×