-
Content Count
28 -
Joined
-
Last visited
-
Days Won
2
Martin Wienold last won the day on May 2 2021
Martin Wienold had the most liked content!
Community Reputation
35 ExcellentTechnical Information
-
Delphi-Version
Delphi 10.1 Berlin
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
TOpenDialog/TFileOpenDialog => how to to bypass file system redirection?
Martin Wienold replied to Nigel Thomas's topic in VCL
Try to use %windir%\sysnative instead of %windir%\system32 https://learn.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector "[..] 32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32. WOW64 recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access. [..]" -
Maybe the function ThemeServices in unit Themes is what you are looking for.
-
WinInet API 4095 How can I remove this limit?
Martin Wienold replied to Turan Can's topic in Windows API
https://xkcd.com/979/ -
BLOB is short hand for Binary large object
-
I'm no native speaker and did not have my coffee yet, have mercy!
-
Using BLOBs implies that you are storing binary data in a database table. This is data that can't effectifly be queried by the database using SQL alone, you always have to load it into an application. I'm not saying this is bad, I just want to make sure that you know what the implications are. Another potential problem you may face is having different versions of this data in you database. Right now, you are saving Level, Text, ImageIndex and Data. If this list is expanded or the meaning of a value (example ImageIndex may shift) changes you have to have an application loading, converting and storing it.
-
Windows 11 and Server 2022 versions
Martin Wienold replied to Angus Robertson's topic in General Help
Windows 10 was, for the majority of its development, MajorVersion 6, MinorVersion 4. Like Nigel wrote, it's possible this will change. -
We use WIC Image Scaling in one of our applications. Some information with examples https://weblogs.asp.net/bleroy/resizing-images-from-the-server-using-wpf-wic-instead-of-gdi And an MSDN article https://docs.microsoft.com/en-us/windows/win32/wic/-wic-bitmapsources-howto-scale
-
Delphi compatibility with Windows 11?
Martin Wienold replied to PeterPanettone's topic in General Help
Does that list the TPM Version? My PC at home doesn't have TPM available, I can't check. My PC at work does and I used PowerShell with WMI to get the version foreach($instance in Get-WmiObject -Namespace Root\CIMV2\Security\MicrosoftTpm -Class Win32_Tpm) { $instance | Select-Object -Property * | Format-List } https://docs.microsoft.com/en-us/windows/win32/secprov/win32-tpm https://trustedcomputinggroup.org/resource/tpm-library-specification/ -
Where to put component libraries.
Martin Wienold replied to jcdammeyer's topic in Delphi IDE and APIs
At work, we have two Git Repositories. One for the components and one for our actual application. Our build environment takes care of syncing both to the correct branch (with a fallback to just develop for the component repository). The result is that every developer has a local working directory for the components with prebuild binaries to minimize the buildtimes. In theory, every develop could have a different location for it, in practice we have it below a folder in %PUBLIC% (example C:\Users\Public\Documents\SomeFolder\Comps). Our git server (we use Gitlab) notifies everyone for any change in the component repository, keeping errors due to mismatching components down to a minimum. So back to your question: Put it anywhere you want as long as its a local copy and you have a "global" copy, preferable in your version control of your choice. %PUBLIC% is user independant place, but every other folder is also fine. -
Prevent Alt or Ctrl + Print Screen
Martin Wienold replied to Henry Olive's topic in RTL and Delphi Object Pascal
Obligatory The Daily WTF link: Copy Protected -
Prevent Alt or Ctrl + Print Screen
Martin Wienold replied to Henry Olive's topic in RTL and Delphi Object Pascal
Maybe using Low Level Keyboard Hooks MSDN LowLevelKeyboardProc But the thing is, there are more ways to make a Screenshot than just using these Shortcuts, even without third party tools: Microsoft Snipping Tools Windows Key + Shift + S Print and MS Paint to cut the Screenshot You should ask yourself if you actually need to do this and save yourself the time and money. -
Isn't it just renamed to "Generate Android 32-bit and 64-bit binaries (armeabi-v7a + amd64-v8a)"? I've never developed for Android, I'm just guessing.
-
MultiCast NotifyEvents / DatasetNotifyEvents
Martin Wienold replied to microtronx's topic in Algorithms, Data Structures and Class Design
Here is an example for how to use the Spring4D multicast events: type TEventSource = class private // record type here // for the generic parameter T you can use any Event type you used before, // for this example I just use TNotifyEvent fOnChanged: Event<TNotifyEvent>; // getter for the property procedure GetOnChanged: IEvent<TNotifyEvent>; // internal method to just trigger the OnChange event as shorthand procedure DoChanged; public property Number: Integer read fNumber write SetNumber; // event to which you subscribe to // interface type here property OnChanged: IEvent<TNotifyEvent> read GetOnChanged; end; procedure TEventSource.GetOnChanged: IEvent<TNotifyEvent>; begin // the record type has implicit operators that will // lazy initialize its internals and return it as an interface reference // internaly in TEventSource, you should access the field member and // not the property since the implicit operator does not need // to run every time Resut := fOnChanged; end; procedure TEventSource.DoChanged; begin // CanInvoke only returns true if there are any listeners on the event // the parameters of Invoke will change depending on the generic parameter T // of the field member if fOnChanged.CanInvoke then fOnChanged.Invoke(Self); end; procedure TEventSource.SetNumber(const Value: Integer); begin if fNumber <> Value then begin fNumber := Value; DoChanged; end; end; type TEventListener = class private fSource: TEventSource; procedure HandleChanged(Sender: TObject); public constructor Create; destructor Destroy; override; procedure Something; end; constructor TEventListener.Create; begin inherited; fSource := TEventSource.Create; // add an event handler to the multicast event fSource.OnChanged.Add(HandleChanged); end; destructor TEventListener.Destroy; begin // remove the event handler from the multicast event // if the source has a longer lifetime than the listener, // you should always make sure to remove the handler. // if you do not, there will be a dangling pointer inside // of the multicast event, pointing to your freed listener fSource.OnChanged.Remove(HandleChanged); fSource.Free; inherited; end; procedure TEventListener.HandleChanged(Sender: TObject); begin end; procedure TEventListener.Something; begin fSource.Number := 1; end; I'm sorry if there are any compile errors, I don't have access to a compiler at the moment.- 4 replies
-
- delphi
- multicast events
-
(and 1 more)
Tagged with:
-
That looks like GNU Gettext to me,