The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 9:31 am



 [ 21 posts ]  Go to page 1, 2  Next
C++ *and Java* Help 
Author Message
User avatar

Joined: Mon Aug 11, 2008 6:40 am
Posts: 1648
Location: ... Not America
Well... here's a thread where you can ask questions about C++/Java
Thaiberium, take the Java part of this.


Mon Apr 06, 2009 4:19 pm
User avatar

Joined: Sat Aug 16, 2008 8:38 am
Posts: 6670
Location: Darkest Antartica
Country: Pakistan (pk)
Gender: Male
Skype: Thaiberium
Currently Playing: The Game
So, how do you make a Window in C++ without having to access the form editor?

_________________
Image


Mon Apr 06, 2009 4:29 pm
User avatar

Joined: Mon Aug 11, 2008 6:40 am
Posts: 1648
Location: ... Not America
Thaiberium wrote:
So, how do you make a Window in C++ without having to access the form editor?

Win32 or Normal C++?


Mon Apr 06, 2009 4:30 pm
User avatar

Joined: Sat Aug 16, 2008 8:38 am
Posts: 6670
Location: Darkest Antartica
Country: Pakistan (pk)
Gender: Male
Skype: Thaiberium
Currently Playing: The Game
I mean like, you just type code and a window appears.

Example in Java
Code:
import javax.swing.*;

public static void main(String[] args){
   JFrame window = new JFrame("Window");
   window.setVisible(true);
}

This creates a window when you run the program. How do you do that in C++?

_________________
Image


Mon Apr 06, 2009 4:41 pm
User avatar

Joined: Mon Aug 11, 2008 6:40 am
Posts: 1648
Location: ... Not America
Code:
using namespace System::Windows::Formsl

System::Windows::Forms::Form^ form1;

this->form1 = (gcnew System::Windows::Forms::Form());
this->Controls->Add(form1);
this->form1->Visible(true);

Java looks pretty much like C#, in my point of view though


Mon Apr 06, 2009 4:58 pm
User avatar

Joined: Wed Nov 12, 2008 9:23 pm
Posts: 124
Location: Charlotte, NC
Gender: Male
In c++ how would you code to press a key on the keyboard?

_________________
Game Maker Awesomenessness
http://www.youtube.com/watch?v=11DylA2AuJI

[NF] wrote:
*f#%$& you*


Image


Mon Apr 06, 2009 7:48 pm
User avatar

Joined: Sat Aug 16, 2008 8:38 am
Posts: 6670
Location: Darkest Antartica
Country: Pakistan (pk)
Gender: Male
Skype: Thaiberium
Currently Playing: The Game
Wow, that C++ code looks rather complicated. Then again, I don't know how its properly packaged.

_________________
Image


Tue Apr 07, 2009 4:13 am
User avatar

Joined: Mon Aug 11, 2008 6:40 am
Posts: 1648
Location: ... Not America
necrolium wrote:
In c++ how would you code to press a key on the keyboard?

Code:
void textBox1_KeyDown(Object* /*sender*/, System::Windows::Forms::KeyEventArgs* e)
{
if (e->KeyCode == Keys::A)
{
 //Do whatever you like
}
}



Tue Apr 07, 2009 3:24 pm
User avatar

Joined: Wed Nov 12, 2008 9:23 pm
Posts: 124
Location: Charlotte, NC
Gender: Male
Why do you need that system::forms::windows:: thing for?

_________________
Game Maker Awesomenessness
http://www.youtube.com/watch?v=11DylA2AuJI

[NF] wrote:
*f#%$& you*


Image


Tue Apr 07, 2009 3:43 pm
User avatar

Joined: Mon Aug 11, 2008 6:40 am
Posts: 1648
Location: ... Not America
necrolium wrote:
Why do you need that system::forms::windows:: thing for?

you need it to implement automatic functions


Tue Apr 07, 2009 5:55 pm
User avatar

Joined: Wed Nov 12, 2008 9:23 pm
Posts: 124
Location: Charlotte, NC
Gender: Male
What is an automatic function?

_________________
Game Maker Awesomenessness
http://www.youtube.com/watch?v=11DylA2AuJI

[NF] wrote:
*f#%$& you*


Image


Tue Apr 07, 2009 6:38 pm
User avatar

Joined: Sat Aug 16, 2008 8:38 am
Posts: 6670
Location: Darkest Antartica
Country: Pakistan (pk)
Gender: Male
Skype: Thaiberium
Currently Playing: The Game
You might want to read up on Object Oriented programming theory and the basics of C++ (or Java) before attempting anything like games or apps on it.

_________________
Image


Wed Apr 08, 2009 11:33 am
User avatar

Joined: Wed Nov 12, 2008 9:23 pm
Posts: 124
Location: Charlotte, NC
Gender: Male
I'm just asking I don't really use mine.

_________________
Game Maker Awesomenessness
http://www.youtube.com/watch?v=11DylA2AuJI

[NF] wrote:
*f#%$& you*


Image


Wed Apr 08, 2009 12:20 pm
User avatar

Joined: Sat Aug 16, 2008 8:38 am
Posts: 6670
Location: Darkest Antartica
Country: Pakistan (pk)
Gender: Male
Skype: Thaiberium
Currently Playing: The Game
If were well read up, it wouldn't be a question now is it? Learning other PLs outside academics requires a lot of self-study.

_________________
Image


Thu Apr 09, 2009 1:06 pm
User avatar

Joined: Fri Jan 02, 2009 6:02 pm
Posts: 7283
Location: Australia
Country: Australia (au)
Gender: Male
MGN Username: Tid
Currently Playing: Deep™ The™ Game™
I plan on learning c++ soon. Good choice/bad choice?

_________________
ImageImageImageImage
Ask me anything!!!
Special thanks to Steven for my beautiful Deep avatar! <3


Mon Apr 27, 2009 6:17 am
WWW
Display posts from previous:  Sort by  
 [ 21 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.