[EasyGuide]Draggable Graphical User Interface(FormBorederStyle= None).

01/29/2014 17:47 EOS 60D#1
Hello fella just wanna share how to make a draggable GUI and fit your image..

Things needed:

*Your desired image.
*Photoshop or Paint.net([Only registered and activated users can see links. Click Here To Register...]).. - Edit your image make sure to remove the background.(some image has white background color) I uses paint.net to remove it.
*VisualStudio


Instructions:

First make a new Windows Form Project :

[Only registered and activated users can see links. Click Here To Register...]




Change BorderStyle to None:
[Only registered and activated users can see links. Click Here To Register...]


Import a background image to your GUI:

BackgroundImageLayout should be : Stretch

[Only registered and activated users can see links. Click Here To Register...]


Change the BackColor and the TransparencyKey to your desire color! Take note BackColor and TransparencyKey should be the same Color.:

In this case i use black:

BackColor:
[Only registered and activated users can see links. Click Here To Register...]

TransparencyKey:
[Only registered and activated users can see links. Click Here To Register...]

Set StartPosition to CenterScreen : so it will start at center of your screen. It doesnt really matter..
[Only registered and activated users can see links. Click Here To Register...]

It should look like this:
[Only registered and activated users can see links. Click Here To Register...]

YOU ARE GOOD TO GO!

Debug it.

This is what it looks like after:
[Only registered and activated users can see links. Click Here To Register...]

Last part for draggable GUI:

Here some reference code to make it draggable:
Code:
        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case 132:
                    base.WndProc(ref m);
                    if ((int)m.Result == 1)
                        m.Result = (IntPtr)2;
                    return;

            }

            base.WndProc(ref m);
        }

There you go you have now your draggable borderless GUI!


Heres my custom AutoPatcher GUI:
PS: CREDITS TO OCULARIS FOR THE TEMPLATE!

Enjoy your new custom GUI! Good luck.
01/29/2014 23:02 Spirited#2
So, if I understand this guide correctly, it's just for making a form in C#?
Like... this guide here? [Only registered and activated users can see links. Click Here To Register...]
01/29/2014 23:30 EOS 60D#3
Quote:
Originally Posted by Spirited Fang View Post
So, if I understand this guide correctly, it's just for making a form in C#?
Like... this guide here? [Only registered and activated users can see links. Click Here To Register...]
I know you made a guide for GUI..This is just a guide how to make image fit to your GUI with no borderstyle and make it draggable.. i know its still GUI topic but in different case...
01/30/2014 00:24 Spirited#4
Quote:
Originally Posted by EOS 60D View Post
I know you made a guide for GUI..This is just a guide how to make image fit to your GUI with no borderstyle and make it draggable.. i know its still GUI topic but in different case...
Oh, duh. I see now. I forgot to add that to my tutorial. Well awesome job then. :p Sorry for my confusion.
01/30/2014 05:31 EOS 60D#5
Quote:
Originally Posted by Spirited Fang View Post
Oh, duh. I see now. I forgot to add that to my tutorial. Well awesome job then. :p Sorry for my confusion.
Dang theres no need to say sorry dude, and i wouldnt say its a good job,, this stuff can be find on google. i just wanna share this guide to those who wants to know how its done..
01/30/2014 12:48 Y u k i#6
Why are ppl still using Windows Forms? WPF can do the same, with much higher performance.
01/31/2014 00:17 KraHen#7
Because it`s super easy to use and does what it needs to do perfectly well. It all depends on what you`re making, if you`re creating a performance dependent, highly graphical application, then WPF is the way to go. WinForms does its job well for what it was made for.
01/31/2014 03:21 turk55#8
Quote:
Originally Posted by KraHen View Post
Because it`s super easy to use and does what it needs to do perfectly well. It all depends on what you`re making, if you`re creating a performance dependent, highly graphical application, then WPF is the way to go. WinForms does its job well for what it was made for.
Then again, if you work on a solid base even if it is for something small you should still do it. Should always make the program expandable even if it is not needed, you will never know whenever it can come in handy.
02/04/2014 17:32 Ultimation#9
i can't believe this is posted in Conquer guides lol.... the same thing can be applied to any game, shouldn't it be in a general section?
06/04/2014 07:22 justmadeit96#10
thanks a lot , awesome :)