Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Need Control Over The Cursor!


Hi Everyone!

I am a newbie to VB. Is it possible to have control over the cursor movement in the Richtext box control. If so, how? A small code sample would be really helpful. If anyone can help me out of this by sending your replies to dilson_p@yahoo.com i would greatly appreciate it.

Thanks in advance.
Dilson.
dilson_p@yahoo.com




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Cursor Control
I am working on a project in VB6.0 and I accidentally mashed some buttons and now my cursor is a thick black bar rather than a small thin line, and it is overtyping all of my text - I will never get my project finished at this rate - I have already spent over an hour trying to find information on what to do to no avail.

I know how to prevent this in Microsoft Word but not in VB and my Help Topics are not operational. Can someone please tell me what to do to make my cursor stop overtyping text when all I want to do is to insert text, and to change cursor back to a thin black line? This is so very frustrating when I know there is a simple answer somewhere!!

Thanks!

Cursor Control
i'm simulating a keypad like the celular.
how do i move the cursor to the left and to the right, and will it blink on it's designated spot?

Cursor Control
Hey, Im wondering how do I make the cursor go to a certian pixel on the screen? and how do I make it so that it 'clicks' on the part of the screen?

CONTROL OF CURSOR
How do i place my cursor in a specific textbox when the application starts up. Currently I have 2 text boxes and the cursor starts up in the wrong box.

Thanks

How To Take Control Over The Mouse Cursor
I do not know how to take control over the mouse cursor. Not only over the VB aplication but on entire desktop.

Cursor In DataGrid Control
Hi,
in my project I use a Datagrid control with only one column.
The cursor is invisible in these column cells.
How can I turn the cursor visible and blinking as usual.

thanks

Textbox Cursor Control
Does anyone know of a site or have information on a way to set and control the cursor position within a Text box.

What I am trying to accomplish is a formatted text box routine for use in any form design. With out using Masked text boxes. And make this routine as a sub module. Callable by form Name.


Don

Cursor Control In Richtextbox
Hi, i'm trying to make a text editor using the richtextbox
control. one of the problems i'm having when i click on a
combo box to change the font, the combo box still has focus
and i have to click the mouse in the correct place in the
richtextbox to continue.

my question is should i code every control to give the focus
back to the richtextbox or is there an easier/better way to
do this?

thanks in advance

MICK

Cursor Position In A TextBox Control
Hey Guys,
I was wondering if anyone knows how to determine the cursor position within a textbox control, or if not,suggest a work around for the following scenario:

I have an MSFlexGrid that I want to allow users to edit. Obviously, a bit of programming allows one to place a text box over the active cell in the grid. This is easy, and works without incident, but I want to add a bit more functionality by allowing the user to use the up/down left/right keys from within the textbox control to move around the grid. THe catch is that I only want the left/right keys to change the grid cell if the cursor is in the first column of the text, or the last column of the text respectively. Since there is no guarantee that any text will be HighLighted, I cannot use .SelStart.

Any thoughts would be helpful,

Thanks,

Hunter

Change Cursor On Top Of Flash Control?
Ok I have a question, I asked before and my post vanished magically when I was sleeping last night... Weird

Anyways

I am making a game that when you load it the resoultion of your screen changes to 800x600 and then a form pops up which is full screen with a Flash9d.ocx control covering it to play a flash animation of my intro.

Anyways I know how to change a mouse cursors on texboxes, command buttons, forms just buy changing the mouse over code or by changing the icon, but how would I change it if the mouse is over this flash control. I dont see any mouse over or anything for this all I see is drag over and Im not sure if thats what im looking for

REMOTE CONTROL CURSOR (very Hard)
I have an msi remote control and would like to make a program with wich i can control the mouse with the remote. what to do?(please help)
(i searched everywhere on the net and on the forums ...nothing)


