Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C# and Custom GUIs

Options
  • 09-10-2003 8:45pm
    #1
    Posts: 3,621 ✭✭✭


    Designing a Instant Messenger for my Final project and I want to make it skinnable. This would include replacing the standard titlebar and form appearence with images. What is the best way to appraoch this?
    Modifying the standard Forms.Form class? ( I know this involves handling some non client calls for areas such as the title bar)

    Or start with some other abstract class higher in the inheritence level and add all the functionality.

    Help appreciated


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    I don't know a way of doing this with the .NET Framework itself but you could use faithful old Win32 Api with platform invoke.

    I'd use GetWindowLong() and SetWindowLong() function in user32.dll. Look them up in the Windows Platform SDK. Alternatively look up how this is done on various C++ or VB sites and translate it to C#.

    What I do is get rid of the caption/title bar first of all. You could then emulate apparence using, say a label setting the properties to look like the caption bar. Then you have to get your min and max buttons in, you system menu if you want it and then start on your menus. Then you could compile the assembly and use it as the subclass for you Messenger project. Loads of fun! :)

    I've written code for getting rid of the title bar, you can also change the shape of the window giving it round corners or making it oval. Note, however, that I am new to the framework and there very well could be a way of doing all of this which is much quicker and tidier than what I've suggested.


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    I was pretty sure I'd read about this before...a quick google found this msdn page.

    Is this what you're trying to achieve?

    jc


  • Posts: 3,621 ✭✭✭ [Deleted User]


    Yeah different apprach but that looks promising Cheers!


Advertisement