|
Um, I'm sorry, but I lost you... I understand some of what you're saying... but did I mention I'm new?
|
|
|
|
|
OK, perhaps you need to learn how to use C# in general before you worry about drawing boxes and having them collide. If you don't understand what I said at all, then you probably need to crawl before you walk, if your intention is to learn how to code.
If you broadly get it and just need some more specific answers, ask away.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What do you mean by onpaint?
|
|
|
|
|
On the forms events. Like onLoad, where you can run code after everything has been initialized, but before the form loads and is shown. There is an onpaint event, you should be able to find it in design view with all the other events.
|
|
|
|
|
As someone else said, your form draws itself in response to an event. That event ( the paint event ) is the only place you should be drawing on your form. A graphics object is passed to this event, this is the object you use to draw, and this particular instance is set up to draw whatever you like on your form.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If you just google collision detection you get loads of results, but basically there are two kinds, bounding box, and pixel perfect. But you only need pixel perfect for complex shapes, like the sprite of a character in a 2D game. Squares are easy. You can adapt a bounding box method to work with circles too i beleive.
|
|
|
|
|
Yeah, I've done lots of that, but I do need to get to basics... (sorry, had to eat). But, some of it's just boring to go through, and then there's the cool stuff. Thanks a lot.
|
|
|
|
|
Does anyone have any other trusted lnks as to where a beginner should go?
|
|
|
|
|
Really, a beginner should buy a book and work through it. After that, once you have a handle on C# in general, and the 'boring' bits, you shouldn't need any other resources than MSDN and this site. There are also MSDN forums, but I think these forums are better. By MSDN, I mean msdn.microsoft.com, where all the C# documentation is.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Honestly, I've got several, but, MAN! Books alone are tough. I'm going to look into a class (no pun intended). Thanks!
|
|
|
|
|
hi
i want to start programming for all type of mobiles like Java 2 Micro edition (J2ME), Is that any way or tools or compilers or .... for mobile Programming like java ?
i don't want programming just for smart phones or package pc, i want to programming with c#.net and compile my App to java and create .Jar file and run it in all type of mobiles.
thanks.
|
|
|
|
|
hdv212 wrote: i want to programming with c#.net and compile my App to java and create .Jar file
Not sure if such a thing exists
"Try asking what you want to know, rather than asking a question whose answer you know." - Christian Graus
|
|
|
|
|
Hi!
I think it could help if you read about the concepts of .NET, especially the CLR.
When you write a .NET program (be it C#, VB.NET, J#,...), it gets compiled to IL and a runtime has to interprete this IL.
This is similar to Java, but you have two completely different runtime environments: the JVM für Java, the .NET runtime for .NET.
You can install the .NET Compact Framework on mobile devices, though, and then run special .NET programs on these devices, too.
But they are and stay .NET programs and not Java applications!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi and Thanks mav.northwind
I know this, but i want to know is any tools,plugIns,Simulator,... for compile my .Net app to Java ? and create .jar file to run in all mobile devices (such as sonyEricsson,LG,Sumsong,Nokia, ....)?
thanks
|
|
|
|
|
In that case: No.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
good evening everyone
i have a textbox in registeration form that enable user to insert arrival date,that will be inserted into database through procedure,when i obtain this value inside textbox and convert it as follows
command.value=(datetime)textbox.text;
an error occurs saying (unable to convert string to datetime
please anyone tell me whats iam doing wrong
thanks in advance
|
|
|
|
|
Try a DatePicker or DateTimePicker instead.
|
|
|
|
|
If you don't want to use a picker, but want to start from some string information,
either use DateTime.TryParse to parse an entire date/time string, or use int.TryParse
to parse the numeric fields, then use the appropriate DateTime constructor.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi!
I am trying to create a simple example with the System.Timers.Timer, and i can not.
can someone show me where i need to declare in a win project this timer and how to use it(which event?how to declare it?)
I have searched the web but i get only complex examples and not the simple one, even in the MSDN.
Thanks
|
|
|
|
|
Hi,
the timer classes on MSDN contain a simple example.
I have an article on timers, it comes with some test/demo code.
The easiest timer to use (in a Windows app) is a Windows.Forms.Timer (not the System.
Timers.Timer since that one ticks on another thread).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Is it possible to specify the date and time of an outgoing System.Net.Mail.MailMessage?
|
|
|
|
|
The date/time to send the mail can ce stored in the property DeferredDeliveryTime . If DeferredDeliveryTime contains any value, the Exchange server will keep the mail in the outbox until the specified date/time.
____________________________________
There is no proof for this sentence.
|
|
|
|
|
I'v been making an app that communicates with my home pc from any other. One of the things it does is sends a message to my pc saying to delete a file or directory (and if its a file or directory its deleting)
Anyway, i tell it to delete a folder within My Documents (the folder was NOT empty, it had files and other folders within it)
So, my home pc calls
Directoty.Delete(path, true);
I have no idea what the hell happened, by all files and folders within my documents had been deleted. It should have come back with an exception because the folder was not empty right? How the hell did it get to the parent directory and start deleting everything?
|
|
|
|
|
Well, by passing a true to the Delete call, you are telling it to remove directories, subdirectories, and files in path. If you actually read the MSDN documentation on Directory.Delete(String, Boolean)[^], it says that an IOException will be thrown when dhe directory specified by path is read-only, or recursive is false and path is not an empty directory.
As to why it deleted starting at the wrong directory, how sure are you that the path you sent is actually the one that was received? Put some debugging statements in your client code and print out the path before actually performing the delete (or instead of it) to make sure it's working with the correct path.
|
|
|
|
|
I must have misread, i knew by using recursive it deleted subdirectories, but i thought they had to be empty of files.
But still, more care on my part in future, especially when dealing with delete()
|
|
|
|