i have found in remote control software cd some dlls like RemtCtrl.dll,ForNvI2C.dll... and i used dependency walker to see the functions: (ReadRemoteData,GetFreeScanStatus...).

i also found RemtCtrl.ini in the software cd and it contains this info:
[RemoteParam]
AppName=InterVideo WinDVR
Monitor=InterVideo WinCinema Manager
Radio=MSI Radio
8876Timer=50
8606Timer=50
8884Timer=80
8907Timer=50
ShowMsg=0

[RemoteKey]
RemoteKey00=0x0000,Key 0,0,0
RemoteKey01=0x0001,Key 1,1,1
RemoteKey02=0x0002,Key 2,2,2
RemoteKey03=0x0003,Key 3,3,3
RemoteKey04=0x0004,Key 4,4,4
RemoteKey05=0x0005,Key 5,5,5
RemoteKey06=0x0006,Key 6,6,6
RemoteKey07=0x0007,Key 7,7,7
RemoteKey08=0x0008,Key 8,8,8
RemoteKey09=0x0009,Key 9,9,9
RemoteKey0C=0x000C,Mute,CTRL+ALT+SHIFT+M,CTRL+ALT+M
RemoteKey0F=0x000F,Full Screen,CTRL+ALT+SHIFT+Z,CTRL+ALT+Z
RemoteKey10=0x0010,FuncOSD,MSG+85,CTRL+ALT+F
RemoteKey11=0x0011,Time-Shift,MSG+30,NULL
RemoteKey12=0x0012,Power On/Off,CTRL+ALT+SHIFT+F4,CTRL+ALT+F5
RemoteKey13=0x0013,MTS,MSG+25,CTRL+ALT+T
RemoteKey14=0x0014,Play/Pause,CTRL+ALT+SHIFT+SPACE,NULL
RemoteKey16=0x0016,OSD - B.W.,MSG+87,CTRL+ALT+PAGEDOWN
RemoteKey17=0x0017,Return,L,CTRL+ALT+L
RemoteKey18=0x0018,OSD + F.F.,MSG+86,CTRL+ALT+PAGEUP
RemoteKey1A=0x001A,CH. +,CTRL+ALT+SHIFT+LEFT,CTRL+ALT+LEFT
RemoteKey1E=0x001E,CH. -,CTRL+ALT+SHIFT+RIGHT,CTRL+ALT+RIGHT
RemoteKey1B=0x001B,Vol +,CTRL+ALT+SHIFT+UP,CTRL+ALT+UP
RemoteKey1F=0x001F,Vol -,CTRL+ALT+SHIFT+DOWN,CTRL+ALT+DOWN

