|
I want to control gamepad in C# but i don't know how!
Using directinput?
or else?
is anyone have any sourcecode about this?
please help me!
sorry because of my poor English
|
|
|
|
|
DirectInput is what you need to use.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for your reply
But can tell me more detail?
i don't know how to use directinput in C# to control gamepad
thanks;)
|
|
|
|
|
Download, install and read the docs for the DirectX SDK. It has sample code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Instead of the quite bulky DirectInput you can simply P/invoke the joy* functions. I've done this to support a footswitch that's behaving like a joystick and it works well.
THis MSDN article[^] might help you.
Regards,
mav
|
|
|
|
|
i did it!
Really Really thanks,
|
|
|
|
|
Hi,
Are there any tools(commercial or free) to convert c#
runtime intermediate output to those non-runtime intermediate
language exe so that user cant re-engineering the exe easily ?
thanks
|
|
|
|
|
|
They don't really help that much, and htey sure don't do what he's hoping for.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No, there are no tools to do this that I know of. You can run ngen, but it has to be run on the target machine, so unless you're distributing the dll by hand....
The best you can do is obsfucate your code with one of the obsfucators out there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
This is driving me mad, two almost identical code segments, one works the other does not.
Trying to push data to a Crystal Report
The code is
______________________________________________________________________________
private void accessrpt_Load(object sender, System.EventArgs e)<br />
{<br />
rpt_log rpt1=new rpt_log();<br />
<br />
sqlstring="SELECT STATUS, SITE, START_OF_ROAD, DEPARTED, ARRIVED, END_OF_ROAD, NAME, REASON, ACTION, COMPANY, ROAD_CHECK_REQUIRED, COMMENTS, SITE FROM ARADMIN.TCC_SITE_ARRIVAL_LOG WHERE (NAME = '"+Class1.strVariable +"')";<br />
System.Data.OracleClient.OracleConnection oconn= new System.Data.OracleClient.OracleConnection("user id=hidden;datasource=oracle1;password=hidden");<br />
<br />
System.Data.OracleClient.OracleDataAdapter oda= new System.Data.OracleClient.OracleDataAdapter(sqlstring,oconn);<br />
<br />
oda.Fill(tcc_log1);<br />
tcc_log1.WriteXml("c:\\datadump.xml");<br />
<br />
rpt1.SetDataSource(tcc_log1);<br />
log_rep.ReportSource=rpt1;<br />
}<br /> ______________________________________________________________________________
I know the dataset is correct - the XML dump is exacly what the SQL requests.
But cystal reports pointing to the same dataset (as on the last two lines of the sample above) shows the correct headings, gives no error messages but shows no data.
Can anybody suggest where I am going wrong ?
Thanks
|
|
|
|
|
Solved the problem (oh for good error trapping reports)
I needed to apps the table as well as the datatest to Crystal reports
i.e. rpt1.SetDataSource(tcc_log1.Tables[1])not what was used.
|
|
|
|
|
wat does this mean >> Type or namespace definition, or end-of-file expected
can someone advise me wat to do..
|
|
|
|
|
My first guess would be that you don't have your { and } braces paired up properly. One of them is probably missing somewhere.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I would like to display a Cursors.WaitCursor on a ListView control, so I tried:
listView.Cursor = Cursors.WaitCursor;
but it doesn't work at all, I see always the default cursor.I know its a known ug in .NET 1.0 and probably fixed in 1.1. But I need workaround for 1.0.
I would appreciate any help in this regard.
Live Life King Size
Alomgir Miah
|
|
|
|
|
Hi,
I also had the same problem.I think it is not working with list views!
Have a nice day!
|
|
|
|
|
hi everyone;
my problem:
I have a userControl
in this usercontrol, I have a child control (a button)
when the mouse moves over the userControl, I can detect the movement using
MouseMove event.
the problem is when the mouse is on the child control : I can t detect
anything when the mouse move. userControl don t recieve the MouseMove event.
I did many search on this problem, but solutions I found are not elegant:
1- using hooks (not a part of .net platform)
2- the child control report the mouse movement to the parent control (the
userControl here)
please, can u explain me how to solve this problem?
thnks
n.b.: sorry for my english
|
|
|
|
|
derive a Class from Button ;
override MouseEvent in derived class !
d
|
|
|
|
|
mmmm, yes,
after overriding the MouseEvent, I do what?
|
|
|
|
|
I would like to save the state of some objects to disk. I do not want to use .NET Serialization classes. I want to write my own.
Can I pass the name of a class into a method and use it to cast an expression? This would allow me to write sort of a generalized "serialization method" to change any property variable to a String, write it to a file, read it from the file, and re-initialize the original property.
Thanks!
Mark
|
|
|
|
|
Reflection will probably allow you to do this. A better way would be to use C# 2.0 and write a templated class.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hey guys,
I was wondering if anyone knows of a way to plug into the IE login form to be able to tell if the Cancel button is pressed. Right now, I'm just using the DocumentError event to tell if I should refresh or just cancel. Unfortunately, the event for cancelling the action is the same as the Access denied error.
Anyone have any thoughts? Is there any way to plug into the IE login events?
Thanks,
-Dave
|
|
|
|
|
Here's the deal, I have a peer to peer connection where one side pushes across a web address to the other side. Now both applications navigate to this URL and display its contents. I would like to capture any navigation errors that occur...namely if the page cannot be found. Instead of displaying the standard 404 'Page Cannot Be Found' error I'd like to insert my own page, something along the lines of 'Content Server Cannot Be Found'. Now I know there's a NavigationError event that can be thrown, but not sure how to use it...here's a code snippet that I'm working from.
private void item_DoubleClick(object sender, System.EventArgs e)<br />
{<br />
Node selNode = this.item.SelectedNode;<br />
if (selNode != null)<br />
{<br />
<br />
Tag tag = (Tag)selNode.Tag;<br />
if (tag.type == TYPE.FILE)<br />
{ <br />
string url = tag.url;<br />
<br />
if (url != "")<br />
{<br />
Shell shell = (Shell)this.ParentForm;<br />
Object nobj=null;<br />
string urlval=url;<br />
<br />
shell.WB.Navigate(url,ref nobj,ref nobj,ref nobj,ref nobj);<br />
if (shell.RTC!=null)<br />
{<br />
shell.RTC.SendMsg("URL:" + urlval);<br />
}<br />
}<br />
}<br />
}<br />
}
Any an all help at capturing the navigation timeout error would be greatly appreciated! Thanks again
~rcurrie
|
|
|
|
|
The NavigateError event will be raised whenever the browser has some sort of error. If you timeout, the event will be raised and the messagebox will say your "Content server cannot be found" error.
Hopefully that'll help!
-llamaindustries
|
|
|
|