Is there a method to modernize how the Application.MessageBox() dialog looks in Win11? Perhaps by creating a manifest file or something to make classic desktop app to look newer?
In a word, no.
Application.MessageBox() calls the Win32 MessageBox() API, which is an old dialog.
For a newer look, you need to use the Win32 Task Dialog API that was introduced in Windows Vista, instead of using MessageBox().
Modern Delphi versions have a TTaskDialog component, and TaskMessageDlg...() wrapper functions in the (Vcl.)Dialogs unit. But those do not exist in Delphi 7, so you will have to define and import the Task Dialog API types and functions manually.
Related
I am selling Delphi app in Win 10 Store and like to start to use new buy in-app features. How to use Windows.Services.Store from Delphi 7 ?
Is there example code for accessing StoreContext COM interface ?
You have to build a wrapper C++ component that makes the API calls into Windows.Services.Store.* APIs and exports entry points for your app to call. Then you include this component in your Delphi app package and call from your Delphi code into the exported entry points.
I don't have a Delphi 7 sample available, but here is a sample that is applying the same concept with a VB6 app:
https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/VB6withXaml
I'm using Delphi 10.1 on Windows 10
When I run the OpenPictureDialog.Execute command
on some app it's open File Explorer with a preview area and on others without.
I have exactly the same properties on both cases.
What can cause the difference?
Thanks Sorin
function GetOpenFileName; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameA; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameW; external commdlg32 name 'GetOpenFileNameW';
In older versions on Delphi it used a Windows API function in comdlg32.dll to open a file. I would think it is the same in newer versions. What you see in terms of preview etc. is down to Windows settings.
The dialog shows to the user will be consistent with other file open dialogs they see on their system.
Windows 8 has a new message window that displays in the top right side of the screen. Does Delphi XE4 have any API to access this new feature?
This kind of dialog is part of the Windows.UI.Notifications namespace which belongs to the WinRT, and unfortunately you cannot access the WinRT from Delphi directly. but maybe you can try this article to check a sample with experimental access to the WinRT from Delphi, Writing Hello World for WinRT in Delphi
This is Notifications or Toasts, you can find a C++ and C# example here - http://code.msdn.microsoft.com/windowsdesktop/Sending-toast-notifications-71e230a2
I've yet to see a direct Delphi implementation of this which is why I can only suggest the C++/C# version.
Every Delphi 7 developer knows that if he compile a application on Delphi 7, the style will be as Windows 2000 applications, but there is any method to make this better as the application can have the default theme of the Windows version, as C++ and C# applications?
Try adding the TXPManifest component to the main form of your application. located in the Win32 Tab.
The TXPManifest component has no methods or properties. All it does is include the XPMan unit in your project. This in turn causes a certain resource file to be included in your project's executable file. The resource includes a manifest - a small piece of XML that contains information about the application you are writing as well as information concerning the version of the comctl32.dll to use.
Alternatively add your own manifest resource manually - which allows you to tap into the even newer Windows 7 features, if you can be bothered to fathom out the syntax. See this link for more info but ignore the bit about enabling runtime themes as this doesn't exist in D7 (I don't think).
I have a Delphi 2007 application that has a TAnimate control with a FindFile Common AVI. It works perfectly when the application is run on Windows XP, but nothing ever appears on Windows 7. I've heard it now requires its own thread, but I am not certain.
Does anyone know how to get TAnimate's Common AVI control to work on Windows 7 (or Vista)?
You must add the unit ShellAnimations to you project or add the component TShellResources from the Win32 tab of the component palette. (Tested in Windows Vista- Delphi 2007)
uses
ShellAnimations;
this unit adds the following replacement animation resources to your executable:
FindFolder.res
FindFile.res
FindComputer.res
CopyFiles.res
CopyFile.res
RecycleFile.res
EmptyRecycle.res
DeleteFile.res
Bye.