Howdy, Stranger!

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

Categories

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

yanTyanT Member Posts: 2
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 Member Posts: 754
    : 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 Member Posts: 2
    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 Member Posts: 754
    : 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.