WaltzerSoft Posted August 3, 2004 Posted August 3, 2004 Hi everybody! i'm writing own Media Player with GUI like WMP 10. Now i want to redraw * the Form's Titlebar, left/right/bottom border. * the Menubar, Menu, MenuItem * the TabPage but i don't know how to do that. Please help me!!! Thanks.......... Quote
ilya2 Posted August 3, 2004 Posted August 3, 2004 Your question is not clear enough. Please specify what do you mean by redrawing. Do you want to do your custom control drawing? Quote Ilya
WaltzerSoft Posted August 3, 2004 Author Posted August 3, 2004 hmm, now i want to create my class that inherit Windows.Forms.Form class. And then, i want to replace the standard windows Titlebar by my image. Same with the left/right/botom Form's border. Thanks Quote
ilya2 Posted August 6, 2004 Posted August 6, 2004 hmm, now i want to create my class that inherit Windows.Forms.Form class. And then, i want to replace the standard windows Titlebar by my image. Same with the left/right/botom Form's border. I would try to do that by setting my FormBorderStyle to None and then adding my own TitleBar and border controls to the top and sides of the form and dock them. Quote Ilya
Engine252 Posted August 12, 2004 Posted August 12, 2004 you basicly want a skinned application well you gonna have to be prepared to do alot yourself every button,menu,or titlebar is gonna be drawed and trow events and you are gonna be the one to code them if you search in google for skinning in vb.net you should find some articles on that toppic it's alot of work but ones done it very rewarding. :) Quote
neodammer Posted August 12, 2004 Posted August 12, 2004 It is really not difficult, just time consuming. Plus you need some artistic ability..hehe hard for me :D I used to love making programs with themes that revolved around famous movies or anime. Quote Enzin Research and Development
Denaes Posted August 12, 2004 Posted August 12, 2004 I agree that it's not hard so much as having to visualize things in your mind and a lot of "change and load" I think using labels with borders to estimate where/how you want your controls will help you visualize placements, sizes and coordinates will be helpful. I'd even make an extra label or two at the bottom and in the Form.Mousemove event, send the mouse coodinates down there. This would help when you test to say "I want it right there" When you do your own custom drawing and custom handlers, there is a LOT of, doing - testing - "Thats WAY too big... Now it's too small, now it's the wrong color" and having to stop, do it in code and reload your project is a bit more time consuming than making it on the IDE. But this is pretty much how C programmers (C++ programmers who reject the default) and game programmers have to do it. Heck, most C/C++ and some Java IDEs don't have a "Form Designer" and you're making your controls (widgets or whatever you want to call them) in code and placing them via trial and error. Quote
neodammer Posted August 12, 2004 Posted August 12, 2004 I used to make an .ini file for the GUI configuration, that way its easier to swap pics around etc.. without having to recompile. :D Quote Enzin Research and Development
Denaes Posted August 12, 2004 Posted August 12, 2004 I used to make an .ini file for the GUI configuration' date=' that way its easier to swap pics around etc.. without having to recompile. :D[/quote'] For when you'd use pictures for controls like buttons or something? Or just background/icon pictures? Quote
neodammer Posted August 12, 2004 Posted August 12, 2004 mostly backgrounds. Controls and such always got difficult and i gave up on it but im sure it can be done :D Mostly size issues gave me trouble. Different pc's different resolutions etc..which could be solved by having a fixed size but then you still have to have all the pics an exact size, otherwise it looks horrible :p Quote Enzin Research and Development
Denaes Posted August 12, 2004 Posted August 12, 2004 mostly backgrounds. Controls and such always got difficult and i gave up on it but im sure it can be done :D Mostly size issues gave me trouble. Different pc's different resolutions etc..which could be solved by having a fixed size but then you still have to have all the pics an exact size' date=' otherwise it looks horrible :p[/quote'] I was going to say... I know someone (in college) who thought it would be a good idea to just load pictures in pictureboxes that "looked" like cool controls because he was good with photoshop. He just used the picturebox events for the button or whatever events he was "drawing" on the screen. It was a vb6 class and the first time it fooled the teacher :) Then the teacher noticed the buttons didn't "press" when he clicked on them. In the second semister this guy was doing "rollover" (when the mouse is over the control) and press picture changes. It worked rather well when the computer was freshly booted, but if another class had used it all day and it's resources were draining away, all of the picture loading/redrawing would be visible. I know it's not proper, but it worked exceedingly well for his skills. Now if you said "Can you make those buttons a little bit bigger" he would either pull his hair out or throttle you because that ment he had to go back into photoshop and redo all of the images. :D Quote
neodammer Posted August 12, 2004 Posted August 12, 2004 hahaha. That gives me a challenge. To see if i can resize images in that way. Quote Enzin Research and Development
Denaes Posted August 12, 2004 Posted August 12, 2004 hahaha. That gives me a challenge. To see if i can resize images in that way. You can. If it's an even amount. If you add 20% to the length and width, it still looks fine. If you just have to add 20% to the width, it gets distorted and stretched. Also now, every load event is painting a picture AND resizing it. that takes a bit more CPU time and resources. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.