Click here to Skip to main content
15,915,508 members
Home / Discussions / C#
   

C#

 
GeneralRe: Disable automatic sorting in DGV Pin
baranils23-Mar-08 4:39
baranils23-Mar-08 4:39 
GeneralRe: Disable automatic sorting in DGV Pin
baranils23-Mar-08 11:17
baranils23-Mar-08 11:17 
GeneralRe: Disable automatic sorting in DGV Pin
Xmen Real 23-Mar-08 14:01
professional Xmen Real 23-Mar-08 14:01 
GeneralRe: Disable automatic sorting in DGV Pin
baranils23-Mar-08 20:54
baranils23-Mar-08 20:54 
GeneralRe: Disable automatic sorting in DGV Pin
baranils23-Mar-08 21:59
baranils23-Mar-08 21:59 
QuestionHow to use COM components in .net application Pin
mukkanti00722-Mar-08 21:20
mukkanti00722-Mar-08 21:20 
AnswerRe: How to use COM components in .net application Pin
sarvesh.upadhyay24-Mar-08 1:28
professionalsarvesh.upadhyay24-Mar-08 1:28 
Generalkeyboard to xbox controller Pin
sakirah22-Mar-08 16:17
sakirah22-Mar-08 16:17 
Hello..

I have this code:

<br />
float x = 0.5f;<br />
float y = 1.0f;<br />
<br />
private void ProcessInput(float amountOfMovement)<br />
        {<br />
            Vector3 moveVector = new Vector3();<br />
<br />
            KeyboardState keys = Keyboard.GetState();<br />
            if (keys.IsKeyDown(Keys.Right))<br />
                moveVector.X += amountOfMovement;<br />
            if (keys.IsKeyDown(Keys.Left))<br />
                moveVector.X -= amountOfMovement;<br />
            if (keys.IsKeyDown(Keys.Down))<br />
                moveVector.Y -= amountOfMovement;<br />
            if (keys.IsKeyDown(Keys.Up))<br />
                moveVector.Y += amountOfMovement;<br />
<br />
            if (keys.IsKeyDown(Keys.Add))<br />
                x += 0.1f;<br />
                y += 0.1f;<br />
            if (keys.IsKeyDown(Keys.Subtract))<br />
                x -= 0.1f;<br />
                y -= 0.1f;<br />
<br />
            Matrix cameraRotation = Matrix.CreateRotationX(cameraAngles.X) * Matrix.CreateRotationZ(cameraAngles.Z);<br />
            cameraPosition += Vector3.Transform(moveVector, cameraRotation);<br />
<br />
            MouseState currentMouseState = Mouse.GetState();<br />
            if (currentMouseState.X != previousMouseState.X)<br />
                cameraAngles.Z -= amountOfMovement / 80.0f * (currentMouseState.X - previousMouseState.X);<br />
            if (currentMouseState.Y != previousMouseState.Y)<br />
                cameraAngles.X -= amountOfMovement / 80.0f * (currentMouseState.Y - previousMouseState.Y);<br />
            Mouse.SetPosition(Window.ClientBounds.Width / 2, Window.ClientBounds.Height / 2);<br />
        }


how to change it to gamepad code?

[img]http://img488.imageshack.us/img488/6241/signaturesakirahku9.jpg[/img]

GeneralRe: keyboard to xbox controller Pin
User 665823-Mar-08 3:32
User 665823-Mar-08 3:32 
GeneralCurrent sorted row in DGV Pin
baranils22-Mar-08 10:54
baranils22-Mar-08 10:54 
GeneralRe: Current sorted row in DGV Pin
Luc Pattyn22-Mar-08 14:02
sitebuilderLuc Pattyn22-Mar-08 14:02 
QuestionAccess Environment Variables: C# Pin
Yasithl22-Mar-08 10:26
Yasithl22-Mar-08 10:26 
GeneralRe: Access Environment Variables: C# Pin
Giorgi Dalakishvili22-Mar-08 10:52
mentorGiorgi Dalakishvili22-Mar-08 10:52 
GeneralQuestion about how Sockets work Pin
Jordanwb22-Mar-08 9:30
Jordanwb22-Mar-08 9:30 
GeneralRe: Question about how Sockets work Pin
Jordanwb22-Mar-08 15:50
Jordanwb22-Mar-08 15:50 
GeneralRe: Question about how Sockets work Pin
Shy Agam23-Mar-08 9:57
Shy Agam23-Mar-08 9:57 
GeneralRe: Question about how Sockets work [modified] Pin
Jordanwb23-Mar-08 12:44
Jordanwb23-Mar-08 12:44 
GeneralRe: Question about how Sockets work [modified] Pin
Jordanwb24-Mar-08 6:49
Jordanwb24-Mar-08 6:49 
QuestionChange text of messageBox buttons Pin
pcaeiro22-Mar-08 7:19
pcaeiro22-Mar-08 7:19 
GeneralRe: Change text of messageBox buttons Pin
Gareth H22-Mar-08 9:15
Gareth H22-Mar-08 9:15 
GeneralRe: Change text of messageBox buttons Pin
Giorgi Dalakishvili22-Mar-08 9:53
mentorGiorgi Dalakishvili22-Mar-08 9:53 
GeneralRe: Change text of messageBox buttons Pin
Pete O'Hanlon22-Mar-08 9:59
mvePete O'Hanlon22-Mar-08 9:59 
GeneralRe: Change text of messageBox buttons Pin
CPallini23-Mar-08 0:41
mveCPallini23-Mar-08 0:41 
GeneralRe: Change text of messageBox buttons Pin
pcaeiro23-Mar-08 1:42
pcaeiro23-Mar-08 1:42 
Questioncombo box moving and adding items. Pin
steve_rm22-Mar-08 7:15
steve_rm22-Mar-08 7:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.