Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

proper image alpha layer when form is invisible

I'm looking for a way to have images on invisible form that allow alpha transparency and allow to place and use buttons/labels etc.

I've tried this Transparent background on winforms?, layered window and many more, nothing fully successful. I've ended up with such failures https://imgur.com/a/t6nmF
Other "solution" I found is to create additional form that's layered window i.imgur.com/Q231QPX.png Two forms complex into one application, will this work? how?
Any ideas ?
Maybe something like this?:

Spoiler (Click to View)
Use WPF for this, its very simple

1. Create a WPF Window
2. Set WindowStyle to "None"
3. Set AllowTransparency to "True"
4. Set Background to "Transparent"
(Feb 21, 2017 02:41 PM)Zilog80 Wrote:  Maybe something like this?:

Spoiler (Click to View)

Yeah, exactly like this.


(Feb 21, 2017 03:19 PM)iNCEPTiON_V Wrote:  Use WPF for this, its very simple

1. Create a WPF Window
2. Set WindowStyle to "None"
3. Set AllowTransparency to "True"
4. Set Background to "Transparent"

Will try
for some reason I dont have XAML editor on my PC so I cant do this


I've managed to do this in WPF and its working, but its hard to edit and do what I actually want. Any other suggestions?
anyone could help me with that ?
(Feb 21, 2017 03:23 PM)๖ۣۜErexo Wrote:  Yeah, exactly like this.



Will try
for some reason I dont have XAML editor on my PC so I cant do this


I've managed to do this in WPF and its working, but its hard to edit and do what I actually want. Any other suggestions?

Youve done it . What exactly do you mean by its "hard to edit"?
(Feb 24, 2017 02:17 AM)iNCEPTiON_V Wrote:  Youve done it . What exactly do you mean by its "hard to edit"?

I think he means hard to design or something like that.
(Feb 24, 2017 06:55 AM)Ninja Wrote:  I think he means hard to design or something like that.

Ah ok thanks.
When you need help just ask I will help you with every wpf question
As iNCEPTiON said this can be done in WPF in 4 seconds:

xaml:
Spoiler (Click to View)

'Drag trick' & result:
Spoiler (Click to View)

I encourage you to start moving to WPF, not only for dessign features.

Anyway if you want to stay in GDI/Winforms, my previous post image sample was done (4 years ago) in Winforms. Let me know and I will PMed you with info
I completly understand and I've done this, but the problem is I dont know how to add events to objects such as onClick, MouseMove etc (to make the program move when drag by image). Any good basic tutorial in how to switch from Windows Forms into WPF ?
Thanks for response guys.

@edit
okay I've managed to do some events, if I have any more questions I'll ask
[Image: H4k3DWv.png]
Let's assume you have a Button.
You can either double click on it and the click event gets generated,
or you write it like this

Code
<Button Content="ClickMe" Click="YourFunction" />

and then in the code

Code
public void YourFunction(object sender, EventArgs e){
     //CODE
}

here some awesome links:
https://www.codeproject.com/Articles/140...-Beginning
https://www.codeproject.com/Articles/229...-Part-of-n

Videos

https://www.youtube.com/playlist?list=PL...A2zKZF-8nv

https://www.youtube.com/playlist?list=PL...o7loki0nWL

https://www.youtube.com/watch?v=SD3yVqpu4e4

Stick to WPF and you won't regret it!
Thanks alot for your reply!
Now I want to create a custom progress bar, I have two images, empty and filled. How to combine those two into progress bar? I've searched web for a while,
I've eventried to do this by layering two images. Do you have any idea?
[Image: WgLVvGR.jpg]
Do you have discord so I can help you ?
Because this requires Styles and advanced WPF knowledge, i can do it for you.
(Feb 25, 2017 06:54 AM)iNCEPTiON_V Wrote:  Do you have discord so I can help you ?
Because this requires Styles and advanced WPF knowledge, i can do it for you.

Sadly no, I have ts3 (ntsw.pl) or jabber ([email protected])
If you want you can send me your Project and i can edit for you.
Or i can provide some links how you can do that.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by lo0srMar 22, 2020 02:02 PM 3 131 Mar 22, 2020 02:02 PM
Last Post: HFDone
[C#] by C++Dec 29, 2019 06:16 PM 16 831 Dec 29, 2019 06:16 PM
Last Post: DNA
[Python] by DistrictApr 7, 2019 03:14 AM 4 230 Apr 7, 2019 03:14 AM
Last Post: lockhead