Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 23:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Guide] How to Create a Graphic User Interface (GUI)

Discussion on [Guide] How to Create a Graphic User Interface (GUI) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
[Guide] How to Create a Graphic User Interface (GUI)

Luke, an administrator here, has decided that I am to be stripped of all my rights to develop here. I'm to be banned shortly simply because I own a board. I did nothing to instigate this, and I'm sorry you will be affected by this as well (if you're reading this). After years of developing here, I won't be a member of a community so willing to take everything away. This work will remain on my board (since they seem to want competition). Best regards.
Attached Files
File Type: rar Example.rar (34.9 KB, 283 views)
Spirited is offline  
Thanks
15 Users
Old 07/07/2011, 12:23   #2
 
elite*gold: 0
Join Date: Feb 2011
Posts: 26
Received Thanks: 1
Thanks, buddy. Good job, will help a lot of ppl including me I'll come with my results in few days. GJ again, and thanks
Froz3n:) is offline  
Old 07/07/2011, 12:32   #3
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Here are some more ideas from old GUIs that I've had:
Spirited is offline  
Thanks
1 User
Old 07/07/2011, 12:33   #4
 
elite*gold: 0
Join Date: May 2011
Posts: 168
Received Thanks: 33
Very nice. Very into detail. Thanks for this. +thanks
zTek is offline  
Old 07/07/2011, 12:36   #5


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
I really disagree with this method to add a GUI, to start with the GUI doesnt run off the main thread, it is the main thread, so any processing that is performed on the main thread that takes more than a few ms will cause the form to freeze (not that you should be processing on the main thread anyway), accessing controls across threads will cause exceptions unless you disable the illegalcrossthread check which is usually against best practice.

A by far much better method is to add a form to the application and then call it from a dedicated thread and have a method to perform updates on that thread, and if you wish hide the original console.

Pretty sure i raised these points last time, but it seems i need to do it again.
Korvacs is offline  
Old 07/07/2011, 12:40   #6
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by Korvacs View Post
I really disagree with this method to add a GUI, to start with the GUI doesnt run off the main thread, it is the main thread, so any processing that is performed on the main thread that takes more than a few ms will cause the form to freeze (not that you should be processing on the main thread anyway), accessing controls across threads will cause exceptions unless you disable the illegalcrossthread check which is usually against best practice.

A by far much better method is to add a form to the application and then call it from a dedicated thread and have a method to perform updates on that thread, and if you wish hide the original console.

