How to extract the mouse cursor image without using JNI

I want to get the image of the mouse cursor of the system using java. The Robot class captures the screen only, but the mouse icon image is not the part of the screen, so it is not easily detected. But we can get the mouse cursor position using API, but how to get the exact image icon, without using JNI. I don't want to generate my own cursor at that position.

I am building a Remote Desktop kinda app using java..... I want the screen of the remote comp to be viewed on my screen and generate events from my machine to the remote machine. So, I am capturing the screen images of the remote machine. But the cursor is not part of the screen object. i want to extract the cursor image icon from the remote machine to my machine and render the image.

Similar Messages

  • Could anyone tell me how too change the mouse cursor to the waiting mode?

    Could please anyone tell me how too change the mouse cursor to the waiting mode while my applet is processing?
    Well i have 3 combos in my applet.....and in my actionPerformed code i have:
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == combo1) {
              setCursor (Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    ind_reg = combo1.getSelectedIndex();
    Do_Accion1();
    setCursor (Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    if (e.getSource() == combo2) {
    setCursor (Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    ind_mun = combo2.getSelectedIndex();
    Do_Accion2();
    setCursor (Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    if (e.getSource() == combo3) {
    setCursor (Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    ind_loc = combo3.getSelectedIndex();
    Do_Accion3();
    setCursor (Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    } // Fin action event
    But my cursor is never change to WAIT_CURSOR....Somebody could help me please?....
    Thanks in advance....
    Mary

    YourComponent.setCursor(
         Cursor.getPredefinedCursor(
         Cursor.WAIT_CURSOR));

  • How to change the mouse cursor icon type when mouse moves out of client area ( propertysheet) WTL?

    I got stuck with an issue in property sheet .I want to load different cursor when the mouse position is within the client area and load another when moves out of the client area.
    In the porpetysheet I added four page. In the first page when I click next I am loading cursor of IDC_WAIT type and loading IDC_ARROW when the mouse moves out of the client area.
    In the page class I triggered the event for WM_MOUSEMOVE as follow:
        MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
    LRESULT OnMouseMove(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
    if(TRUE == m_bIsNextBtnClicked)
    ::SetCursor(LoadCursor(NULL, IDC_WAIT));
    else
    ::SetCursor(LoadCursor(NULL, IDC_ARROW));
    return TRUE;
    This event is getting triggered and absolutely had no issue with this. Similarly I tried adding `MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave)` this event making an assumption that this will get triggered if the mouse moves out of the client area,  but
    this event did not get triggered at all.If this is not the mouse event to be triggered for mouseleave which event should I trigger?
    LRESULT OnMouseLeave(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
    ::SetCursor(LoadCursor(NULL, IDC_ARROW));
    return TRUE;
    Now when I click Next button , **I was actually calling a function which is taking sometime to return** . Before to this function I am loading IDC_WAIT cursor i.e., 
     `::SetCursor(LoadCursor(NULL, IDC_WAIT));` . 
    Now when move the mouse cursor on to the non-client area I want to load IDC_ARROW cursor i.e., 
        ::SetCursor(LoadCursor(NULL, IDC_ARROW)); 
    When the moves on to the non-client area I am handling the mouse event in sheet derived class as follows,
    MESSAGE_HANDLER(WM_NCMOUSEMOVE, OnNCMouseMove)
    LRESULT OnNCMouseMove(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
    ::SetCursor(LoadCursor(NULL, IDC_ARROW));
    return 0;
    This event is not getting triggered until unless the function in the Next button event is executed.
    I want both of them to be done in parallel i.e, click Next button now hover mouse on the client area, Busy icon should come and when mouse moves out of the client area then IDC_ARROW icon should come.
    LRESULT OnWizardNext()
    ::SetCursor(LoadCursor(NULL, IDC_WAIT));
    m_bIsNextBtnIsClicked = TRUE;
    BOOL bRet = MyFun();
    m_bIsNextBtnIsClicked = FALSE;
    //Until this function(MyFun()) is executed **WM_NCMOUSEMOVE**
    //event is not getting triggered.But this event should get triggered and I
    //should be able to see the change of cursor within and out of client area.
    Can anyone kindly help me to solve this issue.
    SivaV

    Hello
    sivavuyyuru,
    For this issue, I am trying to involve someone to help look into, it might take some time and as soon as we get any result, we will tell you.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to extract the number from image using java

    Hello every one
    i want to develope a project which can extract the number from image
    that i can use as inter or String or char.
    Is there any API in java which provide this type of facility.
    right now i m using java 5
    thanks in Advance
    Jignesh

    In my project i have a image in that i have a
    co-ordinate (x,y) I am still puzzled as to what you seek. It sounds to me like you have a point (x, y) represented by p. in java it's just p.getX() p.getY()
    i want to convert that cordinate to numeric form,
    i mena i want to use that cordinate in somewhere else
    in project.point.getX() point.getY()
    So need to convert it into numeric form u can called
    it OCR also.OCR is optical character recognition. If I want out and took a picture of the US Declaration of Independence and then wanted the words on the parchement in the picture in text form, then I would run the picture through a software program and it would try to optically recognise what lettering and number were present in the picture. In the end, I would have a text of what is written on the US Declaration of Independence.
    Is that what you want?

  • How to change the mouse cursor

    Hi,
    I need to change the mouse cursor on a mouseover event of a text filed?
    Please help for the same...
    Thanks,
    Abhijit

    I guess your are simply out of luck.....share with us if you find a way.

  • How to read the contents of images folder using AS3

    Hi,
    I'd like to load the images in the folder dynamically without using XML.
    Is there a mechanism in AS3 that enables me to read directly the content of images folder directly without using XML or should I use php to do that?
    Thanks

    Yes you can do that without XML. You need to use the Loader() class to dynamically load the images. Check the documentation of the loader class.

  • How to delete the data from KNVP without using the delete statement

    Hello friends,
    I have a requirement that I have to delete the data from KNVP table without using any delete statement. For it I have to use the Standard BAPI or any standard program.
    Can you please tell me the name of the standard program or BAPI to delete the data .
    Thanks in Advance
    Kuldeep

    Hello Raymond,
    I have use the function 'CUSTOMER_UPDATE' in which I only gives the data in T_XKNVP table only but still the data is not get deleting. Please see the code below.
    =============================================================
    REPORT  ZK_TEST2                                .
    data :
        I_KNA1     LIKE     KNA1,
        I_KNB1     LIKE     KNB1,
        I_KNVV     LIKE     KNVV,
        I_YKNA1     LIKE     KNA1,
        I_YKNB1     LIKE     KNB1.
    Data :
    T_XKNAS       LIKE     FKNAS occurs 0,
    T_XKNB5     LIKE     FKNB5 occurs 0,
    T_XKNBK     LIKE     FKNBK occurs 0,
    T_XKNVA     LIKE     FKNVA occurs 0,
    T_XKNVD     LIKE     FKNVD occurs 0,
    T_XKNVI     LIKE     FKNVI occurs 0,
    T_XKNVK     LIKE     FKNVK occurs 0,
    T_XKNVL     LIKE     FKNVL occurs 0,
    T_XKNVP     LIKE     FKNVP occurs 0 with header line,
    T_XKNVS     LIKE     FKNVS occurs 0,
    T_XKNEX     LIKE     FKNEX occurs 0,
    T_XKNZA     LIKE     FKNZA occurs 0,
    T_YKNAS     LIKE     FKNAS occurs 0,
    T_YKNB5     LIKE     FKNB5 occurs 0,
    T_YKNBK     LIKE     FKNBK occurs 0,
    T_YKNVA     LIKE     FKNVA occurs 0,
    T_YKNVD     LIKE     FKNVD occurs 0,
    T_YKNVI     LIKE     FKNVI occurs 0,
    T_YKNVK     LIKE     FKNVK occurs 0,
    T_YKNVL     LIKE     FKNVL occurs 0,
    T_YKNVP     LIKE     FKNVP  occurs 0 with header line,
    T_YKNVS     LIKE     FKNVS occurs 0,
    T_YKNEX     LIKE     FKNEX occurs 0,
    T_YKNZA     LIKE     FKNZA occurs 0.
    T_XKNVP-KUNNR     =     '7000002648'     .
    *T_XKNVP-VKORG     =     '0001'     .
    *T_XKNVP-VTWEG     =     '01'     .
    *T_XKNVP-SPART     =     '01'     .
    T_XKNVP-KZ      =     'D'     .
    append T_XKNVP to T_XKNVP.
    CALL FUNCTION 'CUSTOMER_UPDATE'
      EXPORTING
        I_KNA1        = I_KNA1
        I_KNB1        = I_KNB1
        I_KNVV        = I_KNVV
        I_YKNA1       = I_YKNA1
        I_YKNB1       = I_YKNB1
      TABLES
        T_XKNAS       = T_XKNAS
        T_XKNB5       = T_XKNB5
        T_XKNBK       = T_XKNBK
        T_XKNVA       = T_XKNVA
        T_XKNVD       = T_XKNVD
        T_XKNVI       = T_XKNVI
        T_XKNVK       = T_XKNVK
        T_XKNVL       = T_XKNVL
        T_XKNVP       = T_XKNVP
        T_XKNVS       = T_XKNVS
        T_XKNEX       = T_XKNEX
        T_XKNZA       = T_XKNZA
        T_YKNAS       = T_YKNAS
        T_YKNB5       = T_YKNB5
        T_YKNBK       = T_YKNBK
        T_YKNVA       = T_YKNVA
        T_YKNVD       = T_YKNVD
        T_YKNVI       = T_YKNVI
        T_YKNVK       = T_YKNVK
        T_YKNVL       = T_YKNVL
        T_YKNVP       = T_YKNVP
        T_YKNVS       = T_YKNVS
        T_YKNEX       = T_YKNEX
        T_YKNZA       = T_YKNZA
    =============================================================

  • How to extract the content of a section using VBA?

    For example, I have an article like this:
    Abstract
    AbstractParagraph1
    AbstractParagraph2
    Body
    BodyParagraph1
    BodyParagraph2
    Reference
    ReferenceParagraph1
    ReferenceParagraph2
    Knowing that Abstract, Body and Reference are all headings, which means if I click the triangle button on the left of the heading (For example, Abstract), AbstractParagraph1 AbstractParagraph2 will shrink or expand. So my question is: how to retrieve the paragraph
    in a specific section using VBA?

    Hi UW,
    >> how to retrieve the paragraph in a specific section using VBA?
    In my option, you could use the Section Object (Word) to get the section object, and then use the Section.Range Property (Word) to get the content of the special section. The links below might be useful to you.
    # Section Object (Word)
    https://msdn.microsoft.com/en-us/library/office/ff194295.aspx
    # Section.Range Property (Word)
    https://msdn.microsoft.com/en-us/library/office/ff836097.aspx
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • How to list the installed softwares from registry using JNI

    Hi everybody,
    I'm new to JNI.
    For example assume Acrobat reader and firefox are the softwares installed in my system
    i want to read all the exe files which are below this location.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
    I found solution for how to read the following files Example: (AcroRd32.exe and firefox.exe, etc);
    which are located in the below path in registry.
    by specify the location
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
    by using the RegOpenKeyEx() function.
    But now i need to list all the exe files which are under
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
    Example take Acrobat reader and firefox are the softwares installed means it has to list
    AcroRd32.exe
    firefox.exe
    which is under the key
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
    Through which method i can get all the files.
    Provide some sample code for the function too.
    kindly reply for this asap.
    Also provide the links which is useful for this question.
    Regards
    Pugazharasu Chandrakesan

    I found the answer byself.

  • I want change the mouse cursor image when cursor come on the label

    how can i make this??

    Hi,
    Write a mouse listener to ur label like this. When mouse enter the lable region what ever the cursor u wish to give in the mouseentered region that will appear.
    Use the follwing code:
    jlabel.addMouseListener(this);
         public void mouseClicked(MouseEvent arg0) {
         public void mouseEntered(MouseEvent arg0) {
              setCursor(Cursor.getPredefinedCursor (Cursor.HAND_CURSOR));
         public void mouseExited(MouseEvent arg0) {
              setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
         public void mousePressed(MouseEvent arg0) {
    Rgds,
    Kumar.
         public void mouseReleased(MouseEvent arg0) {
         }

  • How to hide the mouse cursor?

    I'm working in fullscreen and i want to hide the mousecursor. I know it must be very easy, in C++ it is, but I just can't find it!! Anybody plz?

    try this:
    BufferedImage bim = new BufferedImage(1,1,BufferedImage.TYPE_4BYTE_ABGR);
    setCursor(getToolkit().createCustomCursor(bim,(new Point(0,0)),"HiddenM"));
    Noah

  • Can anyone guide me how to create the databse with or without using the GUI

    I need to create the Database from SQL prompt can any body tell me the links where i can find some sample scripts to do that....Thanks

    Hi,
    I would like to mention few stuffs too..
    for manually.
    1. startup nomount pfile=path of the pfile.
    2. run the create datbase script.
    3. run catalog.sql, catproc.sql script.
    that was the brief idea,but you need to create your sample pfile,setting up your dir locations,setting envrmnts variables.
    for gui envrmnts you have DBCA , use it and forget about all the cavtes.
    thanks
    Alok.

  • Does anyone know how to simulate the GET PERSON event without using PNPCE?

    I need to modify report is RPCGRNU0
    About line 109, it does GET PERSON, then sets a flag to true.  Then once the GET PERAS event starts, it checks if the flag is true or not.
    Edited by: Christian Rios on Apr 2, 2009 5:43 PM

    what exactly are you trying to do? Copy RPCGRNU0 & modify it? why do you need to simulate the GET PERSON event?

  • Mouse Cursor Image

    Hello All,
    I have read that java.awt.Robot class does not capture the mouse cursor image when the desktop snapshot is taken, and I wanted to see how developers are getting around with this. Is a pure Java solution possible or they use JNI?.I have read that developers try to draw image of mouse cursor image at given x,y on the desktop image. What's the final possible solution?
    Thanks
    Nitin

    nitin-36 wrote:
    Hello All,
    I have read that java.awt.Robot class does not capture the mouse cursor image when the desktop snapshot is taken, and I wanted to see how developers are getting around with this. Is a pure Java solution possible or they use JNI?.I have read that developers try to draw image of mouse cursor image at given x,y on the desktop image. What's the final possible solution?
    Thanks
    NitinThis has absolutely nothing to do with JMF, and you answered your own question. Take the screenshot and draw a cursor where the cursor should be. BufferedImages are easy to draw on.

  • Count the no.of rows without using count function

    Hi,
    How to count the no.of rows without using the count function?
    Thanks,

    they won't be 100% accurate. You're correct, Bluefrog, but the same goes for doing a count(*) (depending on the size of the table, ofcourse):
    the table being queried might be under DML (deletes/inserts), and the next count(*) might give different results.
    Both approaches will never be 100% accurate.
    But simply selecting num_rows will be much much faster than doing a count(*).
    Counting the number of rows always reminds me of this ongoing discussion, by the way:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:127412348064#14136093079164 ;)
    Usually knowing the number of records by approximatly is sufficient, imo. 1000000 or 1000007 records: I don't care, don't need to know that.
    I've never needed to know the exact number of records in a table in my code, or been given a requirement that forced me to.

Maybe you are looking for

  • How to find photos in iPhoto which may not be there - but appear.

    An acquaintance of mine has by accident deleted a bunch of photos from iPhoto, assuming he had already moved them into another folder. Somethings strange happened, as the still appear to accesible, but then again not really. I have promised to help h

  • How can you get a non-usb microphone to work?

    So i've run into a few discussions on this topic, but never seen an answer to it. I have a non-usb microphone (A HyperX Cloud headset) that I want to use with my MacBook Pro. How can I do this? I'm assuming there is an adapter I can get for the micro

  • Using DB Connection with DBPool

    Hi, We are about to develop some Webdynpro applications and we have a requirement of accesing R/3 and a DB in the same Webdynpro Component, I understand you can not use the DB as a model but maybe use a Java component that can be instantiated from th

  • How to use networkmanager-applet to creat wireless internet sharing?

    hi, I'm trying to creat a wireless connection to share internet with another laptop. I followed the usual step like how i did it on Ubuntu Creat New Wireless Connection--> then I setup a connection Mode: Ad-hoc  (No security password, cuz it's for te

  • Error during importing an mdl file

    i tried importing an mdl file by the command: OMBIMPORT MDL_FILE 'F:\mdl\with_dep.mdl' USE UPDATE_MODE MATCH_BY NAMES OUTPUT LOG TO 'F:\mdl\with_dep_a.log' but it gives a java exception: java.lang.Exception: WBImportopenFileFileNotFoundMDL1122?? at o