|
|
Does anyone know some great articles or sites on XNA that really explain their code well and have code, so a beginner to XNA can learn something?
- I love D-flat!
|
|
|
|
|
This site has some videos about XNA:
http://www.xnatutorial.com/[^]
If this isn't good enough for you, then try Google.
Kristian Sixhoej
"Failure is not an option" - Gene Kranz
|
|
|
|
|
Are the Microsoft sites not good enough then?
Kevin
|
|
|
|
|
I don't have the membership, soo it's not much use, but they do have some goodies.
- I love D-flat!
|
|
|
|
|
I understand the idea of how to make a bunch of rectangles in random places, but I just can't follow through. You would have rect1 - 25 . You would have Random r . How would I make them draw at random places on a form? Thanks in advance.
- I love D-flat!
|
|
|
|
|
Hi,
in the OnPaint method of the Control/Form you want to draw your shapes in, have a for loop
that generates random x,y,width,height values (all within legal bounds), and call
Graphics.DrawRectangle (or FillRectangle) for each of them.
Alternatively, generate those numbers elsewhere and store them; then have your OnPaint feed
them to Graphics.DrawRectangle.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
How would I select a large amount of (say) rect1 - 25? I saw a post a while back that did something close, but I can't find it. It's like...
(my example)
rect(and a for loop here)<br />
{<br />
<br />
}
... or something like it
-- modified at 11:28 Saturday 1st December, 2007
- I love D-flat!
|
|
|
|
|
Something along these lines:
List< Rectangle> rects=new List< Rectangle>;
Random rand=new Random();
for (int i=0; i< RECT_COUNT; i++) {
int x=rand.Next(xBounds);
int y=rand.Next(yBounds);
int w=rand.Next(widBounds);
int h=rand.Next(heiBounds);
Rect r=new Rectangle(x,y,w,h);
rects.Add(r);
}
...
Graphics g=e.Graphics;
foreach(Rectangle r in rects) {
g.DrawRectangle(r);
}
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Oh. Thanks.
- I love D-flat!
|
|
|
|
|
I want to clip the cursor into any closed figure that have been drawn using graphicspath and have been transformed aswell. I want this to be done in GDI of C#. The default clip property of cursor is limited to clip it under rectangular area.
Sharjeel H Khan
|
|
|
|
|
I have declared an array like this
"ArrayList tableNames = new ArrayList();"
and I have added some values to it using
"tableNames.Add(row["TABLE_NAME"].ToString());"
Now I want to traverse it untill the last element.
Reply Hurry!
Regards,
chanzeb chaudhary
|
|
|
|
|
StringBuilder mybuilder=new StringBuilder();
foreach(string s in tableNames)
{
mybuilder.Append(s)
}
|
|
|
|
|
chanzeb wrote:
Reply Hurry!
That is rather rude.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
chanzeb wrote: Reply Hurry
You must be joking.
Your question tells me that you're very new to C#. You should buy a beginner book and work through it. You should certainly be aware of basic language constructs like for each before you start trying to work with databases, etc.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
First, learn about foreach .
Second, learn about System.Collections.Generic.List<string> .
Third, learn that the .ToString() on your row["TABLE_NAME"] is likely unnecessary, try a cast instead.
Fourth, if you're already traversing a DataTable why are you even asking?
|
|
|
|
|
what will i do to have an inputed value in a textbox in form 1 and and have that value appears on another textbox in form2?
thanks!!
|
|
|
|
|
|
hello can sombady help me with this problem.
i want open and close a form with wan button.
|
|
|
|
|
Open and close the SAME form with one button, or two different forms?
Have you tried this yourself yet? Did you come to a problem, and if so, what was it?
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
Please rephrase question because it is not very clear what you are wanting to do.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
hi
I have an event defined in a base class. I'd like to raise this directly from a derived class, but the compiler won't let me do this, so instead I created a method RaiseMyEvent(...) to raise the event in the base class. Can I raise the event a simpler way? (otherwise I'd need to create a RaiseEventX function for each event..)
thanks!
|
|
|
|
|
No you can't.
There is a really good article on events here
[^].
|
|
|
|
|
when we create application form in visual c# in solution tab there is some think name refrence what is this plz any tell me in detail
wasim khan
|
|
|
|
|
If you define a reference to another assembly in a project, you can call code in that assembly from the project.
BTW, this is a pretty basic question. You should really read a beginner's book on C#.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|