|
That is for some MKS toolkit. You probably don't have it, whatever it is.
There were quite a few methods to signal keypresses in Win32 API. SendInput(), keybd_event(), SetKeyboardState(). Look them up in MSDN for more details.
|
|
|
|
|
thank you very much, i will look those up
|
|
|
|
|
|
Check out this article for info on how to use Win32 functions in C#:
http://www.codeproject.com/dotnet/PInvoke.asp
|
|
|
|
|
Anyone help me !!!!
1) How to set a color to ToolBar ?
2) How to set a color to ToolBarButton ?
Thank YOu
|
|
|
|
|
You looking for?
ToolBar.BackColor
Not too sure on the Button
|
|
|
|
|
Thank You. I know/try this property.
Unfortunately, ToolBar.BackColor won't work
|
|
|
|
|
Sorry man, didn't know that you'd tried that. It appears to be overridden and maybe this was done just so that the toolbar could inherit from Control but not do anything for the backcolor property. You might have to write your own if you're set on changing the color.
|
|
|
|
|
Hi, I am making an application that requires a global keyboard hook, so i am using the one i found on this website: http://www.codeproject.com/csharp/globalhook.asp
However when i try to creat a new hook:
hook = new UserActivityHook();
It throws an exception:
throw new Exception("SetWindowsHookEx failed.");
why is this happening (i am using visual studio whitbey, c#, .NET framework v2)
|
|
|
|
|
EDIT: it seems to work only when u launch the exe (not im debug)
why is that?
|
|
|
|
|
hey guys,
i'm working on a program which will be able to display as many types of images as possible. I'm kind of a newbie, but thus far i can view the typical .jpg and .gif files. As well as a couple others such as bitmaps. However, i have many flash animations, which i have made, and i would like a way to display these flash animations/videos in the program as well. I know in internet explorer and other web programs, this is done through the flash plugin. Can i do this similarly with a program.
As i'm kind of a newbie, this may be way over my head, but if it can be done without dozens of lines of code, please send me your thoughts on how this can be accopmlished. or just tell me i'm stupid and that it isn't possible.;)
<marquee>thanks!!!
|
|
|
|
|
I have made a simple 3D engine capable of rendering simple meshes and X-File based meshes. It works kinda well, but I got a problem with HLSL.
How can I create and use a simple Effect written in HLSL??
Does anyone know how to do that?
"Every rule in a world of bits and bytes can be bend or eventually be broken"
|
|
|
|
|
|
Nick's solution works for Managed DirectX 9. How you do it in your 3D engine is implementation-specific. I recommend you use Managed DirectX 9 for your application. Yes, this requires DirectX but it has much better support and the Managed library is a ground-up development, not just a simple wrapper around the typelibs for DX.
A good book to learn about MDX9 is Managed DirectX 9 Kick Start : Graphics and Game Programming[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I did build the engine from managed directX. This is because it was the easiest way to build it. Thanks for the tip of the book.
I got the effects to work now
"Every rule in a world of bits and bytes can be bend or eventually be broken"
|
|
|
|
|
Hello,
First of all ,thank you for your concern.
My program which im going to show to my superiors, consists of a main form which acts as an image viewer,where i can open an image in one picture box and zoom into the image.The zoomed image appears in a second picture box.Now, in the menu there is a "rotate " menu item which opens a child form which asks for the degree of required rotation.
In my program, when the child form opens , it stays in the background of the main form.Any controls (picture boxes etc.)of the main form always stay in the foreground.
how can i solve this problem
Thank you
thank you
|
|
|
|
|
You mean when you call Form.Show or Form.ShowDialog (don't forget to call Dispose in the latter case when done with the Form ), it goes to the background? If that's the case, more explanation about what your application is doing at the time is necessary.
If you want the child form to always be in the foreground even when the main form is clicked, once you instantiate the child Form set it's Owner to the main Form , or call AddOwnedForm on the main Form passing the child Form as the parameter. Use Form.Show instead of Form.ShowDialog (creates a modal dialog in the latter case). This will create a modeless Form that is owned and subsequently closed by the main form.
See the .NET Framework SDK documentation for the Form.Owner property and Form.AddOwnedForm method for more information.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
You're not supposed to have controls or anything else like that in an MDI main window. You have to put everything into plain child windows or MDI child windows.
|
|
|
|
|
Hi,
I'm pretty sure this is as easy as it gets, but I couldn't find anything in the documentation.
I'd like to change the string representation of an int so, that the numbers get padded with 0's up to a certain amount of characters: For example I'd like to pad up to 4 characters, then a 17 should look like this '0017'.
Any help is greatly appreceated.
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
If you take a look at Numeric Format Strings[^] in the .NET Framework SDK documentation, you'll see the following will work:
using System;
class Test
{
static void Main(string[] args)
{
int i = 17;
Console.WriteLine(i.ToString("0000"));
Console.WriteLine("{0:0000}", i);
}
}
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Try looking up Format Specifications. What you want is something like "%04d"
|
|
|
|
|
This is C# Mark, not C/C++.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Right, my mistake. Damn all these languages.
|
|
|
|
|
I have a collection object that contains hierarchical data... Here's how it looks:
ID, Name, ParentID, Description
=================================
1 , Bob, NULL, I'm a parent
2 , Sam, 3, I'm a child
3 , Tom, NULL, I'm a parent
4 , Jill, 1, I'm a child
5 , Kid, 2, I'm a grandchild
I need to get these items into a tree stucture... Notice that the list is unordered. My coder sensors sense a recursive routine, but I'm wondering if there is some other solution hanging out there I haven't thought of.
Thanks,
Adam
|
|
|
|
|
I've developed a system like this that is actually quite fast, and have posted the solution here before. One thing to add, though, use TreeView.BeginUpdate and TreeView.EndUpdate before and after you build the tree, respectively.
See http://www.codeproject.com/script/comments/forums.asp?msg=911562&forumid=1649#xx911562xx[^] for details (which includes a link to another thread where I've discussed this before).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|