Pretty sure i raised these points last time, but it seems i need to do it again.
A form that is launched in a new thread will not be processed on the main thread. If that were true, then additional threads running new forms would freeze previous forms (which isn't the case). And what exceptions? I'm writing an object to a string and having a different thread pick it up. It's not going to create any exceptions. You can't have a try and catch for everything you code.
Spirited is offline  
Old 07/07/2011, 12:42   #7


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by Fаng View Post
A form that is launched in a new thread will not be processed on the main thread. If that were true, then additional threads running new forms would freeze previous forms (which isn't the case).
Yes thats correct, thats what i was saying and why a GUI should be added on a seperate additional thread to the main, not converting the application to a GUI based application which changes the entire way that application handles its threading.
Korvacs is offline  
Old 07/07/2011, 12:44   #8
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by Korvacs View Post
Yes thats correct, thats what i was saying and why a GUI should be added on a seperate additional thread to the main, not converting the application to a GUI based application which changes the entire way that application handles its threading.
I've found no proof of that statement. =|
I've asked around... nobody knows what you're talking about.
The main thread keeps running until told to close- but that's the only difference I've found.

Edit: they use the same threading classes, the output control should act like a switch if I'm not mistaking. The main void creates the main thread by checking that output setting. That's what I've thought for a while now. Additional threads, whether or not the output is set to Console or Application, act the same as they've always acted in a console project.
Spirited is offline  
Old 07/07/2011, 12:57   #9


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
GUI's specify a specific type of COM Threading model that can drastically change the way COM objects/threads/Garbage collection are handled, consoles use a different type which is significantly more appropriate for server based applications.

Just because nobody else is aware of this doesnt mean it doesnt exist lol...
Korvacs is offline  
Old 07/07/2011, 13:19   #10
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by Korvacs View Post
GUI's specify a specific type of COM Threading model that can drastically change the way COM objects/threads/Garbage collection are handled, consoles use a different type which is significantly more appropriate for server based applications.

Just because nobody else is aware of this doesnt mean it doesnt exist lol...
I don't know where you're getting that information from. COM is only used under .NET Framework when told to (or that's what I read at least). Where is your information coming from Korvacs?

Edit: I literally cannot find any internet resource stating what you're saying.
Spirited is offline  
Old 07/07/2011, 13:53   #11


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Well we resolved this, COM Thread Models are a very important issue but not in this particular case (failed to read a spoiler ), but something everyone should read up about.
Korvacs is offline  
Old 07/07/2011, 20:06   #12
 
S/W's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 159
Received Thanks: 39
I got problem I change all Console.WriteLine to Program.WriteLine But GUI Console box don't print any text
S/W is offline  
Old 07/07/2011, 21:08   #13
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
I have never seen the point of making a GUI for your server. No others than yourself is going to see it anyways. If it's to access functions etc. faster, then it's like some few seconds we talk about.
BaussHacker is offline  
Old 07/07/2011, 23:59   #14
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by BaussHacker View Post
I have never seen the point of making a GUI for your server. No others than yourself is going to see it anyways. If it's to access functions etc. faster, then it's like some few seconds we talk about.
I haven't really either. I use a console. If you make a shortcut going to your console, you can change the font it uses so it looks cleaner- so I really don't care for GUIs much anymore.

Quote:
Originally Posted by S/W View Post
I got problem I change all Console.WriteLine to Program.WriteLine But GUI Console box don't print any text
Did you follow the guide and look at my examples? Are you starting the timer?

Quote:
Originally Posted by Korvacs View Post
Well we resolved this, COM Thread Models are a very important issue but not in this particular case (failed to read a spoiler ), but something everyone should read up about.
We're still uncertain if it complies with STA though... I'll add that one line to it just in case. It never hurts to be safe.

Edit: Done, for all of the people that have followed the guide already, add "[MTAThread]" above your Main void.
Spirited is offline  
Old 07/08/2011, 00:43   #15
 
S/W's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 159
Received Thanks: 39
Quote:
Originally Posted by Fаng View Post
I haven't really either. I use a console. If you make a shortcut going to your console, you can change the font it uses so it looks cleaner- so I really don't care for GUIs much anymore.



Did you follow the guide and look at my examples? Are you starting the timer?



We're still uncertain if it complies with STA though... I'll add that one line to it just in case. It never hurts to be safe.

Edit: Done, for all of the people that have followed the guide already, add "[MTAThread]" above your Main void.
Yes
S/W is offline  
Reply


Similar Threads Similar Threads
[HELP] How do i create a custom interface?
09/04/2015 - EO PServer Hosting - 7 Replies
Hey guys , Im just wondering if you could tell me or link me a guide of how to create a custom interface for eudemons online because i have no idea and i think that you all could help me i've saw it before on a few other servers. Thankyou from lewis :)
[HOW TO] Create a New Interface
11/27/2010 - Metin2 PServer Guides & Strategies - 30 Replies
Ich hoffe das TuT gab es nicht schonmal... Wenn doch sry, habe in der SuFu nichts gefunden :-( So fangen wir an : Was brauchen wir? -Einen Client -Die entpackten Etc.eix/epk Dateien -Irgendeinen Server Was müssen wir tun?
TAPLG Tester Needed (User Interface)
01/30/2007 - World of Warcraft - 3 Replies
As some of you might know im creating a Leveling Guide Addon for WoW, its for alliance, all races and all classes. Its currently still in the developing state and as for now only the race Draenei level 1-12 is finished. This guid will go up to level 70. I need a tester to check if its working the way i entended it to. If someone is interested please PM your icq number to me so we can talk more detailed. Only the first 5 will be abel to test this and give me feedback, i will post here...
FtH User Interface (Complete Interface)
09/05/2006 - World of Warcraft - 10 Replies
Hallo , ich will euch das wohl beste Interface nicht vorenthalten. For the Horde hat mit seiner ersten Version seines eigenen Interfaces schon gute arbeit geleistet. Aber das naja nich mehr ganz aktuele ist noch besser. http://web4.h60972.serverkompetenz.net/for...p?th readid=3465 <- DL Link. Dort gibt es aber auch den kompletten Guide zu dem Interface. Achja FTH benutzt X-Raid , nicht jedem seine Sache. Das Interface ist aber auch mit CT_RAID kompatibel.
User Interface von wow
12/10/2004 - WoW Guides & Templates - 2 Replies
auf worldofwarcraft.com wurde heute ein eigenes Tool gebastelt um User Interfaces zu basteln! links: Tool Tutorial worldofwarcraft.com ps: mmhh xml? ähm ist das das xml, was man auch bei selhtml ne einführung drüber bekommt?



All times are GMT +1. The time now is 23:48.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.