

PeterBelow
Members-
Content Count
531 -
Joined
-
Last visited
-
Days Won
13
PeterBelow last won the day on April 30 2024
PeterBelow had the most liked content!
Community Reputation
247 ExcellentTechnical Information
-
Delphi-Version
Delphi 11 Alexandria
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Help on obtaining the theme colors for manu backgrounds
PeterBelow replied to Javier Tarí's topic in VCL
From the help it looks like the StyleServices function can take a parameter that specifies the control you want the style info for. So, have you tried to pass a main menu instance as this parameter? Or look at the drawing code in vcl.menus.pas, that should show you how the vcl gets the colors to draw with. -
TFDDataSet descendant, overriding FetchOptions.Mode from design time value
PeterBelow replied to WalkingAway's topic in Databases
Components dropped at design time load their properties from the dfm file after the constructor has executed. To set a property to a different value you need to override the Loaded method and do the deed there. -
Getit Fails to Install Fast Reports D12.1
PeterBelow replied to Mike Warren's topic in Delphi IDE and APIs
-
How can to set up an umbrella unit?
PeterBelow replied to araujoarthur's topic in RTL and Delphi Object Pascal
I assume Forms.Dialogs.pas is a unit not defining a form build in the form designer? In this case I would export functions from that unit that internally create and show(modal) one of the specific form classes, setting any needed setup values from parameters passed to said functions and returning any data entered/selected by the user as function result or in var or out parameters. This way other units need not require the specific form class units in their uses clause, only Forms.Dialogs. Note that the dialog forms would not be autocreated in this setup, the exported functions would all create, show, and then free a new instance of their dialog form. -
How do I close a modal form without ModalResult being set to mrCancel ?
PeterBelow replied to dormky's topic in VCL
The VCL has to work in the API environment that Windows provides. So aim your criticism at Microsoft ;). -
How do I close a modal form without ModalResult being set to mrCancel ?
PeterBelow replied to dormky's topic in VCL
You are wrong, the design makes eminent sense for a message/event driven environment like Windows. A modal form has its own internal message loop and that needs a way to figure out that it should exit the loop. Modalresult <> mrNone is that condition. -
Current Generation methods in Apps under Windows 7?
PeterBelow replied to Ian Branch's topic in General Help
The IDE requires Win10 or 11, but applications build with it can run on older Windows versions, depending on which features they use. It may be necessary to modify the default manifest, though, if it specifies a newer Windows version as requirement (have not checked if it does). -
Creating irregularly shaped multi-dim dynamic arrays
PeterBelow replied to JohnLM's topic in Algorithms, Data Structures and Class Design
Yes, my bad. I'm getting old ... 🙂 -
Creating irregularly shaped multi-dim dynamic arrays
PeterBelow replied to JohnLM's topic in Algorithms, Data Structures and Class Design
in a dynamic 2D array ( a type like TMyArray = array of array of integer) you can set the number of rows with a SetLength call on the array variable and, for each row, set the number of columns with a SetLength(arrayvar, rowindex) call. That should cover your requirements. To reduce memory fragmentation you should avoid multiple SetLength calls on the same array row or the array itself, though. Determine the number of rows/elements beforehand, if possible. -
Well, it has to be something you do in your code then. I just created a new VCL app (D12.2), dropped a TRichedit on it, build and ran and it inserts an image (jpg in this case) dragged from Explorer to it just fine. If you now handle WM_DROPFILES or such try to disable that.
-
XE6 and D12 use different versions of the Windows richedit control as far as I remember, that may explain the change in behaviour you see.
-
Manipulating IIS with the Application Host Administration Interface - OLE issues
PeterBelow replied to Mark Williams's topic in Windows API
Looks like the GetAdminSection function does not return an automation-compatible interface. Can you check what VarType the returned OleVariant has? -
Manipulating IIS with the Application Host Administration Interface - OLE issues
PeterBelow replied to Mark Williams's topic in Windows API
Try Result := not (VarIsClear(OleObject) or VarIsEmpty(OleObject) or VarIsNull(OleObject)) and (VarType(OleObject) = VT_DISPATCH); -
If you open the wsdl in a browser you will see that it is very complex, importing a lot of xml schemas which partially import other schemas, using a host of namespaces. And the schemas seem to be not valid in some cases, e.g. by using namespace prefixes like tns: without defining them. The wsdls also refer to a script but fails to define a namespace for it, no idea if that is valid.
-
Look at this help entry for an overview of how to modify the way a TDBGrid is drawn. In your case set the DefaultDrawing property of the grid to false and attach a handler to the OnDrawColumnCell event. The handler can check the attached dataset's current row to see what row it has to draw. If it is the first just call the grid's DefaultDrawColumnCell method directly. If it is the second row change the grid.canvas.font to bold first and then call DefaultDrawColumnCell. That should do what you want.