|
I didn't know the CodeProject forum supports hint modes... Hrrrmmmm interesting may remember that for the future...
|
|
|
|
|
Thank You Pete O hanlon
I am following your hint
want to say ....."a unexpected reply from a expected person "
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Yep, you can and pretty good! You have to be more specific though, what kind of game would you like to develop....
|
|
|
|
|
I came to know that Arena Wars is developed in C#
want to know what are the basic requirements for developing a game i mean to say which classes i need to know ...........
Thank You Eduard Keilholz
I appreciate proper reply's
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Yeah, well there's a kind of framework vor game development called DirectX, it contains several classes for handling graphics, sound, user input (joysticks etc) everything your game needs. Since a while Microsoft brought an environment called XNA which you can use to develop games. It uses DirectX, but DirectX may become pretty complicated, XNA helps you out a lot of times, but don't underestimate game developers, you cannot just write a game like typing a letter in Word or so...
|
|
|
|
|
You can make a game in any language mate...
Try "XNA" or "DirectX" in a google search though if you want specific game building frameworks.
Mark.
|
|
|
|
|
Thanks for replying MarkBrock..
Can you give me a example of that game ...
I know asking for a code is a horrible thing ...
still any suggestions are welcome ...
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
I see you mentioned Arena Wars above, is that the sort of game you want to try and make?
You need to understand that the question you are asking is very vague.
If you want to build a simple windows game you can make it using a basic windows form and a picture box.
If you want to build something a bit more visually appealing (like Arena Wars) then your going down the road of DirectX and XNA - which is more complicated.
If you want to develop using DirectX in C#, google search and download the DirectX SDK. But I would recommend you google 'XNA' (and download it) and use that to start with.
Game programming is fun - but it takes a lot of work and patience to get a firm grip on all the different technologies and platforms you can develop with.
Mark.
|
|
|
|
|
Thanks for Your Valuable Reply..... I hope with practice and efforts i can learn using XNA,DIRECTX ....for developing games
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
|
Games programming is an incredibly complex topic. As mentioned, there's XNA/DirectX and also OpenGL. Then there's 2D and 3D. I would strongly recommend that you buy books on the area you are interested in and learn from those. Start off by learning the basic principals in 2D before attempting 3D - you really don't want to end up being discouraged early on.
If you are going the XNA route, there's a good games engine called Torque (by Garage Games) that coexists with it. This has lots of samples for you to work through, and could be a good place to start.
|
|
|
|
|
Thanks a lot for the reply's ..thanks to codeproject too
I have found where to initiate
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Clickety
You always pass failure on the way to success.
|
|
|
|
|
ALT + F4 wrote: other than board games
Sure; card games, dice games...
Probably not reindeer games though.
|
|
|
|
|
Hello,
I have created a windows service in c#. I would like to use windows service and print the "x" value in the active window wherever the cursor located. I have used Keybd_event to print the value. Unfortunately i am unable to see the value in the active window. I assume Keybd_event is not fired. I have added log messages before and after keybd_event event, log messages are creating perfectly. However if i use the same code to print the value from an windows application i am able to print the value. I am attaching my code whatever i have used to print the value
Here is the code i have used in windows service and application
using System;
using System.Collections.Generic;
using System.Text;
namespace SmartcardLibrary
{
public class PrintToScreen : KeyboardEvents
{
private static log4net.ILog logError = log4net.LogManager.GetLogger("SmartCardErrorLogger");
private const string NEW_LINE = "\n";
private const uint KEYEVENTFKEYUP = 0x2;
private const byte VKCAPSLOCK = 0x14;
private const byte SCCAPSLOCK = 0xBA;
private const byte VKTAB = 0x09;
private const byte SCTAB = 0x8F;
public static void Print(string input)
{
try
{
//logError.Error("PRINT SCREEN TAG ID: " + input + NEW_LINE);
input = input.ToUpper();
byte[] virtualKey = Encoding.UTF8.GetBytes(input);
byte[] bScanCode = new byte[input.Length];
for (int count = 0; count < virtualKey.Length; count++)
{
bScanCode[count] = ScanCode(virtualKey[count]);
}
for (int i = 0; i < virtualKey.Length; i++)
{
if (GetKeyState(VKCAPSLOCK) == 0)
keybd_event(VKCAPSLOCK, SCCAPSLOCK, 0, 0); //Caps Lock Press Event
keybd_event(virtualKey[i], bScanCode[i], 0, 0); //Key press event
//UnsafeNativeMethods.keybd_event(virtualKey[i], bScanCode[i], KEYEVENTF_KEYUP, 0); //Key release event
//UnsafeNativeMethods.keybd_event(VKCAPSLOCK, SCCAPSLOCK, KEYEVENTFKEYUP, 0); //Caps Lock release Event
}
keybd_event(VKTAB, SCTAB, 0, 0); //Tab press event
//logError.Error(input + NEW_LINE + NEW_LINE);
}
catch (Exception ex)
{
logError.Error(ex.Message + NEW_LINE + ex.StackTrace);
}
}
private static byte ScanCode(byte Character)
{
byte result = Convert.ToByte(MapVirtualKey(Character, 0x1)); //0x1 indicates VirtualCode to Scan code conversion
return result;
}
}///
}///
This code is working for application but not working for windows service...
your suggestions on this issue would be appreciated
|
|
|
|
|
Ummm... your Windows Service has an "active window"?
You probably don't want a Windows Service; won't a simple thread suffice?
What are you trying to do?
|
|
|
|
|
Hi,
I am building a web browser in C#.I am required to dynamically edit the Html Page currently displayed and add a javacript to it.How do i go about it?
After adding,how do I invoke this javascript?
Thanks in advance.....
|
|
|
|
|
You can add Javascript using the ClientScript.RegisterClientScriptBlock() method. You can also make sure the script is not already registered for the page by checking the ClientScript.IsClientScriptBlockRegistered property.
You can invoke the method by either adding a onload attribute to the body tag of your page, or just by calling a function in your javascript.
|
|
|
|
|
Which object exactly exposes this method ClientScript.RegisterClientScriptBlock()?
Am i missing any references in the project? namely System.Xml?
|
|
|
|
|
It's part of the Page class, and this assumes that you are doing this as an ASP.NET page. If you are doing this, then you should really have posted this in the ASP.NET forum.
|
|
|
|
|
Let me be clear enough!I am implementing a web browser in C#.
I need to dynamically change the page currently displayed on a web browser for example I want certain part of the page to be highlighted.
So I am not related to ASP.NET at all.
I think my subject line is the source of misguidance!
Any suggestions for my problem??
|
|
|
|
|
You can always gain access to the Html document through your web browser and then add the javascript to the DOM. This[^] article should give you an idea - but be aware that the webbrowser doesn't expose the IHtmlDocument2 as it stands. In .NET 2, you have to do some work to get the interface.
|
|
|
|
|
I havent been able figure out a way to find the IHTMLDocument interface....
Can u help me out with it???
|
|
|
|
|
From memory - you need to add a reference to MSHTML from Add references... (COM tab). Once you have this referenced in your project you should be able to do this:
IHTMLDocument2 doc = (IHTMLDocument2) webBrowser.Document.DomDocument; As I said, I'm doing this from memory so I apologise if it's MSHTML2 or something like that in the references dialog.
|
|
|
|
|
The method seems to be absolutely fine.....But
How do I add parameters to the javascript which i want to invoke?
Thanks In advance for getting me till here...
|
|
|
|