[RESOLVED] System wide hotkey in j#
ive been trying to make a system wide hotkey in j#.
ive looked everywhere for j# code for it but all i can find is vb.
can anyone help me?
please post a sample if you can
much thanks to everyone that can help me
........................................
edit........
i found the solution thanks to the users in this forum
i coded a c# dll and used j# to call on it. if anyone needs it, just reply and say so and ill post it
thank you
Re: System wide hotkey in j#
J# is not C# , though it has some similarities ...You can ask Java folks
Re: System wide hotkey in j#
allready did
they said post here
lol
Re: System wide hotkey in j#
Then use an on-line converter to turn the VB.NET code you have into C# code and then convert that to J# yourself. I've never written any J# but I imagine that it's pretty similar to C#, and any C# prgrammer worth thier salt should be able to look at VB.NET code and see the principles being applied and then apply those principles themselves in C# in the vast majority of cases. If I'm not mistaken setting a keyboard hook is a matter of declaring and calling a Windows API function and then overriding your form's WndProc method to catch the message when the hook is activated. If you know how to do those two things in J# then you know how to set and use a keyboard hook. Instead of looking for specific J# examples of keyboard hooks just learn the principles in J# and then apply those principles to the specific situation.
Re: System wide hotkey in j#
i tried your idea... didnt work
i dont know c# very well.
i guess im just screwed then
if anyone wants to convert it and post it then please do so...
Re: System wide hotkey in j#
Re: System wide hotkey in j#
Well , can't you just wrap VB.NET or C# code in a dll , and use it in your J# project.
Re: System wide hotkey in j#
im new to coding in general
i know java and thats why i picked j# because it seemed like a smooth transition...
how would you convert it into a dll? and how could i use it from there?
Re: System wide hotkey in j#
The entire .NET Framework is a series of DLLs that were compiled from C# code so you're already doing it. You can create a class library project in VB Express or C# Express or whatever is appropriate for the code you have. You then compile that project and it outputs a DLL. You can then include a reference to that DLL in your J# project and then use the types it contains, just as you include references to the DLLs that make up the .NET Framework.
Re: System wide hotkey in j#
thank you very much.
that helps alot.