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




Use Up/Down Arrow Key To Move Cursor


I have 5 textboxes in a form. By using the keyascii code 13 ie ENTER key, I can move down the cursor to next textbox
Now suppose the cursor is at Text3 and I want to move the cursor to TExt2 with key board. How can I do this?
Up/Down arrow kwy doesnot have any key code.
In this situation, how can I move cursor from one to another with arrow keys?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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.

Using The Down/up Arrow To Move Through Textboxes
Not much to say on this one... I'm using VBA though so please remember that.

I need to be able to move up and down through a group of 23 textboxes with the up and down arrow. The textboxes are named "Rev1" through "Rev23" so it shouldn't be too bad to figure out. The big question, though, is do I have to use the numerical keyboard code for the up and down arrows or will it work with the Keydown event? Here's the start of what I was thinking of doing:


Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

objCtrls("Rev" & CStr(i + 1)).SetFocus

End Sub

That should be a real simple way to do it.... except for the fact that I can't figure out how to find the current value of i (I.E. if the focus is on the "Rev18" textbox, then i would be 18)
I can figure out how to work the up button in once I get the down working, but any help provided is greatly appreciated.

Thanks!

How To Move Using Arrow Key From One Text Box To Other?
Dear Friends,

How can I move through the text boxes using "Up & Down" arrow keys? Now I can move one textbox to other using "TAB key".

Thanks in advance.

Arrow Keys To Move Object
I currently have cmds to use this command:

imgPlayer.Top = imgPlayer.Top - 50

to move up, down, right and left and such - how do I change this so I use the arrow keys instead?

Move Objects With Arrow Keys
Hi

How i can move the objects(by example a label or a textbox) with arrow keys in the form design??

I tried, but the objects is not moving inside the form design.
Simple question, but i don't know to do this.
Thanks.

Move Button Using Arrow Keys
I want to move my button which is placed on form once user press any of the arrow keys. How to do this

How To Replace Cursor With SetSystemCursor From “App Starting” To Normal Arrow?
I am trying to change “WORKING IN BACKGROUND” and “BUSY” mouse cursor pointer to “NORMAL SELECT” cursor pointer
Because my main application often loads and terminates several extra VB6 applications and it is pretty annoying to see how cursor icon jerks and switches many times from normal arrow to BUSY hourglass or “Working in background” hourglass with arrow

I try to use this code it seems like it does not working …
hNormal = CopyIcon(GetCursor())
makelog Me.Name & ";;Err.LastDllError=" & Err.LastDllError & ";hArrow=" & hArrow & ";hNormalor = " & hNormal & ";retval=" & retval
retval = SetSystemCursor(hNormal, IDC_APPSTARTING)

So here is the question: How to replace in current scheme (whether it is default scheme, or 3d bronze scheme or dinosaur scheme, or etc.) cursor mode “BUSY” or “WORKING IN BACKGROUND” to “NORMAL SELECT” cursor icon, and them how to restore back to normal when my main application ended or terminated

How To Replace Cursor With SetSystemCursor From “App Starting” To Normal Arrow?
I am trying to change “WORKING IN BACKGROUND” and “BUSY” mouse cursor pointer to “NORMAL SELECT” cursor pointer
Because my main application often loads and terminates several extra VB6 applications and it is pretty annoying to see how cursor icon jerks and switches many times from normal arrow to BUSY hourglass or “Working in background” hourglass with arrow

I try to use this code it seems like it does not working …
hNormal = CopyIcon(GetCursor())
makelog Me.Name & ";;Err.LastDllError=" & Err.LastDllError & ";hArrow=" & hArrow & ";hNormalor = " & hNormal & ";retval=" & retval
retval = SetSystemCursor(hNormal, IDC_APPSTARTING)

So here is the question: How to replace in current scheme (whether it is default scheme, or 3d bronze scheme or dinosaur scheme, or etc.) cursor mode “BUSY” or “WORKING IN BACKGROUND” to “NORMAL SELECT” cursor icon, and them how to restore back to normal when my main application ended or terminated

Arrow Keys To Move A Simple Image
Im just trying to pick up the basics here, how would i go about moving an image around using the arrow keys, or any keys for that matter.

And on a seperate question, how do you make a background image scroll horizantally or across the X-axis?

