|
Rather than trying to make the program "unhackable", you could work on try and setting up a more secure environment for your program.
Use one or two firewall programs and secure your network connection.
|
|
|
|
|
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):
public WeelG27(Control ParentControl)
{
try
{
DeviceList gameControllerList = Manager.GetDevices(DeviceClass.GameControl,
EnumDevicesFlags.AttachedOnly);
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?
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
|
|
|
|
|
I want to draw a rectangle inside webcam application and I have built the camera where should I write the code to insert ROI please help me.
My code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Camera_app
{
public partial class Form1 : Form
{
Camera c;
List<Bitmap> imag = new List<Bitmap>();
public Form1()
{
InitializeComponent();
c = new Camera(cbox1);
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
c.Connect(cbox1, pbox1);
}
private void button3_Click(object sender, EventArgs e)
{
c.Disconnect();
}
private void button2_Click(object sender, EventArgs e)
{
c.Capture(pbox2);
}
private void pbox2_Click(object sender, EventArgs e)
{
}
private void panel3_Paint(object sender, PaintEventArgs e)
{
}
private void panel3_Paint_1(object sender, PaintEventArgs e)
{
}
private void pbox3_Click(object sender, EventArgs e)
{
}
private void panel5_Paint(object sender, PaintEventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Camera_app
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
|
|
|
|
|
You're going to have to be a bit more specific. Draw a rectangle on WHAT?? The Form? On top of a control?? On top of the video??
|
|
|
|
|
I am so sry about this . I want to draw an Roi over videosourceplayer of camera actually...
|
|
|
|
|
Well, that's not going to happen in Windows Forms code. Those pixels are owned by the control that is painting the video image and anything you draw on the control will be overwritten over and over again at the frame rate your video is being drawn at.
You'd have to use something like AForge.NET or OpenCVSharp to do an overlay. Google for them.
|
|
|
|
|
Hi guys,
I just want to know which would be faster or reliable between calling RPG program and using ODBC to query from AS400.?
Any comments and suggestions would be much appriciated.
Thanks so much
|
|
|
|
|
Which to use? It depends.
ODBC is probably simpler (and directly faster), but you bypass any business rules the RPG provides. So this is the first thing you need to decide for your circumstances. For example a well-established AS400 is pretty solid and the buisiness rules have probably evolved to a strong position, so you don't want to re-work those (favour calling RPG). Of course if you are looking to deprecate the RPG code base you would want to migrate it to the .net side (this favours ODBC, but will more than likely cause a lot of work).
To confuse the mix, further, newer versions of RPG are capable of exposing SOAP (and consuming) web services, you should consider those. My memory of these things is hazy (and we used a screenscraper in the end). I think you can also get biztalk to play with the iSeries, this provides a pathway for communication in more complex scenarios.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Thanks much Keith
You give me a great idea.
I think i'll use ODBC, it might give me a lot of work but in my case, would be the best option. Thanks again..
|
|
|
|
|
Please Help me to Upload XML file into the SQLServer2008
|
|
|
|
|
Using C#? What have you tried? There's lots of examples on Google that show how to save a text to a database.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Using C#? What have you tried? There's lots of examples on Google that show how to save a text to a database using C#
|
|
|
|
|
|
Trunkie wanna bun?
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Need I even point it out?
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Wondering if there is someone in this discussion forum who has experienced OfficeOpenXml to be able to give me some enlightenment on how to format cells (or column) so that it is becomes a Number, Category: Accounting or a Number, Category: Currency... all in an Excel spreadsheet
I have tried to do it for hours without any luck ... I do not know where to find documention on this except that of playing with the intellisense objects and would appreciate all the help anyone can give on the matter.
Thanks so much I really appreciate it.
Matt
|
|
|
|
|
You could try creating the spreadsheet, save it to XML and then look at the generated XML. Or you could try http://www.openoffice.org/[^].
Use the best guess
|
|
|
|
|
Thanks for the OpenXml link ... I really appreciate it ... it will help with getting additional info on this problem ..thanks
|
|
|
|
|
Hi
i make a setup in visual studio 2010 and a make it install to another laptop but the access 2010 database can not make update their queries but we can retrieve information from it.
What might be the problem?
|
|
|
|
|
If you can read from it, but not write to it, then the most likely problem is permissions on the file or the folder you have stored it in. It is probable that you have installed the database file in the application folder, which on the release machine means under one of the "Program Files" folder. Writes to these folders are heavily discouraged, and if you have done that it is a poor idea. It works on your development machine because the application is in the Debug or Release folder of your project - not the "Program Files" folder at all.
Have a look here: Where should I store my data?[^] and move you data to a more sensible location!
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
when i make the setup there are only application, user desktop and user's programs menu folder .
Where can i put my access database so the user can be modify?
|
|
|
|
|
Read the link I gave you.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
If i correctly understand i must use one of the following path as my path for my access database but how can i use it in c# ?
i must include it somewhere for example the Common.AppGuid where i have to use it?
Common.AppGuid 158aa00d-332e-440b-9c2c-47e2fc11c078
Common.AssemblyGuid 8d14ff7e-8d39-4163-a1ba-4fae4a5c361d
Common.UserDataFolder C:\Users\griff\AppData\Local\{158AA00D-332E-440B-9C2C-47E2FC11C078}\
Application.UserAppDataPath C:\Users\griff\AppData\Roaming\SetShares\SetShares\1.0.0.0
Common.UserRoamingDataFolder C:\Users\griff\AppData\Roaming\{158AA00D-332E-440B-9C2C-47E2FC11C078}\
Application.LocalUserAppDataPath C:\Users\griff\AppData\Local\SetShares\SetShares\1.0.0.0
Common.AllUsersDataFolder C:\ProgramData\{158AA00D-332E-440B-9C2C-47E2FC11C078}\
Application.CommonAppDataPath C:\ProgramData\SetShares\SetShares\1.0.0.0
thnx
|
|
|
|
|
Common.AppGuid is a value assigned to you application when you compile it.
Just add the methods, and store your file in the folder returned by AllUsersDataFolder
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Message Closed
modified 6-Jun-13 7:55am.
|
|
|
|