Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to apply my own cursor automatically in all forms??

yanTyanT Posts: 2Member
Hi!!

Please help me!!! I would like to know how to apply my own cursor as a default cursor for every application in every forms that i have created?? I had apply below programming codes for each form of my project but when it comes to speedbar panel and it buttons' area, the cursor turn to be the c++ builder default cursor (not my own cursor). May anyone tell me why???What should i do??

Programming codes which i have used:

const TCursor MySyringeCursor = static_cast(22);
Screen->Cursors[MySyringeCursor] = LoadCursorFromFile ("MySyringeCursor.cur");
Cursor = MySyringeCursor;
MainForm->Cursor = MySyringeCursor;

Comments

  • bilderbikkelbilderbikkel Posts: 754Member
    : Hi!!
    :
    : Please help me!!! I would like to know how to apply my own cursor as
    : a default cursor for every application in every forms that i have
    : created?? I had apply below programming codes for each form of my
    : project but when it comes to speedbar panel and it buttons' area,
    : the cursor turn to be the c++ builder default cursor (not my own
    : cursor). May anyone tell me why???What should i do??
    :
    : Programming codes which i have used:
    [code]
    const TCursor MySyringeCursor = static_cast(22);
    Screen->Cursors[MySyringeCursor] = LoadCursorFromFile
    ("MySyringeCursor.cur");
    Cursor = MySyringeCursor;
    MainForm->Cursor = MySyringeCursor;
    [code]

    It's great to see some CodePedia code here! I have a guess, that if you change the index of 22 to a lower value (e.g. 6), you'll replace the default arrow by your syringe cursor.

    Let me know if it is so.

    See ya,

    bilderbikkel
  • yanTyanT Posts: 2Member
    Hi Mr. bilderbikkel!!

    The idea that u suggested still didn't make any change as what i desired. The performance of the cursor still same as before. Anyway, thank you for ur response and do let me know if u have any other suggestion..

    Thanks a lot!!

    -yanT-

  • bilderbikkelbilderbikkel Posts: 754Member
    : thank you for your response and do let me know if u have any other
    : suggestion.

    The Property Cursor is of a Property of every TWinControl (a guess). Of each Form you can access all its Children controls. Of each control, set the Cursor to your cursor.

    Perhaps this works? I have not yet tried it, so I look forward to your code.

    See ya, Bilderbikkel


    bilderbikkel
Sign In or Register to comment.