Server Help

Non-Subspace Related Coding - Windows programming "commands" in C

tcsoccerman - Wed Apr 25, 2007 9:28 pm
Post subject: Windows programming "commands" in C
I'm looking for a list of windows programming "commands" such as MB_CREATE
MB_DESTROY

and things like that. maybe message box too. a real nice tutorial would be nice too with lots of examples, that's how i learn best :)
tansey - Wed Apr 25, 2007 11:31 pm
Post subject:
MSDN seems like the obvious choice...

I'm not sure by what you mean commands, but between MSDN and codeproject.com, you can find 90% of the stuff you will need to get to an intermediate level.
tcsoccerman - Thu Apr 26, 2007 4:58 pm
Post subject:
url? i can't seem to find MSDN.
SamHughes - Thu Apr 26, 2007 5:01 pm
Post subject:
http://msdn.microsoft.com/
tcsoccerman - Fri Apr 27, 2007 5:23 pm
Post subject:
I'm using visual basic, and i'm having problems with opening files. i can open it, but the "visual" part, that lets you practially place buttons on you're program by clicking and dragging doesn't open. if it does, it's not "visual" but just code. how do i open it right?

-----------------------------
got that to work


a little help on going about using files that the user creates as part of the data so each use is different?
Mine GO BOOM - Fri Apr 27, 2007 8:59 pm
Post subject:
I'd heavily suggest moving to C#. It is more powerful, easily to use (for the most part), more supported, and is a popular language to get a job with as well. VB is a running joke among programmers for a reason.
tcsoccerman - Sat Apr 28, 2007 9:45 am
Post subject:
Could you still help me though?
Animate Dreams - Sat Apr 28, 2007 12:16 pm
Post subject:
Erm, it will probably be easier to get help if you switch to C#. Basically, just stay away from VB. Though I'm not sure why the two languages are associated, myself.
tcsoccerman - Sat Apr 28, 2007 12:31 pm
Post subject:
Ok i switched to c#. i wasn't very far on my vb project, and i'm already caught up. i'm trying to recgonize mouseclicks and there for trigger dialogs and such. eventdriven programming. a more complete tutorial would be nice if anyone knows one.
Doc Flabby - Sat Apr 28, 2007 12:51 pm
Post subject:
Animate Dreams wrote:
Though I'm not sure why the two languages are associated, myself.


They never used to be, the last real version of VB was VB6

VB.net and C# use the same VM, they just have different syntax.
tcsoccerman - Wed May 02, 2007 7:45 pm
Post subject:
So...no one knows of a good tutorial... does anyone else even make apps in c#? maybe we can start a project or something.
Mine GO BOOM - Thu May 03, 2007 4:42 am
Post subject:
In C#? I try not to, because they did a very good job of wrapping everything. Of course, it allows you to make direct C calls on any library, so you can still do any function that C can, just need to make sure you enable the 'not safe' flags during compiling.
Doc Flabby - Thu May 03, 2007 5:25 am
Post subject:
I'm currently devlopeing a commercial program in c# with a sqlite data store. Quite alot of websites use c# (most websites with with .aspx pages). Its not a bad language to learn. But its not a language that is very useful to code games in (too slow).

If you want to learn c#
http://www.csharp-station.com/Tutorials/Lesson01.aspx
Doesnt look like a bad place to start.

The hardest bit of c# is understanding the OOP stuff and how it can make things alot easier. If you are going to code in c# and can't get hold of a copy of visual studio (don't use the express versions they have annoying restrictions) use sharpdevlop
http://www.icsharpcode.net/OpenSource/SD/
tcsoccerman - Thu May 03, 2007 9:16 pm
Post subject:
Actually i found a better website

http://www.samspublishing.com/library/content.asp?b=STY_Csharp_24hours&seqNum=178&rl=1

but anyways, i get this error(loook at website for more info) when i try to make a save dialog box, and open dialog box, i'm using docflabby's compiler that he suggested. here is the error:


Code: Show/Hide
Static member 'System.Windows.Forms.DialogResult.Cancel' cannot be accessed with an instance reference; qualify it with a type name instead (CS0176)


this seems like a good and thorough/up to date website. any ideas? ty for any.
Mine GO BOOM - Thu May 03, 2007 11:48 pm
Post subject:
Doc Flabby wrote:
But its not a language that is very useful to code games in (too slow).

