|
There is a application using directinput. I can't send keys with 'keybd_event', 'sendkey' ..etc.
How can I send keys to this application?
I cannot find any hints...
I think it's very difficult question.
Please let me know the answer.
|
|
|
|
|
DirectInput is part of the DriectX gaming SDK. It doesn't use the events like Windows does with normal forms. So you can't use SendKeys with it.
I don't know if this will work, but, in theory, you'd have to generate keyboard messages from inside a low-level keyboard hook. These messages would have to duplicate the key make and break messages that normally come out of the keyboard driver.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
a little confusion here from a c++ standpoint ... the positioning of a class around main? would you explain ... where (or must I) put all my classes,structs,static functions,etc. all within a sortof ghost class that encompasses 'main'... I'm running into alot of conflict with the complier not recognizing 'stuff' ... obviuosly I'm new to C# ... a quick consice explanation would be much appreciated.
Tommy
|
|
|
|
|
Unlike C++, C# requires that all functions be inside a class. So your Main method should be declared as a static member of a class.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I have an application that is to read data from a device, parse it and write in an SQL database table as records. The application is in c#.
An average of 8000 records are inserted into the table during every download from the device, and each record is 8 fields long, each field a few bytes (nothing big or complicated, just char and datetime fields).
I wonder how I can best perform the write in the database....should I use datasets or direct access? If datasets, is it better to load the whole table in memory and do an update at the end or fill the dataset, insert and update everytime a record is written?
I am shooting for performance and resource conservation.
Thanks
Chris
|
|
|
|
|
I think 8000 records is too heavy for the DataSets
Please check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bdadotnetarch031.asp
I would rather suggest you to create the insert statements programatically instead of relying on DataSets. The send the insert query to the database in batches.
It would increase the performance a lot.
Thanks,
Alomgir
|
|
|
|
|
create all the inserts and then release them as one block .
(put a ';' behind each insert)
that's how we do it
good luck.
No hurries, no worries.
|
|
|
|
|
I will try this idea and compare it with the insert statement everytime a record is received. Thanks a lot for this!
|
|
|
|
|
Hi all,
when I read the materials of c#, I have some questions about the class inheritance.
Let's say a method is declared as private in a base class (class A). If a child class (class B) is derived from class A, can the private method be inherited to class B?
for example,
class A
{
private myMethod()
{
}
}
class B : A
{
}
When an instance of class B is created, does it have the method "myMethod()"?
OR it has the method, but cannot access it?
I am confused by the phase "inherited class cannot ACCESS private method of the base class"
Thanks~~
|
|
|
|
|
Hi,
myMethod() WILL BE be inherited by class B. But since myMethod is marked as private, it cannnot be accessed within Class B.
rgds
pradeep TP
|
|
|
|
|
tttyip wrote:
When an instance of class B is created, does it have the method "myMethod()"?
What exactly do you mean by that? Most common object layouts doesn't include methods in them.
In any case, myMethod will exist at runtime, but the compiler disallows access to it when called on an instance of B.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
In my app there is a picture in the background, but on some PC's/Laptops, the picture becomes tiled, and it looks stupid.
How can i get it to stretch the picture if for some wierd reason it doesnt fit?
|
|
|
|
|
Please explain if u setting the picture as background of form or u using any picture box.
If u have picture box u can reset it
pictureBox.SizeMode=PictureBoxSizeMode.StretchImage;
I hope it will help u .And let me know the result.
Regards,
Lalit Narayan Dubey
ldubey@digisigntech.com
|
|
|
|
|
'Tis a background on the form, no picture box.
I didnt have problems with any pictures in picture boxes (i dont think?? )
|
|
|
|
|
Okay so I have a problem where I want to take any particular Xml Element such
as:
<window id="AdminWelcomeDlg" width="370" height="270" nominimize="yes">
And while the program is running to dynamically create a class that contains properties that map to each of the individual attributes, I believe it may be possible with reflection, but before I try this I wondered if nayone had any better ideas, or can advise if reflection would not be able to accomplish this.
Dave.
|
|
|
|
|
I need to create two funktions in Client-Assembly, delegate on Server must call the funktions. Any idea how?
|
|
|
|
|
Hi,
You can use interface approach for communication between client and server. Define delegate in shared dll (ur common file). Define one class that derives from EventArgs. Define events in the common interface. Use that common interface in client. Give event handlers to the events (here u can give ur functions that u want to be called from server). In server raise simply raise the events.
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
:(Hi all, I m new in c#, so plz plz help me making DataEntry Form using DataGrid alongwith Combo and DTP on it. plz plz i m worry about it.
reply on dcet99@hotmail.com
|
|
|
|
|
You haven't stated what your problem is, i suggest you search the articles on codeproject for DataGrid, there are some great articles here that explain everything in more detail than you will get on the forums.
Kev
|
|
|
|
|
http://www.codeproject.com/cs/miscctrl/RenDataGridComboBoxColumn.asp
may be useful to you.
|
|
|
|
|
Dear Guys,
I’m stuck up at some point in my chat application. I’m using remoting (SAO), for my application.
When client and server are on the same machine they work quite fine as expected, but when I shifted client on another machine, it throws the following exception. I’m using TCP channel. Using HTTP also it throws the same error. Anybody, who has worked on remoting, please help me.
Server encountered an internal error. For more information, turn on customError
s in the server's .config file.
Server stack trace:
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
at ChatMediator.IClientImplement.SendMessageTome(IClientImplement clientObjec
t)
at RemoteServer.Mediator.SendMessageToAll(IClientImplement ici) in E:\Jayant\
RemotingChatApplication\RemoteServer\Server.cs:line 73
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
hi,
I have a form with this.FormBorderStyle = FormBorderStyle.None; and I would like to display the standard shortcut menu that usually pops up when the user right clicks on a application button in the taskbar.
How can I do this? Any suggestion is highly appreciated
It would be cool to add some custom entries to the menu (as winamp does, see sceenshot[^]) but maybe I'm asking too much.
Thanks in advance
Jocker
_______
JeniuS - the file Organizer
|
|
|
|
|
private const int WS_CHILD = 0x40000000;
private const int WS_CLIPCHILDREN = 0x2000000;
private const int WS_MINIMIZEBOX = 0x20000;
private const int WS_MAXIMIZEBOX = 0x10000;
private const int WS_SYSMENU = 0x80000;
private const int CS_DBLCLKS = 0x8;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.Style = WS_CLIPCHILDREN | WS_MINIMIZEBOX | WS_SYSMENU;
cp.ClassStyle = CS_DBLCLKS;
return cp;
}
}
|
|
|
|
|
Hi all, i'm looking for a way to create a windows shortcut using C#.
I know about the COM library, IWshRuntimeLibrary but i'm having problems
using that on a windows 2000 machine
Is there a way of doing this without using a com object, just using .Net
libraries? It seems like a massive oversight if this functionality
has been missed from the .Net framework as shortcuts play a huge part
in the way windows is used by end users.
Any help / advice on this would really be apreciated.
Cheers
Kev
|
|
|
|
|
Hi,
take a look at this:
ShellLink
it uses some COM interfaces, but it does this automatically
I found it very useful in a couple of projects
Jocker
_______
JeniuS - the file Organizer
|
|
|
|