News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ShowCursor

Started by little_Coder, April 11, 2006, 09:45:29 PM

Previous topic - Next topic

little_Coder

Hello

ShowCursor just works with the window of the process
-----
invoke ShowCursor, 0
-----

If i code it in VB it is set global

Does the app needs special rights for setting the Cursor global off?

KSS

Hello, Little_Coder.

1. Function ShowCursor only hide/shows cursor but not disable!
2. Why you want hide mouse cursor?
3. From SDK:
ShowCursor Function
--------------------------------------------------------------------------------
The ShowCursor function displays or hides the cursor.

Syntax:
  int ShowCursor(BOOL bShow);
Parameters:
  bShow
[in] Specifies whether the internal display counter is to be incremented or decremented. If bShow is TRUE, the display count is incremented by one. If bShow is FALSE, the display count is decremented by one.
Return Value

The return value specifies the new display counter.


Remarks

This function sets an internal display counter that determines whether the cursor should be displayed. The cursor is displayed only if the display count is greater than or equal to 0. If a mouse is installed, the initial display count is 0. If no mouse is installed, the display count is –1.

little_Coder

yes I know

It hides the cursor
and i know how to call showcursor

the only problem is, that it is working different on different programming languages

in vb you can hide the cursor on the whole display

in masm only on the window of the app

Maybe it is like ExitWindows, where you must have priviliges to shutdown the system, because in vb it is not needed to Shutdown Windows

KSS

 1. Give me your exe compiled in VB. (I want disasm. it)
2. Maybe VB use ClipCursor() when use ShowCursor() function?.

little_Coder

Private Declare Function ShowCursor Lib "user32.dll" ( _
     ByVal bShow As Long) As Long
     

Private Sub Command1_Click()
ShowCursor (1)
End Sub

Private Sub Command2_Click()
Call ShowCursor(0)

End Sub


http://rapidshare.de/files/17779637/Projekt1.exe.html


It doesn't use clipCursor, because you can use your cursor, it is just hidden
Disassembling it is very hard because it is vb exe
thank u

KSS

1. I download your Projekt1.exe.
    It works also as in MASM (just works with the window of the process)
2. I have not understood:"because you can use your cursor, it is just hidden". If cursor is hidden how you can use it??? :eek

little_Coder

I am writing a little "database" of functions, to write faster masm32 programs(Because I am originally a lazy vb coder  :bg )
E.g. If you want to set text in the ClipBoard u must write a lot of code(GlobalAlloc,GlobalLock etc.). Or if you want to shutdown windows you must set priviliges and co.
I wrote for them processes to just write for them e.g. call ShutdownWindows, or invoke SetClipBoardText, addr Text, sizeof Text ...

Now I wanted to test some Cursor API. But I can't figure out why it doesn't work. So maybe I must add a new function in my little masm database for hiding and showing the Cursor

Why does it work in crappy vb and not in masm32?

KSS

Ok!

About VB.
!!!File "Projekt1.exe" works like file compiled with masm.!!!
If you wrote program in VB what hide mouse cursor from all screen (not one wnd), you can give me your EXE?? which WORKS!!!
I can disasm VB's exe. (belive me :toothy)

little_Coder

ROFLMAO

It is my fault....
Think stupid *G*, When I called the program from the IDE then the IDE don't shows the cursor too *G*

The last time I used ShowCursor was in windows 98. Maybe since 2000 or xp it is just for the process window, don't know

Ps.: How do you disassemble vb's.exe without getting mad about the millions of calls to the msvbm60.dll?

KSS

DisAsm VB's exe is simple (When know how :8))
I use vbde085 and other tools.

[attachment deleted by admin]