( i already made a program to control the mouse with a joypad , so don't bother giving me info on the mouse api)

Changing Cursor On MsChart Control
Hello Everyone,

I am developing an application which has a feature of displaying real-time data in a graphical format. For this purpose, I am using MsChart Control, with which I have a small problem.

I want to give a provision to the user so that he can select a portion of the graph and it is zoomed. For this I wrote the code in the MouseUp and MouseDown events. But I am stuck at the point where I want to change the shape of the mouse cursor when it is on the graph. I tried to use the Forms' MousePointer property, but that is working only outside the MsChart control. In the control, I am only allowed to use one of the 15 pre-defined cursor shapes.

PROBLEM:
How to change the Cursor (to a custom cursor .CUR file) in an MSChart Control?

Anyhelp is appriciated
Regards,
Harsha.

Cursor Position In Webbrowser Control
Hi,
Does anyone have an idea on how to get the cursor position from the WebBrowser control.

Thanks

How To Get The Position Of Cursor In A Codemax Control
How to you get the cursor pos of the cursor in a codemax control.

I need it so I can use the command CodeMax.InsertText "Text", Pos as RECT

I know the position is a RECT, but Codemax does not have a command to retreave the curdor position, or I can't seem to finf it.

Any help would be great.

How Do You Control The Cursor For EVB3 For PocketPC?
I have a number of routines that seem to take a while on the Pocket PC and I want to give the user some feedback that the program saw their click and is working. A fallback would be to pop up a message box telling them to wait while I process, but I thought it would be slick to just set the cursor to "Wait". Can this be done from EVB3?
Thanks.

Changing The Cursor In A RichText Control
Is it possible to change the cursor shape in a RichText Control, i.e. change the vertical line to an underscore or block cursor?


Thanks,

Jeroen.

Remote Control CURSOR (hard Question)
I have an msi remote control and would like to make a program with wich i can control the mouse with the remote. what to do?(please help)
(i searched everywhere on the net and on the forums ...nothing)


i have found in remote control software cd some dlls like RemtCtrl.dll,ForNvI2C.dll... and i used dependency walker to see the functions: (ReadRemoteData,GetFreeScanStatus...).

i also found RemtCtrl.ini in the software cd and it contains this info:
[RemoteParam]
AppName =InterVideo WinDVR
Monitor =InterVideo WinCinema Manager
Radio =MSI Radio
8876Timer=50
8606Timer=50
8884Timer=80
8907Timer=50
ShowMsg =0

[RemoteKey]
RemoteKey00=0x0000,Key 0,0,0
RemoteKey01=0x0001,Key 1,1,1
RemoteKey02=0x0002,Key 2,2,2
RemoteKey03=0x0003,Key 3,3,3
RemoteKey04=0x0004,Key 4,4,4
RemoteKey05=0x0005,Key 5,5,5
RemoteKey06=0x0006,Key 6,6,6
RemoteKey07=0x0007,Key 7,7,7
RemoteKey08=0x0008,Key 8,8,8
RemoteKey09=0x0009,Key 9,9,9
RemoteKey0C=0x000C,Mute,CTRL+ALT+SHIFT+M,CTRL+ALT+M
RemoteKey0F=0x000F,Full Screen,CTRL+ALT+SHIFT+Z,CTRL+ALT+Z
RemoteKey10=0x0010,FuncOSD,MSG+85,CTRL+ALT+F
RemoteKey11=0x0011,Time-Shift,MSG+30,NULL
RemoteKey12=0x0012,Power On/Off,CTRL+ALT+SHIFT+F4,CTRL+ALT+F5
RemoteKey13=0x0013,MTS,MSG+25,CTRL+ALT+T
RemoteKey14=0x0014,Play/Pause,CTRL+ALT+SHIFT+SPACE,NULL
RemoteKey16=0x0016,OSD - B.W.,MSG+87,CTRL+ALT+PAGEDOWN
RemoteKey17=0x0017,Return,L,CTRL+ALT+L
RemoteKey18=0x0018,OSD + F.F.,MSG+86,CTRL+ALT+PAGEUP
RemoteKey1A=0x001A,CH. +,CTRL+ALT+SHIFT+LEFT,CTRL+ALT+LEFT
RemoteKey1E=0x001E,CH. -,CTRL+ALT+SHIFT+RIGHT,CTRL+ALT+RIGHT
RemoteKey1B=0x001B,Vol +,CTRL+ALT+SHIFT+UP,CTRL+ALT+UP
RemoteKey1F=0x001F,Vol -,CTRL+ALT+SHIFT+DOWN,CTRL+ALT+DOWN

( i already made a program to control the mouse with a joypad , so don't bother giving me info on the mouse api)

Get The Current Cursor Position From TextBox Control
I have a TextBox control (MSForms.TextBox) and I manipulate the characters before writing in the TextBox. How can I get the actual character position where I insert the character.

With Regards,
fazek

Location Of Mouse Cursor In PictureBox Control
I guess I already asked my question. How can I find the location of the mouse cursor in a PictureBox Control?

VB.NET Custom Textbox Control Cursor Position
Hello,

I've created a custom control inherited from the Windows.Forms.Textbox control. Basically it's a textbox that pulses in color when it has the focus. It uses a bitmap (gradient) to paint the background of the textbox, therefore I have to override the method to paint the text to make it visible.

Everything works how I want it, except for the cursor position in the textbox. When I type something into the textbox (runtime), the blinking cursor doesn't position correctly. This also depends on the font(size) I use. For example: with a larger font the cursor appears 2 or 3 letters in front of where it's supposed to be and with smaller fonts it appears farther to the back than actually should be. This is only a visual problem because backspace, delete, etc. work correctly. Does anyone have a clue of which method/property to override or shadow?

This is the code I use to draw the text into the textbox:

CODEProtected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  Dim g As Graphics = e.Graphics
  g.Clear(Parent.BackColor)
  Draw(g)
End Sub

Protected Sub Draw(ByVal g As Graphics)
  DrawBackground(g)
  DrawText(g)
End Sub

Protected Sub DrawBackground(ByVal g As Graphics)
  If Focused Then
    DrawTextboxState(g, iaDefault)
  Else
    DrawTextboxState(g, iaNormal)
  End If
End Sub

Protected Sub DrawTextboxState(ByVal g As Graphics, ByVal ia As ImageAttributes)
  Dim tb As New TextureBrush(imgFill, New Rectangle(0, 0, imgFill.Width, imgFill.Height), ia)
  tb.WrapMode = WrapMode.Tile

  g.FillRectangle(tb, 0, 0, Me.Width, Me.Height)
  tb.Dispose()
End Sub

Protected Sub DrawText(ByVal g As Graphics)
  Dim layoutrect As New RectangleF(0, 0, Me.Width, Me.Height)
  Dim fmt As New StringFormat
  fmt.Alignment = StringAlignment.Near
  fmt.LineAlignment = StringAlignment.Near

  Dim textBrush As New SolidBrush(ForeColor)
  g.DrawString(Text, Font, textBrush, layoutrect, fmt)
  textBrush.Dispose()
End Sub

Help Me!!!! How To Control Mouse Cursor On Other Windows? Any Body Can Help Me
I would like to control mouse cursor on other window. if you have any idear please help me. Thanks

Change Mouse Cursor When Moving Over Control
Hi,

how can I change the mouse cursor icon, whenever the user moves over some control, usually a label control? Similar to the way mouse cursor changes when moving onto a hyperlink on a webpage.

thanx, ds

Changing A Data Control Cursor Type To Clientside
Does anyone know how to change the cursor type for a Data Control to Client Side.

The only options i have in the drop down of the properties are Server Side, Default and ODBC and none of them work.



Here's my problem....... I am getting an "invalid field Data Type" on the following lines of code:


data1.Recordset.AddNew

data1.Recordset.CancelUpdate

RDO Connection With Sybase (Run-time Error '40088': No Open Cursor Or Cursor Closed
I am having one program in VB 6.0 connecting to sybase when I run stored procedure and assign it to rdorecordset and then if I check rs.eof then it gives me error

Run-time error '40088': No open cursor or cursor closed.

I got one solution for SQL server that it is said that cursor get close automatically on server when used RDO so need to use API to keep it open as follow

Const SQL_PRESERVE_CURSORS As Long = 1204
Const SQL_PC_ON As Long = 1
Const SQL_PC_OFF As Long = 0
Dim intRet As Integer

intRet = SQLSetConnectOption(cn.hdbc, SQL_PRESERVE_CURSORS, _
SQL_PC_ON)
This works for SQL can u tell any API or solution to keep cursor open after executing stored procedure

Private wrkODBC As rdoEnvironment
Private conDatabase As rdoConnection

Set conDatabase = objAppLogon.Connect _
(sUserName:=Version_GetUser(), _
sServerName:=sServerName, _
sDatabaseName:=sDatabaseName, _
bManualLogon:=True, _
bUseSecServer:=False, _
bCertifyOnConnect:=False, _
sRDODSN:=sRDODSN, _
vRDOOptions:=Null, _
bRDOReadOnly:=False, _
sRDOAdditionalConnectString:="", _
rlErrorCode:=lErrorCode _
)
conDatabase.QueryTimeout = 240
Call SQLExecute("SET ANSINULL OFF")

Dim rs As rdoResultset

Set rs = SQLOpenResultset(SP_GETBUSCODE & SPACER & SQL_TEXT_DELIMITER & sSearchCode & SQL_TEXT_DELIMITER)

If rs.EOF = False Then ' This is a line I get error
GetBusinessSectorCode = rs.rdoColumns(0)
Else
GetBusinessSectorCode = -1
End If

Need To Track Text Editer Cursor With Mouse Cursor
Hi All
I am Legally Blind with Macular Degeneration in both eyes and use a dual monitor setup with my App on 1 monitor and use the second monitor as my magnifier XP window. As I scroll my mouse cursor across a line of text, on my magnified window the cursor is stationary in the center of the screen and the text scrolls across the screen with the mouse movement.
I am trying to develop an app that will scroll horizontally over a line of text in any format without any vertical jitter and will give me a line feed and carriage return at the end of the line.
I have written some code that does this, but I cannot figure out how to track the text editing cursor with the mouse cursor. The WinXP Magnifier program I am now using, has this feature and I would like to include it in my app.

Thanks much
Any help will be greatly appreciated
edaziz

 

Only Move Cursor If Cursor Movement Is Greater Than X Amount
Ok, here's my problem. In the MouseMove procedure for my picture box, I only want the cursor to actually move if the X or Y value of the cursor's new position is greater than 15 when compared against the cursor's former x or y value.

So in other words, if you just move the mouse a tiny bit to the left, the mouse cursor on your screen will stay still. But if you move it a bit to the left then the mouse cursor on your screen will follow. PLEASE let me know if this is not clear, as I know my problem might not be very clear.

VB6/Blinking Cursor/Textbox/Move Cursor
Hello!

I would like to always have a blinking cursor in my textbox.

Right now I have a touchscreen with a virual keyboard. All letter commands are sent to the textbox. When I change the properties of the textbox to Arrow (i.e. mouse pointer), the blinking cursor goes away once the virtual keyboard is pressed!

Can someone explain how I can get the blinking cursor to stay at the end of the inputted text?

Also...

I would like to create arrow keys. If the user messed up the inputted text, he can move the blinking cursor left one space at a time between inputted characters to add a letter. Then a button to move the blinking cursor back to the end of the inputted text.

Would be grateful for any help and explanations. Thanks.

Which Is Cursor Type Avl For Client Side Cursor
can anybody tell me which are the available types of cursor fot client side
cursor????

ADO, Cursor Type, Cursor Location
New to ADO. I am struggling to understand the different types of cursors, the amount system resources used for each type, and what kinds of cursor locations can be set.

There are so many terms to memorize and understand it is overwhelming to realize what is meant for the newbie.

Here are three questions that encapsulate the main issues I am having difficulty with. If there is a good website that discusses all of these terms at length, I would appreciate that. I couldn't find exactly what I was looking for at the MSDN site my instructor gave us.


Q1) Which type of cursor uses the least amount of system resources if you wanted to retrieve an ADO recordset which is used to populate a control and then discard the recordset?

Cursor Types to choose from

static
keyset
dynamic
forward-only

Q2) If you wanted a client/server app to call a stored procedure that returns multiple large recordsets and you want the app to process all the resulting records sets returned, what Cursor Location and Cursor Type should be set?

Cursor Locations to choose from

adUseClient
adUseServer


Cursor Types to choose from

adOpenDynamic
adOpenKeyset
any type


Q3) If you wanted a client/server app to access only some of the data in a recordset, which type of database cursor should be used in the app to minimize the amount of network traffic?

