|
I can check whether there is a collision for between two objects
eg. Rectangle boxrect = box.Frame()
if(char.Frame().Intersectswith(boxrect)
but i want to know if i can check whether there is a collision with anything in the room at the time.
If so could i do this, then use a switch(*what it intersected with*)
to do different things depending on what the character is intersecting with, instead of doing a check for every single thing in the game
|
|
|
|
|
Hi all,
What is the best method( Keeping performance in mind) to store a list of integer items( Number unknown) in .NET ?
Regards,
Sugandh
|
|
|
|
|
You'll get best performance if you use arrays. But arrays will only work if the container size is known in advance. Otherwise you're better off using ArrayList.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello
Is there an easy way to find out to if the computer is connected to the internet?
I was thinking at using HttpWebRequest and HttpWebResponse. Than i will check if there is comming an exception or a "page not found".
I want to know if there is a better way to check the internet connection.
Thanks
Roggey
|
|
|
|
|
Try searching this forum and you should find your answer. The same question was answered a couple of weeks ago by a couple of persons.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Hi,
The setup is as follows: I have a UserControl where the user can enter some data which I want to check using the validating event. The validation code does two things. First it tries to correct as many errors as it can (this involves giving focus to the UserControl if one or more errors are found). If all errors could not be corrected it highlights them in the UserControl and pops up a MessageBox. If no errors are corrected or highlighted during validation everything is fine (Leave -> Validating). If any error is corrected the validating event is fired one (Leave -> Validating -> Enter (Still Validating)) or two times depending on where I click in the Form (other components). If the validation occurs twice the following events are fired in the following order.
Leave -> Validating -> Enter (Still Validating) -> Leave (After First Validation is finished) -> Validating
This problem does not occur if the UserControl is not given the focus when validating. However, for the UserControl to function correctly it is necessary to give it focus when errors are corrected during validation.
If no error is corrected (or focus is not given to the UserControl) but highlighted the validating event may also fire twice depending on where I click in the Form (this always happens when closing the form).
Leave -> Validating -> Enter -> Leave -> Validating -> Enter
Any help explaining what is going on would be greatly appriciated.
|
|
|
|
|
Morrgan wrote:
for the UserControl to function correctly it is necessary to give it focus when errors are corrected during validation.
Why? By doing this, you're breaking an already fragile sequence of events.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
I decided to skip the entire error correction phase. It was necessary to give the UserControl focus since it contains a third-party control which crashes when performing certain operations while unfocused.
|
|
|
|
|
Hi all,
How to write a windows service that will display a MessageBox "hello" everytime the OS starup, or display a form, or run Program at the startup.
Cuz i want to write a small program that will run at the startup, but dont know how ^_^. I try the sample in MSDN but it's doesn't work !
|
|
|
|
|
hi,
Easiest way to run a program is add application to the startup directory..
In addition,You can give this option when building setup to the Application exe.
(for example installshield express setup wizard will do it for you)
regards ,
pubudu..
|
|
|
|
|
lol, that not the way i want ! i just want it run at the startup and dont appear on the startup directory, so how ????
|
|
|
|
|
Hello every body,
I know C and a little OOP and C++. What should I do for starting C#? Should I learn OOP or C++ at first? Give me some reference, please.
Best.
|
|
|
|
|
|
A beginner's book for C# would not be a bad idea either
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
You can't really learn C# without learning OOP, because C# forces OO, unlike C++, which just allows it. I'd suggest buying a book like 'Inside C# Second Edition' by Tom Archer ( actually, not LIKE this book, you need this book IMO ). If the book is too heavy for you, buy something like the Jesse Liberty book on C# from O'Reilly, and then move into Tom's book as you are able.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi all
I am going to develop payroll using C#.I want to find out best way to communicate with databases.I have heard Microsoft Enterprise Library can give a support to easier the coding..
Can any one tell me purpose of the Enterprise Library(Pattern and Practice)
any suggestion ,greatly appreciated.
Thanks in advance..
|
|
|
|
|
Microsoft Enterprise Library is an Application Framework consisting of 7 or 8 Application Blocks (can't really remember the number). Each block deals with a different category of common issues that you would otherwise had to go through in your code (such as logging block, database block, exception block, etc.). It's not only used for database development.
You have the option to select which of the blocks you want to include in your code, and each one of them comes with a variety of classes and methods that ease the development and handle things in the Microsoft recommend way (afterall they are written by Microsoft).
When it comes to Databases, from what I can remember, currently the Ent. Library supports only Oracle and SQL Server. I am not sure about the rest (Odbc and so on).
If you are only interested in Database development then a good alternative would be the RapTier framework. Google for it, it's quite good, it supports all database types, and it comes with a good documentation.
Hope this helps.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Suppose a process notepad.exe has started. I like to know how to detect a period of inactivity of a user for that process, for instance how long the user has not entered anything into notepad.Maybe System.Diagnostics can solve this problem but i did not find much information on the websites.Hope to gather some advice here.
Thanks a lot
|
|
|
|
|
Hello, everyone.
I have a problem about the coordination system of mouse pointer in
different monitors.
My windows application program is developed using MS Visual Studio
.Net 2003 in C#.
First I insert a MS chart component into the form. Then I added a tooltip
into the form to show the x, y values of the location of mouse pointer when the mouse moves into the chart component.
I tested my program in a desktop with an old Phillip S105 monitor, then in
a desktop with hp 1730 monitor, and lastly in an Acer laptop.
The tooltip output values from Phillip S105 monitor are completely
different with the results from other two monitors of the same position
on the chart.
The locations and sizes of the chart are exactly the same because I use
the same program to test. The resolutions of monitors make no differences.
Does anyone have such kind of problems before?
Please help.
|
|
|
|
|
Your monitor does not interact with your computer, it simply accepts data and displays it. There is simply no way that the monitor that's plugged into your PC could make your code behave differently. You need to look again to see what the source of the problem is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a dll(in C++). Now I must use a method in it. The method has a parameter of "double **", so how can I managed it to .net?
The class Marshal in .net include a method "Copy", but it can only copy the data of one dimesion from managed code to unmanaged or vice-versa. How to copy a 2 dimesion array ? Please help me !
thanks a lot.
welspring
hope for help
|
|
|
|
|
A ** is a jagged array - perhaps you can create the first array level, and then step through and use Copy to create each of the sub arrays ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Can you give me an Example?
hope for help
|
|
|
|
|
Sorry, I've not tried it. I suggest you find an API function that uses a double ** ( assuming this isn't one already ), and try www.pinvoke.net, see if they have a signature for it. I'd have expected double [][] to work ( it is the same as a double ** ). Actually, pointers are supported in C#, perhaps you could just use pointers directly ( dunno here, I've never tried, but I have certainly used pointers )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks! I will try it!
hope for help
|
|
|
|