Ossie
Process Start without my Program being the "parent"
Hi,
How can I use System.Diagnostics.Process.Start without my program being the "parent" program, I'd like it to launch "externally" like if the Process was opened manually by the user. Is this possible?
9 replies
❔ WPF Window click-thru/non-clickable
Hey, how is it possible to make a WPF Window click-thru/non-clickable. I don't want to highlight or click on it in any way. The window is for an overlay, so I needs to be uninteractable, so you don't click it accidently.
I already tried the following without success:
1. Using SetWindowLong
This didn't work, and its still clickable for some reason. Is it because im trying to do it from inside the WPF windows own code?
2. IsHitTestVisible
I tried setting
IsHitTestVisible
to false
, both in the XAML and after instancing the window. Still clickable...
Any help is appreciated, as I can't seem to find anything online that is not the methods listed above.
Thanks29 replies
❔ Making WPF window click thru / unclickable?
I have a overlay window, which is on top of some other programs, but right now, if you click on the overlay part on the window, it will try to focus the overlay and start blinking, and you will loose control of the program the overlay is on top off. So how do I make the overlay click thru or unclickable?
Thanks
7 replies
✅ .EXE works in release but not publish?
Hi, I have a WPF application, and I have made some stuff with the notification area (system tray), I tried yesterday to do it with <UseWinForms>true<UseWinForms>, and everything worked perfectly when building with release. but when I build with publish, it doesn't work. And I know its because of the WinForms thing, since if i removed it, it launched fine.
Then I found a nuget package today, which can do the system tray things, but now, again, it doesn't wanna run in publish, but it again runs just fine in release. I use the following settings in my PublishProfile:
This is my csproj:
Is there some way I can debug it to figure out why it doesn't work, it is really pissing me off that it doesn't work when I publish it... but for some reason works when I build it for release
3 replies
❔ Minimizing WPF app to system tray?
Hey,
Is it possible? I looked it up online but could only find very old things for win 7 and xp, and also nothing really for WPF mostly for win forms…
Is it possible, if so how? 🙂
By system tray I mean the litlle arrow down besides the clock.
Thanks
4 replies
[WPF] Creating grouped content in XAML to hide.
Hi,
Is it possible to group multiple UI elements into a group, and then hide the entire group, while also being able to access each individual elemt of the group. This is just pseudocode of what I wish to achieve:
Then from C# I can do something like
Hope this is possible, so I don't have to hide each element individually.
Thanks
3 replies
❔ Overlay on other Windows from WPF
Hello 🙂
Is it possible from WPF to make a overlay over another window.
I wanna show some information over another window on the computer from my WPF application, and was wondering if its possible, and if so how?
Thanks
340 replies
❔ Embed images within .exe [WPF App .Net 6.0]
Hey, I have some Images that I would like to use within my app, how do I have them embedded within the .exe, I tried to do
But, then it tries to get the images from the build output/images/theimage.png
How do I have them within the .exe, I was able to do this in older version of WPF
Thanks
59 replies
System.IO.FileLoadException
System.IO.FileLoadException: 'Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
That is the error I'm getting, I read online something about it being two packages being dependant on different version, but I have the
Setup in my App.config, so I don't see why it gets mad...
Reference to what I read: https://stackoverflow.com/questions/62764744/could-not-load-file-or-assembly-system-runtime-compilerservices-unsafe
It seems to be System.Text.JSON which is mad for some reason1 replies
✅ Good obfuscators for protecting .NET WPF Application?
Hello,
I have my my own small WPF Application, and I have noticed I can just open it up in something like DotPeek, and get the full source code back, is it possible to prevent this some other way than obfuscation?
If not, what are some good obfuscators, I looked at some applications, which seem to make everyone across a lot of classes, and then giving all variables weird names etc. but, not sure which obfuscator do this.
Thanks 🙂
8 replies
Shifting a List(int) to become 1,2,3,4,5...
Hi, If I have a List like this:
2,3,4,5
And I would like for it to become:
1,2,3,4,4
This should be done by taking from the higher numbers in the list shifting them to the left so they come in order like above, how would I do that?85 replies
MySQL Connector Paramerts.AddWithValue, not working?
Hello, I'm trying to do a prepared mysql query, however it doesn't seem to wanna bind my values.
My code is the following: https://sourceb.in/9gNZINmB4C
It shows the follwing in my console with the debugs: https://i.imgur.com/AvlrWlV.png
In my database it becomes like this: https://i.imgur.com/bSoRCD9.png
Which tells me it doesn't bind my params to the SQL statement, am I doing something wrong?
I tried following this: https://dev.mysql.com/doc/connector-net/en/connector-net-programming-prepared.html
3 replies
Index was out of range. How to check if list has items without triggering this error?
Hello, I have a list, with a list inside.
This is because I wan't to have 3 possible lists, with a list inside. However there isn't always 3 lists present. Sometimes it might only be 1 or 2 lists that are filled, and the last one is empty. My problem occurs when trying to check if the List has any value. This works fine if none of the lists have any value, by checking if
characterData.Count > 0
. However when this is not the case, I try to check if a value inside the list is NullOrEmpty, however this is causin the error Index was out of range
. Which makes sense because the list doesn't exist, but how would I then check if the list itself exists inside the the other list? I hope this makes any sense, I will post a snippet.
I would wanna check if characterData[i] exists, without getting an index error.
Thanks,
Ossie63 replies