dynamic server-side cursor
dynamic keyset client-side with pessimistic locking
static client-side cursor with optimistic locking
non-keyset client-side cursor

Help With Cursor
I am trying to make like a shooting type of game, how do I get an image/picture to follow where the cursor moves?

Cursor
Hey, does anyone know how to set a new cursor for directdraw7? If its not just hiding the cursor and making an image move with the cursor, does anyone know how to animate that cursor?

Cursor
hi does anybody know a way i can make vba give me a messages box with the cursor position?

About The Cursor
An external application is running,with many labels,textboxes comboxes and commandbuttons. Can I put the cursor into the second textbox wherever the current focus locate ? Thanks.

Cursor
I'v got a really cool cursor that I want to use in my program. Does anyone know how I can use it in my program?

Cursor Help!!!
i got most my interface and stuff completed except one crucial element which is i cant seem to find a way to turn my cursor coordinates into variables or even view them on a msgbox plz help as it is crucial

How To Get Rid Of The Cursor
how to have nothing for cursor (actually i just want to have a blue square that i desing with .line)

Cursor
Is it possible to write a program that will allow in what ever text window be it in Note pad, a textbox in VB or a Forum your in you could right click and select froma drop down or popup menu and it place " " or various other key combinations you assign to it.

?? Can it be Done?

