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?:
![[Image: NE14KyJ.png]](https://i.imgur.com/NE14KyJ.png)
Feb 21, 2017 03:19 PM
(This post was last modified: Feb 21, 2017 03:20 PM by iNCEPTiON_V.)
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 03:23 PM
(This post was last modified: Feb 22, 2017 11:13 AM by ๖ۣۜErexo.)
(Feb 21, 2017 02:41 PM)Zilog80 Wrote: Maybe something like this?:
![[Image: NE14KyJ.png]](https://i.imgur.com/NE14KyJ.png)
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"?
DO NOT DEAL WITH THIS MEMBER
(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:
![[Image: Nb4yOZ0.png]](https://i.imgur.com/Nb4yOZ0.png)
'Drag trick' & result:
![[Image: bTeR2C2.png]](https://i.imgur.com/bTeR2C2.png)
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
Feb 25, 2017 05:27 AM
(This post was last modified: Feb 25, 2017 05:49 AM by ๖ۣۜErexo.)
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
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!
Feb 25, 2017 06:13 AM
(This post was last modified: Feb 25, 2017 07:10 AM by ๖ۣۜErexo.)
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?
Feb 25, 2017 06:54 AM
(This post was last modified: Feb 25, 2017 06:57 AM by iNCEPTiON_V.)
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 07:09 AM
(This post was last modified: Feb 25, 2017 07:09 AM by ๖ۣۜErexo.)
(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.
|