How To Make An Object Move Using Arrow Keys
How do i make an object move using then arrow keys (up, down, left, right). I figured out how to make things using command buttons but would like to use the arrow keys.
Any help would be appreciated

How Do I Move An Image Around In Run Time With The Arrow Keys
using 2 keys at once also like left and up at the same time. thanks

How Do I Make Arrow Keys Move Images?
How would I make an image move so when I push the "up arrow" it would move it 10 twips? I thought it would be


If vbKeyRight = True Then
imgball.left -10
Elseif vbkeyleft Then
imgball.left +10
Elseif vbKeyUp then
imgball.top +10
Else vbkeydown then
imgball.top -10]
End if

but its not can someone help me?

ADODC's Arrows Doesn't Move The DataGrid's Arrow
I have a problem. Consider the table below as my DataGrid and the one below it as the ADODC. . .

------------------------------------------------
=======================
Customer Number Customer Name
> 345 Morrie
333 Mikel
093 Lorna
342 Cass
=======================
|<<|< Customer |>|>>| (<-This is the ADODC bar)
------------------------------------------------

I have connected my ADODC to the DataGrid. I have also connected the ADODC to my database and the DataGrid displays the database's contents just fine. But the thing is, whenever I press the left/right arrows on the ADODC bar, the arrow on the datagrid (>) doesn't move up or down (or in other words, it doesn't jump to the next row). It remains static (it remains on the first row). What could be the problem? The datagrid isn't locked.

How Do U Make Keyboard Arrow Keys Move A Picture Box?
well i pretty much said it in the title.

i was wondering how would you make a picture box or an object repond
to the arrow keys.

for example i have a picture and i want to move right when i press the
right arrow on my keyboard. what is code for that?

if anyones knows the code please answer.

thank you very much.

Writing Code For Arrow Keys To Move Around Form Textboxes
hello
i have an input form where users input machine tasks etc

there are about 5 textboxes and a combo and a few buttons.
and my manager has said he would like for them to be able to use arrow keys to go left right up down etc

so i was thinking like this

Pcode:

if key = arrow up then
if textbox.gotfocus then
sometextbox.setfocus
elseif textbox2.gotfocus then
sometextbox2.setfocus
end if

elseif key = arrow down then

etc etc etc

i hope you get the point

what i would like to know is....
Is this really bad practice? as in, is it practical? will it be very buggy?
and
How else could i accomplish this?
and
How would i write the code like above? i.e. how do i check if a textbox has got focus? and how to i check for the button pressed?
would i put it as

Sub Keypress ?

thanks for help!

How Do I Make An Image Move According To The User Arrow Keys On A Keyboard?
I'm desperatly trying to make a game in Visual Basic but have hit a problem. I have an image, an army tank. I want the tank to move when the user presses his/her left/right/up/down buttons on their keyboard adn the image moves according to the keyboard direction. HOw would I do this in vb 6?


need an urgent reply!!!!

Cursor Move
Hello you,

In an Excel file, I wanna move the cursor to the last cell of the column the cursor is on ... and can't find the way to get it there.

Does anybody have a suggestion to this (small) problem.

Thanks a lot to you for replying.

Cursor Move...
I have a part to my program where I have a clear button for a textbox, but how can I make it so that when they clik clear, the cursor moves back to the text box?

Move The Cursor
I want to move the mouse cursor around the screen, and possibly run events, how would I do this? It has been stumping the expletive out of me, please help,-- thank you alot

Move The Cursor
Is it possible to move the cursor using VB code?

for example when a new form opens, to make the cursor go to the 'ok' button?????

Api To Move The Cursor
is there any api throug wich the cursor could be moved in a
text box.

Move The Cursor
How can I move the cursor to the end of default value?

for example I have a textbox with a default text=<test>
and I want the cursor to move to the end of the default text.

HOW TO MOVE THE CURSOR IN TO THE LAST ROW
Dear All,

I want to move the cursor to the last entry of the datagrid while opening showing the records. Presently by default the from first record data is showing. I hav to move to the last row by moving the scroll bar.

Is there is any way to show the last row by default, while showing the records

Thanks in advance



Kumar
9322027344

Move Cursor
how move cursor to next field in vb

Move Mouse Cursor
Access 2003

I want to be able to have the mouse move and hover over a button on an access form.

Reason, if error, I want the cursor to move to the button that will fix it.

Move Cursor To Next Textbox
I have 2 textbox. TxtboxA and TxtboxB. When the user key in the 2nd character, the cursor will move to txtboxB.

Can anybody help me out please...
For an example,

(TxtBoxA)
User key in '12'
The cursor will auto move to txtboxB

Any help is highly appreciated.

How To Move The Cursor To Another Field
Hi all! if a user is typing text in a text field and the field gets full, then how can we move the cursor automatically to another text field. lets say from address line 1 to address line 2

How Do I Make The Cursor Move ?
Hi,
I was trying to make a so called "clicker" program in VB6
The idea of it is for the user to click on the color box ( striped one on the pic ) and then to click on some point on the screen. The program should remamber that color and position. After pressing "start" it should automatically start clicking over that point.
Moreover, if the color of that point changes to another specified ( in the second color box ), the cursor starts moveing right untill it is over the first color and, after clicking on it, the cursor moves back to its originaly set position.

http://www.vi2.com/maxForumFiles/1_1...27_screeny.JPG

But how can I tell VB to detect the cursor positions and the color under it?
Couldn't find it anywhere, is it possible in VB?

Thanx

Move Text Cursor
when i press tab during run-time, the text cursor goes to another text box. what i want it to do is move the text cursor to the end of the line (which already has text in it)

i.e. when a text box with the text "Fred Smith" is moved to by tab, i want the cursor to move past the 'h' in smith and an extra space, so when i start typing after pressing tab, the text will look something like "Fred Smith Is 30 years old" instead of... "Is 30 years oldFred Smith" like it would normally happen.

hope im clear. thanks

Nell

Move Cursor To The Top In A Dbgrid?
How can I move the cursor up to the first row and the first column in a DBGrid after I push a command button.

Thank you all of you

How To Move The Cursor From One Textbox To Another???
If i have an array of 10 Textboxes, & in each TextBox only one digit is allowed to be entered- I can do all this..now apart from this what I want to do is- as soon as a digit is entered in the first text box the cursor should automatically move to the second and so on until the last one...

Move Keyboard Cursor
maybe that can help you :


Code:
Private Sub Command1_Click()
For x = 1 To Len(Text1)
If Mid(Text1, x, 1) = " " Then
Text1.SelStart = x
Text1.SelLength = 0
Text1.SetFocus
End If
Next x
End Sub

How To Move The Cursor In A Textbox?
I have a textbox where I only want the user to input numbers so I arranged the following code for that:


Code:


If Not IsNumeric(txtCumprimento.Text) Then
If txtLargura.Text <> "" Then
txtLargura.Text = Left(txtCumprimento.Text, Len(txtCumprimento.Text) - 1)
End If
End If



The thing is, suppose you press a number key on the keyboard, than you press a letter, the ltter will be removed with the above code but the mouse cursor will be before all the text in the textbox but I want it to be after all the text...

Thanks in advance

Move Cursor Without Mouse
Help me please, how can I move the arrow cursor only with vb code
 
Thanks a lot
Fernando Oviedo  FREE pop-up blocking with the new MSN Toolbar MSN Toolbar Get it now!

Is There An API To Move The Mouse Cursor?
I'd like to programatically move the mouse cursor from a command button after clicking it to a VSFlexGrid row and column... Also, to a TextBox, a ListBox index and a ComboBox. Is there an API to do this? And how can I just move the mouse cursor in general to coordinates on a form?

Thanks!

ddutke

How To Move The Cursor At A Specified Position In RichTextBox
Hello

I want to move the cursor at a specified position in a RichTextBox. I know how to get the position of the cursor i.e. the Row Number and the Column Number but the problem is how do I tell RichTextBox to move to that specified position.

Say for example I want to move the cursor to position (3,4) then how can I do it?
The only properties of RichTextBox that I can think that they may work are

SelStart
SelLength

But the problem is SelStart moves the cursor to the start of specified Row Number and SelLength selects all the text up from start to the specified position. I don't want any selection just move the cursor.

Cursor Position...form.move
hi, im writing some code so that when i click a label a form will apear where the mouse is. i tried the mouseup sub and used the x and y from there but realized that uses the x and y from where the label is in the frame. so then i used the "GetCursorPos" and "POINTAPI" function and type so capture the position of the mouse. i then used the "form.move X, Y" command but for some reason the form keeps appearing near the top left corner of my screen. the only thing i can think of is the scaling system for the mouse vs. the form, am i right?? does anyone know how i can fix my problem so that the form DOES appear where my mouse clicked the label??


thanks

Textbox Cursor Move***RESOLVED***
I have a textbox that the user will enter text in (duh). I am programming this for a touchscreen so need to be able to allow the user to move back and forth within the word to make editing easier.

How can i move the cursor within the word forward and back. I am sure it is simple but not in front of my ide to test stuff out right now.

Thanks everyone!

? Program Intellimouse To Move Cursor
I have long been a user of a triple 21" monitor system(XP), however to save the wear and tear on my arm - constantly side scrolling across the real estate from one monitor to the other, I was wondering if anybody knows how to program various keystrokes to jump to say the middle of each outer monitor?
I would then program the side buttons on my intellimouse to those keystrokes.

or if you can directly program the defaulted forward / back buttons to perform each jump that would be simpler
Any help is appreciated

Dale

Move Cursor On Slow Motion
How do i make my cursor move to certain location on my screen and it move slowly? slow motion.

EXCEL: How To Move Cursor To Another Cell
I'm not all that knowledgeable in VBScript, but before I set about learning VB and actually writing the script, I'd like to know if this is even a possibility;

Similar to the Focus/Blur attributes in dHTML, I'd like to shift the cursor to an adjacent cell in MS Excel after the user inputs a given number of characters.


Any help woud be appreciated.


Thanks,

sml_blok

Move Cursor To End Of Text In Textbox
Hi,

Im creating a program to print labels for my workplace.

When i type a part number in the search box and press enter, the cursor is sent to the Lot Ref. Number txtbox and "PR-" is automatically put in the txt box.

How do i make the cursor go to the end of the txt "PR-" so that i can just start typing numbers. PR stands for Posted Receipt.

Thanks

Using Movewhile To Move Cursor Out Of A Frame
Hello,

Does anyone know of a way to use the movewhile command to move the cursor position to anywhere that is not in a frame. I need to do this so my print macro can use the "WordBasic.FilePageSetup" command. If the cursor is in a frame when I run it, I get an error.

I know it can be done with tabs using this code:

Selection.MoveWhile cset:=vbtab, Count:=wdForward

---------------------------------------------------------------

"An eye for an eye will leave us all blind"

Edited by - tforeman on 10/25/2005 2:33:14 AM

How Can You Move The Cursor W/out Moving The Mouse?
HI,

I have tried using SetCursorPos to adjust the position of the cursor on screen, without the mouse, but I want it to adjust the cursor position relative to something else. E.g. :

FirstMousePosition.X - 10

Where 10 represents an `x` co-ordinate.

Is it possible to do this?

Any Info

Thanks

Mark

How To Move Cursor To Last Char. In A Textbox
hi all

When I set focus to a textbox how do I position my cursor after the last character.


Thanks in advance
Venky

How Do I Move The Mouse Cursor To A Set Point On My Form?
Just like the thread says. I want to move the cursor to a set point on the form (50 from the left, and 50 down). Is there a way to do this?

I Can't Move Cursor Through Records (Cells) In DataGrid?
Dear Friends,

I have one DataGrid on my form which retrieves data from MS Access database and shows in the Grids. Everything is ok except I can't select any cel in the DataGrid.

Whenever I try to select a single cel from other rows, it just selects the first row cel. But I can select the whole row.

What to do to select a single cel from any row in the DataGrid?

Thanks in advance.

About Programming The Cursor To Move To A Specific Color
Hey i don't know if this its illegal to post this but i wanna make a aimbot for this first person shooter game and its offline. I just want the cursor/mouse to automatically AIM to the head of the enemy so i can have a headshot so i came up with a plan.

Find out what color head of enemy is and program the cursor/mouse to automatically go to that specific color when the mouse detects that color.

Thank you for taking your time and reading this thread,

-DopeyGuy123

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