Today I thought I would do a spot of programming. I decided to give the supplied windows form controls a wee try since my own code was not very fast. After some amount of research (along with a lengthy period of trial and error) I had some buttons (made from PictureBoxes) which looked just like my buttons with the same behavior, ie; images changing when up and down. I was pretty pleased because I maged to wire some events that allowed me to use just one event handler to change all button images. It was very cool.
Then I started messing about and dragged on in top of another.. hangon.. the transparency works but when the top control gets redrawn by windows.. it first erases a rectangle where it will be positioned.. and then draws its actual image! Arghhh!! After a lot more research (plus trial and error) I discover that you cannot truly make windows forms controls that can be overlapping with full transparency! There goes half a day 😀
The other half of the day was spent fucking about with PictureBoxes more. My new idea was to use a PictureBox again because they actually have 2 images.. a background image, and an actual image. I made a test and it looked all good.. until I started drawing int the thing! So it turns out that these things just don’t work as they should.. or at least the way I think they should.
There goes today and not a lot to show for it.
When we get handed out our assignment for real this coming week I’ll ask the tutor if we are able to use anything like WPF (Windows Presentation Foundation) which from my reading today.. fixes all of those nasty issues that I’ve been facing.. but I’m pretty sure there will be another pile of microsoft dogshit to step in no matter what I use.
I’m really getting better at c# though and at the end of the day.. that’s what it’s all about 🙂