|
Hello,
I have a small situation. Not quite a developer yet, so i need a top-down view from someone with experience.
I have a windows 7 box, and two mice connected to it, both using the windows default driver. As you can imagine they both work as a "mouse".
What do i have to do, to "manage" the input of the second mouse to make it do something else, not just mousing around? Use it's movement to map to keys, and so on and so forth.
Thank you in advance.
|
|
|
|
|
samoila.mircea wrote: What do i have to do, to "manage" the input of the second mouse to make it do something else, not just mousing around? Use it's movement to map to keys, and so on and so forth.
Learn C and write your own driver. This ain't possible in .NET, AFAIK.
I are Troll
|
|
|
|
|
If it were only one mouse, then you'd be using a mouse-hook. There's an example on that on Fourth mouse button[^]. I doubt that this technique will work with two mouses (especially if they're identical), but you might want to give it a try before diving deeper into the system.
The second alternative is to write a small application that communicates with the serial port. We got many samples on that on CodeProject, especially for .NET - the only drawback being that you're limited to mouses with an old 9 pins serial cable. In that case you'd be interpreting the signals coming from the serial port yourself, and these signals may vary per manufacturer, or even by product.
I have some c experience. Do you know any paid or free video tutorials on how to do this...
There aren't that much video's on driver-development, you'd best start off with the Windows Driver Kit. http://www.microsoft.com/whdc/Devtools/wdk/
What IDE does one use?
You'd best ask the guys in the C++ forum what they're using - last IDE that I used was Borland C++ Builder 5. That compiler is still freely available today, I believe.
A big thanks goes to Eddy Vluggen.
|
|
|
|
|
A pure guess this, but you might want take a look at the XNA/DirectX stuff.
I'm just thinking that it has more capability of reconizing multiple input devices.
tbh as the other replies have suggested the problem will be at the driver level, and the OS doesn't do/offer any distinction between connected 'mice'.
|
|
|
|
|
Hi friends..
I used entity data model with Microsoft Sql database since 6 months.
But today i use MySql database and generate model for that database.
I got error when i insert a record in a table which have relationships with two other tables.This table have unique rows based on those two related tables.So this table don't have any primary key..
I got the following error:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ......."
The table in which i insert data have not any primary key..So is it the reason for that error??
Please reply..Please also provide some good links for MySql+EntityDataModel if anybody have..
modified on Saturday, October 31, 2009 7:44 AM
The table in which i insert data have not any primary key..that was the reason for that error..
modified on Saturday, October 31, 2009 7:56 AM
|
|
|
|
|
hi all ,
I have already developed a website which is a finance portal.In the home page I have showcased data related to markets ((similar to any finance portal).I have left some empty zones to fill it with ad images.I have a separate Ad management application where I will upload ad images(jpeg,gif,bmp etc) and store it in the DB table.The ad management accesses data from another database.I want to pick a sample Ad image and put it in the homepage in the zone already created in a dynamic manner(coding).I dont have any CMS like MOSS.Can anyone let me know how it can be done?
note:When i create a ad I specify in which page it must appear.In this case it is home page along with when it should appear etc.
Thanx in advance.
T.Balaji
T.Balaji
|
|
|
|
|
Ok here is the issue.
I make an application, that the user can store various data in a MS ACCESS DATABASE.
I make all the connections, etc. and everything works ok.
So i test run my application.I insert data to the database through my program.Everything works ok.
I want to fix a bug.I correct the program and re run the app.
The database is empty now and i have to re-enter the data.
Even the slightest change in the program code, deletes the data from the database.
Is this normal ?
Thanks
|
|
|
|
|
Johnkokk wrote: Is this normal ?
No, unless you included code to that effect.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Note that when i test run my app, i do it through the IDE.
Here are the steps, so that you can understand better.
1.Write some VB. net code.
2.Run through IDE
3.Insert data to database through my app
4.Find a bug
5.Stop the execution
6.Correct the bug
7.Re run the app through the IDE
Data that i inserted on step 3, are deleted and Database is empty.
If i open the database with MS ACCESS, fill some data there and run it from my app, everything is OK.
|
|
|
|
|
In Solution Explorer Window click your database file node (the one with the little golden cylinder icon) then hit F4.
Is 'Copy To Output Directory' set to 'Copy Always' (I think this is the default). If so, change it to 'Copy if Newer' or 'Never' once you understand what they mean.
I have been caught by this when I first started. What happens by default is that each time you run the app VS copies your empty database to your output directory, overwriting your nice data filled one.
'Copy if Newer' only does so if you change the DB in some way, so you need to take steps to protect the data you have entered.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
That makes perfect sense.
Putting data files in a Visual Studio folder is something I like to avoid.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Yep.
Unfortunately, a couple of the MSDN HOWTO:s/WALKTHROUGH:s tell you to do it that way. Project|Add Item|Database.........
It usually mentions (or links to a page that does) the 'Copy Always' problem but it is well hidden.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Yeap, that was it.The "Copy always" thing.
I knew it was not "normal".
Thanks people.
|
|
|
|
|
Is there a way to set the printer output bin in .NET? It seems to be missing from the settings.
|
|
|
|
|
how can i code voice record with c# languge
|
|
|
|
|
sura945 wrote: how can i code voice record with c# languge
By programming the required functions. You might want to start with doing some research. There's a component on CodeProject[^] that can record sound.
HTH
I are Troll
|
|
|
|
|
hi
i have an idea on strong names
but i want in detail that are there any disadvantages in using strong names in my application.
Can u briefly explain me the concept that will be more helpful for me
thank you
|
|
|
|
|
Here[^]
only two letters away from being an asset
|
|
|
|
|
Hi All,
How can I raise/mimic Menu click event from some other control's(TextBox) event(TextChanged).
Actually I want to see Menu rolldown on event of text change in TextBox.
Can anyone please help?
Thanks in Advance,
Vipul
|
|
|
|
|
First identify the environment, Windows or Web?
only two letters away from being an asset
|
|
|
|
|
I want to implement in WinForms.
Thanks,
Vipul
|
|
|
|
|
I got the answer.
Its ToolStripMenuItem.ShowDropDown() function. That was easy
Thanks,
Vipul
|
|
|
|
|
I want to add text to a transparent bitmap (in C# 2.0). The text can be black, white, or red. But it seems that when I use the DrawString method of the Graphics object it antialias the text with black. This works okay when I have white or red text and the transparent bitmap is shown over a mainly black background, but looks crap when I have black or red text and the transparent bitmap is shown over a mainly white background. (White text looks blurred, red text has black bits round edges.)
Does anyone know how to antialias to white on a transparent graphic? Or antialias to transparent properly?
(I have tried setting the bitmap to white first. Then after the text has been added, floodfilling back to transparent. Sort of works except all the closed loops in letters like o, d, b, p ... etc.)
|
|
|
|
|
I found this[^], which seems to have some work arounds, from a quick google on c# antialias problems
The link above is from fairly near the top of a loooooong list.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I don't think it's possible to generate a semi-transparent bitmap with a single alpha value per pixel which will properly render ClearType text against arbitrarily-colored backgrounds (when drawing yellow text on a black background, a particular pixel may have to be red, but when drawing on a white background it may have to be yellow).
If one refrains from ClearType-style use of colors for sub-pixel addressing, one could generate a bitmap that would depict a nicely anti-aliased font when overlaid on any background, by setting the color of any area of the bitmap which touched the letters to the font color, and varying the alpha to properly soften the edges. I don't think that's what Microsoft does, though.
Still, you might want to experiment some with the property (I forget what it's called) that switches between drawing using an alpha value, or copying an alpha value to drawn pixels).
It would be nice if there were a way of restricting drawing operations to either act only on the alpha channel, or leave the alpha channel alone while acting on color. I'm unaware of how to do those things, though.
|
|
|
|