Click here to Skip to main content
15,921,279 members
Home / Discussions / C#
   

C#

 
AnswerRe: Program opening Delay time Pin
Abhinav S7-Jun-13 7:26
Abhinav S7-Jun-13 7:26 
AnswerRe: Program opening Delay time Pin
Keld Ølykke8-Jun-13 22:45
Keld Ølykke8-Jun-13 22:45 
QuestionImplementing Digital Signature Algorithm with Secure Hash Algorithm (DSAwithSHA1) Pin
Ankur Rawat6-Jun-13 23:08
Ankur Rawat6-Jun-13 23:08 
QuestionRe: Implementing Digital Signature Algorithm with Secure Hash Algorithm (DSAwithSHA1) Pin
Eddy Vluggen6-Jun-13 23:55
professionalEddy Vluggen6-Jun-13 23:55 
AnswerRe: Implementing Digital Signature Algorithm with Secure Hash Algorithm (DSAwithSHA1) Pin
Ankur Rawat9-Jun-13 20:36
Ankur Rawat9-Jun-13 20:36 
GeneralRe: Implementing Digital Signature Algorithm with Secure Hash Algorithm (DSAwithSHA1) Pin
Eddy Vluggen10-Jun-13 2:50
professionalEddy Vluggen10-Jun-13 2:50 
Questionproblem in saving an image in windows application Pin
Arun kumar Gautam6-Jun-13 20:02
Arun kumar Gautam6-Jun-13 20:02 
AnswerRe: problem in saving an image in windows application Pin
Richard MacCutchan6-Jun-13 21:17
mveRichard MacCutchan6-Jun-13 21:17 
GeneralMessage Closed Pin
7-Jun-13 0:46
amit293917-Jun-13 0:46 
GeneralRe: problem in saving an image in windows application Pin
Richard MacCutchan7-Jun-13 1:03
mveRichard MacCutchan7-Jun-13 1:03 
AnswerRe: problem in saving an image in windows application Pin
amit293917-Jun-13 1:10
amit293917-Jun-13 1:10 
QuestionConvert Latitude Longitude To X Y Pixel (C#) Pin
zerozaaa6-Jun-13 18:26
zerozaaa6-Jun-13 18:26 
AnswerRe: Convert Latitude Longitude To X Y Pixel (C#) Pin
Eddy Vluggen6-Jun-13 23:54
professionalEddy Vluggen6-Jun-13 23:54 
QuestionInternet Security Pin
MAW306-Jun-13 13:25
MAW306-Jun-13 13:25 
AnswerRe: Internet Security Pin
Dave Kreskowiak6-Jun-13 16:21
mveDave Kreskowiak6-Jun-13 16:21 
AnswerRe: Internet Security Pin
Eddy Vluggen6-Jun-13 23:46
professionalEddy Vluggen6-Jun-13 23:46 
AnswerRe: Internet Security Pin
Abhinav S7-Jun-13 19:06
Abhinav S7-Jun-13 19:06 
QuestionLogitech G27 Steering Wheel input in C# Pin
razvan_grebla6-Jun-13 10:43
razvan_grebla6-Jun-13 10:43 
Hello everyone,

I tried to get the input data (wheel, acceleration , break values, etc)from my Logitech G27 steering wheel in a C#.


I read a some articles about joysticks, and controllers (e.g. PS, XBOX), like: Interfacing with a Joystick using C# By M Harris.


I've implemented the following class (like in the example above):
C#
public WeelG27(Control ParentControl)
    {
        try
        {
            // Find all the GameControl devices that are attached.
            DeviceList gameControllerList = Manager.GetDevices(DeviceClass.GameControl,
                                                                EnumDevicesFlags.AttachedOnly);

            // Verify if there are gamecontroller attached
            if (gameControllerList.Count > 0)
            {

                foreach (DeviceInstance devInst in gameControllerList)
                {
                    if (devInst.DeviceType == DeviceType.Driving && devInst.ProductName.Contains("Logitech G27 Racing Wheel USB"))
                    {
                        Wheel = new Device(devInst.InstanceGuid);
                        Wheel.SetCooperativeLevel(ParentControl, CooperativeLevelFlags.Background | CooperativeLevelFlags.Exclusive);
                        Wheel.SetDataFormat(DeviceDataFormat.Joystick);
                        Wheel.Properties.AxisModeAbsolute = true;
                        Wheel.Properties.AutoCenter = false;
                        Wheel.Acquire();                        
                    }
                }
            }

            if (Wheel == null)
            {
                throw new NotImplementedException();
            }

        }

        catch (Exception Ex)
        {
            MessageBox.Show("WeelG27() Constructor error!\n" + Ex.Message + "\n" + Ex.StackTrace);
        }
    }


Problems:
- After acquiring the device, the wheel cannot be moved (it is blocked and moves maximum 10 degrees left and right from center).
- Tried to set the Cooperative Level to Foreground (use the wheel only when application is active) but Poll() function throws an error when the tool is still pooling (thread or timer).


Does anyone had this problems? Solved this problems, or know how to solve them? Smile | :)


I would appreciate also some tips (or start points) on how:
- to move the wheel to different positions (from the tool).
- set different wheel properties (e.g. steering wheel maximum rotation angle or combine axes).
- make a mechanism so that I can assign dynamical button functionality (like in most games, you can choose what buttons you use to set different actions e.g. Wheel Button 1 -> Start Motor).



Thank you for help!
Razvan

QuestionWebcam Application Pin
Bishwajit Nepali6-Jun-13 6:23
Bishwajit Nepali6-Jun-13 6:23 
AnswerRe: Webcam Application Pin
Dave Kreskowiak6-Jun-13 7:43
mveDave Kreskowiak6-Jun-13 7:43 
GeneralRe: Webcam Application Pin
Bishwajit Nepali6-Jun-13 8:54
Bishwajit Nepali6-Jun-13 8:54 
GeneralRe: Webcam Application Pin
Dave Kreskowiak6-Jun-13 10:08
mveDave Kreskowiak6-Jun-13 10:08 
QuestionCalling RPG program or Query using odbc connection to AS400 Pin
Kiko.176-Jun-13 1:42
professionalKiko.176-Jun-13 1:42 
AnswerRe: Calling RPG program or Query using odbc connection to AS400 Pin
Keith Barrow6-Jun-13 2:36
professionalKeith Barrow6-Jun-13 2:36 
GeneralRe: Calling RPG program or Query using odbc connection to AS400 Pin
Kiko.176-Jun-13 16:32
professionalKiko.176-Jun-13 16:32 

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.