With OpenGL, any language can be good for normal games. Sure, you won't see the next Unreal or Half-Life engine written in C#, but with things like PyGame, any language can do what top line games 2-3 years ago did.
Doc Flabby - Fri May 04, 2007 7:14 am
Post subject:
My suggestion would be learn about classes and objects before even trying any to do with windows forms. The error is related to using a class method in the incorrect way as you are trying to call it from an object.
System.Windows.Forms.DialogResult.Cancel is a static (class level) variable. You don't need need to create an object to access it.
The code from the tutorial is correct:
Code: Show/Hide

if (saveFileDialog1.ShowDialog() != DialogResult.Cancel)
   txtDestination.Text = saveFileDialog1.FileName;


Mine GO BOOM wrote:
[..]
With OpenGL, any language can be good for normal games. Sure, you won't see the next Unreal or Half-Life engine written in C#, but with things like PyGame, any language can do what top line games 2-3 years ago did.

I have to admit i just assumed it would be too slow, as i have never done any game programming in languages like python,c# or java, thats interesting.

So would they be any reason why a new subspace client could not be coded in a language such as those?
Dr Brain - Fri May 04, 2007 8:24 am
Post subject:
Doc Flabby wrote:
So would they be any reason why a new subspace client could not be coded in a language such as those?


Lack of examples, since everyone that's tried hasn't really known what they were doing.
tcsoccerman - Fri May 04, 2007 2:27 pm
Post subject:
Could someone tell me what a function in C/C++ would be in c#. that way i can look into it more. i'm guessing it's a class or an object by what the tutorial is saying. it be nice to have a comparision is all.
Mine GO BOOM - Fri May 04, 2007 7:43 pm
Post subject:
Functions in C# are called methods. If you want a generic function like making your own power of two:
Code: Show/Hide
int pow2(int number)
{
   return number * number;
}

Code: Show/Hide
static class MyMath
{
   static public int pow2(int number)
   {
      return number * number;
   }
}

The static means you can call the function by name MyMath.pow2(3) without having to do anything special about classes. Everything has to be inside a class, but those classes don't have to be treated like objects.
tcsoccerman - Fri May 04, 2007 10:28 pm
Post subject:
another question, if i wanted to add text into a text box, instead of declaring the text like this:

Code: Show/Hide
textbox.Text = label1.text


what would i do? i suppose you could obtain the current text and then declare the next text;something like this:

Code: Show/Hide
textbox.Text = old_text;
   textbox.text = "%s%s", old_text, new_text;


the only problem there is that i don't know if that is correct in line 2, i'm just using my C language knowledge, i'll have to look more into that.
Samapico - Sat May 05, 2007 1:12 am
Post subject:
Code: Show/Hide
string newtext = "thisisnewstuff";

textbox.Text = textbox.Text + newtext;

or
Code: Show/Hide
string newtext = "thisisnewstuff";
textbox.Text += newtext;

would work as well
tcsoccerman - Mon May 14, 2007 9:10 pm
Post subject:
back to the idea of savedialog and open dialogue.

i got it to work, although, i am required to have a textbox named "txtSource" on my application according to this website:
http://www.samspublishing.com/library/content.asp?b=STY_Csharp_24hours&seqNum=178&rl=1

i KNOW theres a way w/out a textbox. could someone explain where im going wrong? gracias.
Mine GO BOOM - Tue May 15, 2007 12:51 am
Post subject:
That is only an example they use to show you that it selected that file. You can save the open dialog result to any string variable.
tcsoccerman - Tue May 15, 2007 6:21 pm
Post subject:
Ok, so i don't even need that coding? I'll try that. Also, my savedialogue doesn't seem to work. It acts as if it is saving, but when i go to open it it isn't there. Do i need to code the saving part?
Bak - Tue May 15, 2007 7:36 pm
Post subject:
yes, all the save dialog will do it tell you where they want to save the file.
tcsoccerman - Tue May 15, 2007 9:19 pm
Post subject:
Ok, i've been trying really hard to do the save and open thing. i've been using FileWrite file = .... and StreamWrite...and sr.close and all that, but i just can't seem to get a hang of it. Right now, all i need is someone to make a project that simply has a textbox and opens and saves files. nothing else is required, it's best the mroe simple it is. the buttons can be sloppy if you want even. ty very much, this will expand my possibilities by a mile!(or two).

p.s. i use sharpdevelop compiler, but i don't think it matters.(c#)
Mine GO BOOM - Tue May 15, 2007 10:03 pm
Post subject:
5 minutes with Google, and I created this.
tcsoccerman - Wed May 16, 2007 5:16 pm
Post subject:
I try and extract all, but than it says no files exist???? i use winzip i'm pretty sure.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group