Replies: 27 comments 22 replies
|
There are a bunch of hook examples and traditional winmain type apps ported from C++ to C# using Vanara libs in the WinClassicSamplesCS project. They match those in Microsoft's sample library. You could build them both and use the VS profiler to answer your question. In my subjective experience, there isn't a significant performance difference. |
|
Thanks, David! I thought that the .net <-> native Win32 bridge won't take that much performance... Now, I will try to recreate this 😷 |
|
BTW @dahall - I'm currently building some kind of The aim is, to have this examples in such WinUi3 interface:
Just for convience. |
|
You never saw it as I never published/committed it. I've attached it here. It really does nothing more than browse the current directory structure and suggest it can run a project in the console (not implemented). |
|
One thought I have is a tool that like ILSpy can observe all the public classes, interfaces, enums, etc. in all the Vanara libraries and when you select an element, it finds references in WinClassicSamplesCS or in the unit tests that can help a developer see ways to code up their requirement. |
|
To mark your own words: That sounds fun! 🥇 As soon as I have something to show, you'll register. Have a good time, David! |
|
I guess, Reflection is the key to achieve this. I worked with Reflection some years ago, so long ago, but that's what I have in mind... Connections / Links to NuGet and GitHub would be nice. However, I'm still investigating... Suggestions are always welcome! Regards, tajbender |
|
Design considerations:
I can help with Reflection and the NuGet APIs. I've done a lot with them. I've done very little with WinUI3. |
|
NuGet API? Sounds interesting... Didn't hear of it, to be honest 😁 Thanks, David. That sounds like a ton of fun... |
...I have created a header for the app. To be honest, it's heavily "inspired" by CoPilot, although a did some photoshopping. @dahall is it okay to use this a.i. asset? In our |
|
Few points:
internal enum ElementType
{
Assembly = 1,
Class,
Delegate,
Enum,
Field,
Interface,
Method,
Namespace,
Property,
Struct,
}
internal interface IAsyncRefresh
{
System.Threading.Tasks.Task RefreshAsync(CancellationToken cancellationToken, IProgress<int>? progress);
}
internal interface IElementInfo : IAsyncRefresh
{
public IEnumerable<IElementInfo> Children => [];
public ElementType ElementType { get; }
public string? ImageUrl => null;
public string Name { get; }
}This gets instantiated for all assemblies, types, fields, etc. Let me know what you need of this to work within the WinUI3 space. |
|
I just checked in my early Sampler work where I've included two helper class files, NuGetUtils.cs and AssemblyElements.cs. The first has methods to discover all the Vanara assemblies on nuget.org, download them, and extract version specific assemblies. The second has the methods and classes to enumerate the contents of an assembly. Form1.cs and NuGetPackages.cs are WinForms that show how to use those helpers. |
|
I think running the code is a nice idea, but I believe developers will benefit the most from being able to easily do the following first:
|
|
A |
|
@dahall I've switched my current main dev branch: https://github.com/tajbender/WinClassicSamplesCS.git |
|
@dahall |
|
Hi @dahall 👋 I’d like to clarify one part of the workflow I’m currently wiring up:
My idea is that the Before I proceed, I’d love to hear how you envision this part:
Thanks — just want to make sure the direction aligns with your expectations. 📊 Vanara Jñāna – Project Timeline (Gantt Overview)Below is a high‑level Gantt‑style timeline showing the evolution of the project 🗂️ Gantt Chart (Text-Based)WEEK: 1 2 3 4 5 6 7 8 Genesis & Vision Early Runtime Experiments Architecture & Pipeline Design UI Evolution (Initial Sketches) Retro-Futuristic Mockups GitHub Tile & API Integration Documentation & Discussion (#606) 📘 Interpretation
|
|
@dahall:
...and adding some sniffy docking service, cause multi-windowing in WinUI 2+ makes so much fun 😁
When I was bored I asked Copilot to sum things up: 📊 Vanara Jñāna – Project Timeline (Gantt Overview)Below is a high‑level Gantt‑style timeline showing the evolution of the project 🗂️ Gantt Chart (Text-Based)WEEK: 1 2 3 4 5 6 7 8 Genesis & Vision Early Runtime Experiments Architecture & Pipeline Design UI Evolution (Initial Sketches) Retro-Futuristic Mockups GitHub Tile & API Integration Documentation & Discussion (#606) 📘 Interpretation
|
|
@dahall Regards, Some add-ons I added, for your interest. I'm finishing and cleaning up things, I guess the next days you can have a 1st look Handle - InspectorSearch for opened file handles across the system, just like
Hex-EditorWell, just it, an Hex Editor ❤️ 😍
|



















Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I am just asking if someone ever tried to do the native
WinMain()msg-handling in C# over the .net bridge, when polling for every windows movement if ever done.The background is, I had a native "Windows Glue" component about 25 years ago. That said, it was just for having some "magnetic" effect when moving app-windows around. When the borders of the window get close together, the window that the user is moving sticks to its counterparts, that is: every other application window.
I had stolen this from early Dreamweaver apps, who did exactly that as some kind of extended Docking-System.
However, I did this in native C++, that hard way we all learned to love so much 👅
As said, I wonder if such low-level hook will poor down performance.
Any ideas? Thanks.
This was the Original post...
All reactions