How do I if it can go about learning what it takes....

I would love to have a program that would allow me to even hit a Key event of sorts or as I said right click and Choose the [vb] code simble click again and get the other

vbMarkO

How Do U Set The Cursor
hi i have a form and each time i execute it I want the flashing text cursor to be set into a specific textbox. How do i do this????

Cursor
Well, i wonder why my cursor does not go in sequence from one textbox to another textbox when each time i click on Tab. I need to make sure that the cursor goes on sequence. Any idea ??-

Where The Cursor Is
How can I load up a form and position its top left corner to where the user's cursor is within a richtextbox?

I have code that will position a form to the mouse position, but I am not sure how to set it where the cursor is...

THANKS!

çentipede
-"your mother was a hampster and your father smelled of elderberries."

Cursor
How do you make the text cursor default to a certain text box without a timer and remaking the form.

Cursor
Is there a way to make a little animation follow a cursor everywere on a specific form.

Cursor On && Off
Hi:

Is it posible to not show the cursor in a textbox, in other words turn it off and back on on form exit?

Thanks for your response.

Cursor
can anyone tell me how to get the x and y position of the cursor?

thanks

Cursor
Hello everyone.
I want to change the cursor appearance as I move over different objects drawn in a picturebox.
I couldnt's just "LoadCursorFromFile" (api) because I needed to specify the position of the hotspot. This I did by loading the file with VB's LoadPicture in a picturebox and manually building the ANDmask and XORmask arrays to be passed to "CreateCursor" (api) (*nasty job*)
Then I "SetCursor"

It works, but VB is constantly changing back my cursor with the default for the picturebox (when I mousemove, I think), so that the cursor is continually flickering. Can I disable the VB feature that does this, maybe?

Cursor
Hi,

Anyone know the codes to display a cursor in VB6?Whenever i type something,there will be a cursor blinking.The user made some characters selection,and when the characters is displayes,there will be a cursor.Thanks alot for ypur help .

SQL Cursor?
I have a db with 389,000 records... It's a collection of shipment dates dating back to 2002... However, I only need the records dating back to the beginning of 2005. How do I bypass the un-needed records? Here's my SQL statement...


VB Code:
strSQL = "SELECT * FROM LAWSON_BSACLIPTRK WHERE LAWSON_BSACLIPTRK.ORDER_NBR = " & txtSOEntry

Cursor, Be Gone
I have textboxes on my form, and one of them always has a blinking cursor whenever the program starts. How do I get rid of the cursor? I don't want it to show up in any of my textboxes.

Copyright © 2005-08 www.BigResource.com, All rights reserved