Results 1 to 10 of 10

Thread: [RESOLVED] System wide hotkey in j#

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    7

    Resolved [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
    Last edited by ggaarreett; Oct 25th, 2006 at 12:31 AM.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: System wide hotkey in j#

    J# is not C# , though it has some similarities ...You can ask Java folks

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    7

    Re: System wide hotkey in j#

    allready did
    they said post here
    lol

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    7

    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...

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: System wide hotkey in j#

    Convert what?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    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.

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    7

    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?

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  10. #10

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    7

    Re: System wide hotkey in j#

    thank you very much.
    that helps alot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width