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

Mapping Enter Key To TAB Key

How I can I map the ENTER Key to the TAB key, or at least make ENTER behave like TAB?

When I have several text boxes with their TabIndex set appropriately, I can TAB from one to the next. I want the ENTER key to behave the same way.

I want to do this without having to know the name of the next text box and setting focus to it. It should just know which textbox to move to, according to the TabIndex.

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Mapping Tab On Enter Key
I want to use ENTER or RETURN key as TAB.
This will enable user to press enter to move on to next control which is fatser

I tried sendkeys but not working

please suggest code and where to apply i.e. at KeyDown event or KeyPress event

RPG Mapping
Hey all, i've looked around a few places, so i'm hoping i can find some help here

I'm making a small rpg as my first game project, and progress wise, the game is, well rather was, progressing nicely untill i hit a big mental block. I'm having trouble making certain tiles on the games map's unwalkable, because as it stands, you can walk over the whole map! The current method im using is, my map creator will make files that contains lines like:


The game then loads the .map files, which contain lines like the above, and draws maps based of the information it reads. The first two numbers of each line are the X,Y co ordinates of the tile to grab from the games tileset, the next two numbers are the X,Y co ords of where to draw that tile onto the map, the fifth number, based on whether it is a 0 or a 1 makes the tile walkable or unwalkable. I thought this method would work, and i still think it should, but it doesnt? ... a friend on IRC said i should use a method like:

Public Type typTile
Walkable As Boolean
End Type
Dim Map(10, 10) As typTile

Open App.path & " est.bin" For Binary Access Write As #1
Put #1, , Map()
CLose #1

But i didnt understand him ... So if anyone has any sugguestions about mapping or could fix my current method, i've uploaded the source code here . Sorry for the badly formatted code, i'm nun too experienced with vb

Thanks in advance, icarus.

When I got some basic .map display code set up, I made the dumb mistake that thinking all .map files would be in the same format as one another. So my map editor didint work of that map display... Does anybody have a map display system with a map editor avilable? Or atleast a easy .map format that could be done in notepad.

Mapping going to end this for once!

i have 2 different type of tiles, either 1 or 2. i have 2 dimentional byte array Map(0 to 100, 0 to 100) as BYTE

(the size will probably get larger later..but doesnt matter now)

ok so i loop throuhg and set the values to 1 or 2..doesnt really matter for my problem either..

ok now comes the part where i have to draw the tiles on the screen.

I have variables that hold my characters x and y positions.. Player1.xpos and player1.ypos my tiles at 32 x 32 (i could go back to 16 x 16 if that makes it easier)

i want to keep my character in the middle of the screen at all times..

and i only want to have to draw the tiles that are On Screen

what is the basis for accomplishing this task..

and also, once i get that done.

say my map is 100 x 100 tiles

but on screen you only see like 30 x 20 tiles (not actually.. just picked a number) but i wanna place an emeny around tile 80,80 ..there isnt a surface that exists to put it on..

do i have to wait till the character Gets to those tiles..and then blt it?

please help.. i have another post if somewhere below if you want to check out my source..

Mapping F1 Key
I posted a previous message regarding the fact that F1 key menu shortcut was not working properly on certain user's machine. Is there a way, on startup, to force window to use F1 key primarly for my program ( in the registry or elsewhere ) ?
Thanx !

GIS Mapping
I use MapObjects and Visual basic. Who in this forums familiar using this software?I hope those familiar using this software can share the sample code with me. It is ESRI product.

Image Mapping
Iam new to vb, how to have an image mapped in vb? is there any ocx than I can have. I really need this one badly..... please help......


2D Mapping Problem
Im trying to do a rotation effect to my program, but it does not seem to do what I want...

Here is the code:

Dim mx(4)
Dim my(4)
Dim vmx(4)
Dim vmy(4)
Dim va
Dim a
Dim pi
Dim rx
Dim ry

Private Function pyth(num)
pyth = Sqr(mx(num) ^ 2 + my(num) ^ 2)
End Function
Private Sub Evaluate()
For num = 1 To va
Let vmx(num) = (mx(num) + pyth(num) * (Sin(degrees(a))))
Let vmy(num) = (my(num) + pyth(num) * (Cos(degrees(a))))
Next num
End Sub
Private Sub Start()
Let mx(1) = 20
Let mx(2) = 20
Let mx(3) = 10
Let mx(4) = 10
Let my(1) = -5
Let my(2) = 5
Let my(3) = 5
Let my(4) = -5

Let a = 0
Let va = 4
pi = 3.14159265358979
Let rx = 100
Let ry = 100
End Sub

Private Sub CmdLeft_Click()
Let a = a - 1
End Sub

Private Sub CmdReset_Click()
Let a = 0
End Sub

Private Sub CmdRight_Click()
Let a = a + 1
End Sub

Private Sub Form_Activate()
End Sub

Private Function degrees(num)
degrees = num * (pi / 180)
End Function

Private Sub Render()
PicRender.Line (0, ry / 2)-(rx, ry / 2): PicRender.Line (rx / 2, 0)-(rx / 2, ry)
For num = 1 To va
PicRender.PSet (vmx(num) + (rx / 2), vmy(num) + (ry / 2)): PicRender.Print num
Next num
End Sub


There are also the project files attached...

Any ideas?

Image Mapping

i'm new to Visual Basic and was wondering how you could load one image and have it so as individual parts of it are clicked it loads a new form or screen or what have you.. like image mapping.

There's something in the code library but I can't figure out how to use it.

I'm really new at this so if someone could explain how to do it (or use the code library's file) i'd appreciate it

Image Mapping

I want to make a vb application having a image on the form which can be used for navigation to open another image on same form depending upon the part of the image clicked.

Basic idea is to make image mapping in vb such that another image can be opened based on the image part selected by user.

I thought of storing X & Y co-ordinate of image and do the trick, but it doesn't work at the time when we enlarge/zoom the image on form using ZOOM button.

Can anybody help me ? How to perform image mapping ??



Mapping Ftp As A Drive
Hai friends, I would like some to help how to map ftp site as drive. plz provide me suggesstion and help. thanks in advance.


Height Mapping
I have a problam with height mapping (or however it's called).
My code takes a black and white picture and turn it into a 3d surface.
The method is going pixel by pixel in the height map and checking his height. Then make a vertex for him and another 3 vertices (creating a square) in the same height. Each square is stored in a different vertex buffer and then I show them all with a for loop in the render sub.
Now here is the problem. When rendering the landscape in line strip or point list it looks perfect. But when going to trianle strip it looks horrible.
I thought it might be the order I set the vertices but I can't seem the find the right order.
I attached the project if you want to have a look at the code.
If someone finds a way to fix it, please tell me.

Thanks and bye bye, Omer_D

I can't believe it...
A few minutes after I ask for help I solve it myself.
Thanks anyway and you can use it if you want (if you can't fix the problem I had PM me).

By bye, Omer_D.

About Lamp Mapping..
Hi, all..
I am searching for a tutorial to control lamp ON/OFF with VB thru serial port communication.

Maybe somebody could help me, please..

Thank you so much for helps.

Best regards.

Bump Mapping!
Hello all... I have this c++ function that implement bump mapping.. How can I implement some function in vb?? how can I find vb code for bump mapping?? Please help me..

// Name: InitBumpMap()
// Desc: Converts data from m_pEarthBumpTexture into the type of bump map requested
// as m_BumpMapFormat into m_psBumpMap.

HRESULT CMyD3DApplication::InitBumpMap()
LPDIRECT3DTEXTURE8 psBumpSrc = m_pEarthBumpTexture;

psBumpSrc->GetLevelDesc( 0, &d3dsd );
// Create the bumpmap's surface and texture objects
if( FAILED( m_pd3dDevice->CreateTexture( d3dsd.Width, d3dsd.Height, 1, 0,
m_BumpMapFormat, D3DPOOL_MANAGED, &m_psBumpMap ) ) )
return E_FAIL;

// Fill the bits of the new texture surface with bits from
// a private format.
psBumpSrc->LockRect( 0, &d3dlr, 0, 0 );
DWORD dwSrcPitch = (DWORD)d3dlr.Pitch;
BYTE* pSrcTopRow = (BYTE*)d3dlr.pBits;
BYTE* pSrcCurRow = pSrcTopRow;
BYTE* pSrcBotRow = pSrcTopRow + (dwSrcPitch * (d3dsd.Height - 1) );

m_psBumpMap->LockRect( 0, &d3dlr, 0, 0 );
DWORD dwDstPitch = (DWORD)d3dlr.Pitch;
BYTE* pDstTopRow = (BYTE*)d3dlr.pBits;
BYTE* pDstCurRow = pDstTopRow;
BYTE* pDstBotRow = pDstTopRow + (dwDstPitch * (d3dsd.Height - 1) );

for( DWORD y=0; y<d3dsd.Height; y++ )
BYTE* pSrcB0; // addr of current pixel
BYTE* pSrcB1; // addr of pixel below current pixel, wrapping to top if necessary
BYTE* pSrcB2; // addr of pixel above current pixel, wrapping to bottom if necessary
BYTE* pDstT; // addr of dest pixel;

pSrcB0 = pSrcCurRow;

if( y == d3dsd.Height - 1)
pSrcB1 = pSrcTopRow;
pSrcB1 = pSrcCurRow + dwSrcPitch;

if( y == 0 )
pSrcB2 = pSrcBotRow;
pSrcB2 = pSrcCurRow - dwSrcPitch;

pDstT = pDstCurRow;

for( DWORD x=0; x<d3dsd.Width; x++ )
LONG v00; // Current pixel
LONG v01; // Pixel to the right of current pixel, wrapping to left edge if necessary
LONG vM1; // Pixel to the left of current pixel, wrapping to right edge if necessary
LONG v10; // Pixel one line below.
LONG v1M; // Pixel one line above.

v00 = *(pSrcB0+0);

if( x == d3dsd.Width - 1 )
v01 = *(pSrcCurRow);
v01 = *(pSrcB0+4);

if( x == 0 )
vM1 = *(pSrcCurRow + (4 * (d3dsd.Width - 1)));
vM1 = *(pSrcB0-4);
v10 = *(pSrcB1+0);
v1M = *(pSrcB2+0);

LONG iDu = (vM1-v01); // The delta-u bump value
LONG iDv = (v1M-v10); // The delta-v bump value

// The luminance bump value (land masses are less shiny)
WORD uL = ( v00>1 ) ? 63 : 127;

switch( m_BumpMapFormat )
case D3DFMT_V8U8:
*pDstT++ = (BYTE)iDu;
*pDstT++ = (BYTE)iDv;

case D3DFMT_L6V5U5:
*(WORD*)pDstT = (WORD)( ( (iDu>>3) & 0x1f ) << 0 );
*(WORD*)pDstT |= (WORD)( ( (iDv>>3) & 0x1f ) << 5 );
*(WORD*)pDstT |= (WORD)( ( ( uL>>2) & 0x3f ) << 10 );
pDstT += 2;

case D3DFMT_X8L8V8U8:
*pDstT++ = (BYTE)iDu;
*pDstT++ = (BYTE)iDv;
*pDstT++ = (BYTE)uL;
*pDstT++ = (BYTE)0L;

// Move one pixel to the right (src is 32-bpp)

// Move to the next line
pSrcCurRow += dwSrcPitch;
pDstCurRow += dwDstPitch;


return S_OK;

bye bye

Action Mapping
Has anyone managed to combine Action Mapping with events.I tried converting the standard examples to use the event model but the Acquire is never called because the event doesn't fire. Trying to call Acquire during the initialise routine resulted in Runtime error 5.

How Do I Use Environment Mapping With DX8.1?
I have a mesh loaded up like so

Public Sub Create350ZMesh()

Dim xfName As String
Dim nMaterials As Long
Dim mtrlBuffer As D3DXBuffer
Dim meshMat As D3DMATERIAL8
Dim i As Long

GameDebugger.WriteLine "Loading 350Z into memory"

UpdateProgressbar "Loading 350Z Mesh", 0

OnLoadStep = 0

With Car350Z

'load the body mesh to .body
xfName = App.Path & "Models350Z.x"
Set .Body = d3dx.LoadMeshFromX(xfName, D3DXMESH_MANAGED, d3dDevice, Nothing, mtrlBuffer, nMaterials)
OnLoadStep = OnLoadStep + 1
UpdateProgressbar "Loading 350Z Mesh", OnLoadStep

'apply any textures the body requires
ReDim .BodyTexture(nMaterials)
ReDim .BodyTextureName(nMaterials)
ReDim .BodyMaterial(nMaterials)
.Bodymaterials = nMaterials
For i = 0 To nMaterials - 1
OnLoadStep = OnLoadStep + 1
UpdateProgressbar "Loading 350Z Mesh", OnLoadStep
d3dx.BufferGetMaterial mtrlBuffer, i, meshMat
meshMat.Ambient = meshMat.diffuse
.BodyMaterial(i) = meshMat
xfName = d3dx.BufferGetTextureName(mtrlBuffer, i)
.BodyTextureName(i) = xfName
d3dDevice.SetTextureStageState 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1
If Len(xfName) > 0 Then
Set .BodyTexture(i) = d3dx.CreateTextureFromFile(d3dDevice, App.Path & "Models" & xfName)
End If
Next i

GameDebugger.WriteLine "Loaded 350Z into memory finished without error"

End Sub

The mesh is of the type

Private Type ModelMesh
Body As D3DXMesh
BackTires As D3DXMesh
FrontPassengerTire As D3DXMesh
FrontDriverTire As D3DXMesh
BodyTexture() As Direct3DTexture8
BodyReflection As Direct3DTexture8
TireBump As Direct3DTexture8
BackTiresTexture() As Direct3DTexture8
FrontDriverTireTexture() As Direct3DTexture8
FrontPassengerTexture() As Direct3DTexture8
BodyTextureName() As String
BackTiresTextureName() As String
FrontDriverTireTextureName() As String
FrontPassengerTextureName() As String
BodyMaterial() As D3DMATERIAL8
BackTiresMaterial() As D3DMATERIAL8
FrontDriverMaterial() As D3DMATERIAL8
FrontPassengerMaterial() As D3DMATERIAL8
Bodymaterials As Long
BackTiresmaterials As Long
FrontDrivermaterials As Long
FrontPassengermaterials As Long
UnitMeshName As String
End Type

Its rendered in the render loop by

With Car350Z
'draw the body
D3DXMatrixIdentity matTemp
D3DXMatrixRotationY matTemp, .Rotation
D3DXMatrixTranslation matTrans, .X, .Y, .z
D3DXMatrixMultiply matTemp, matTemp, matTrans
d3dDevice.SetTransform D3DTS_WORLD, matTemp
For i = 0 To .Bodymaterials - 1
d3dDevice.SetMaterial .BodyMaterial(i)
d3dDevice.SetTexture 0, .BodyTexture(i)
.Body.DrawSubset i
Next i
End With

I've been looking around at the MSDN archive but its so elusive. Any ideas? I'm hoping I can load a environment map and apply it to the model much like a regular texture map. Is that possible?

Light Mapping

Is there any tutorials about lightmaps with vb6.0 and directx8?


Mapping Goes Away When I Am Logged Off
I created a script on my local Windows 2000 workstation that opens up a mapped directory on a Windows 2000 server. It works great in my task scheduler that is scheduled to run at 12:00 each day. The problem is when I am logged off my local workstation and the local workstation task scheduler executes my script that opens up a mapped directory it doesnt work and fails.

Do I lose my mapped directory when I am logged off my workstation?
If this is the case, anyway to keep my mapping when I am logged off because I need the script to run successfully when I am logged off.

Mapping Drives?
Is there a way to map/disconnect network drives via code?

I have a process that depends on a mapped network drive to run, but the computer is losing the connection periodically, even though I select reconnect at login. I was wondering if there is a consol command or something that I can use to map the drive, run the process, then disconnect the drive when I am done.


Instead Of Mapping A Drive
I'm trying to find a simple example of using the WINSOCK (I think) control so that I can stop having to map a drive every time I want to connect to another computers share. I just don't get how to set this up --- the control or the code. Here is the scenario that would help me with the basics:


NOTE: The ' shows what is typed into the Text fields

Text1.text = source 'F:sharemyfile.txt
Text2.Text = destination 'C:localmyfile.txt

FileCopy source, destination


Text1.text = source '\
Text2.Text = destination 'C:localmyfile.txt

FileCopy source, destination

As always -- thanks in advance

Image Mapping

I want to make a vb application having a image on the form which can be used for navigation to open another image on same form depending upon the part of the image clicked.

Basic idea is to make image mapping in vb such that another image can be opened based on the image part selected by user.

I thought of storing X & Y co-ordinate of image and do the trick, but it doesn't work at the time when we enlarge/zoom the image on form using ZOOM button.

Can anybody help me ? How to perform image mapping ??



Concept Mapping
I've attached my concept mapping file. Can someone check the codes for me especially the following funcitons:
1. Private Sub File_Save_Click()
2. Private Sub mnu_Topik1_Click()

API Mapping Drives
I am using the WNETAddConnection and I am running into a few problems. I can get the code to actually map the drive once. Then once I disconnect from the drive (either manually or with the WNETCancelConnection) I cannot get it to remap to anything. I am getting a return code of 5. Does anyone know why this is? Also how can I see what the return codes mean? Any help is greatly appreciated.

Mapping A Drive
I need to be able to map a local drive letter to a network drive with a UNC (windows network) in code (.Net or vb6) but cannot find an obvious answer. I have fumbled around FileSystemOpbjectand Windows Scripting host etc but no joy as yet.

Any ideas?

Color Mapping
Thansk for your support in the last thread .

Now, I have a temperature array of 256 values, from a thermal imager.
i roughly created in Red ,Green,Blue ( RGB ),

Lets say from 24degree to 30 , i use Blue component
30.1 to 37.5 Green
37.5 to 80 Red.

With this i get only Red,Gree Blue picture only .
I want a mix of these colors that represents the temperature 24 degree to 80 degree.So that i can have Cyan , Vioulet, Bluyish green , yello etc, how would I i acheive this ?

All your advices are appreciated,

thanks and best regards,


Network Mapping In XP
Hello Guru's and Code SAge's,

The code below maps networks drive in Win 2000 flawlessly but does nothing on XP machines. Any suggestions as to why? I would think there is no difference in any Win OS from 98 on. Does XP demand a user/pass?

Thank you in advance,

sDriveLetter = Temp1
sShareName = Temp2

msiShellAndWait (X = WNetCancelConnection(sDriveLetter, True))
msiShellAndWait (X = WNetAddConnection(sShareName, "", sDriveLetter))

Note: Whereas Temp1 = N: and Temp2 = \servershare

GPS Mapping Component
Hi, Can somebody share the project related with GPS mapping? I would like to share you all. I found the GPS mapping component on this website.

??? GPS Mapping Component ???
Does anyone know of a GPS mapping component? I want the ability to let user record GPS coordinates then auto plot them using Visual Basic.

Any ideas?

Mapping A Drive
I need to map a drive automatically in VB6 so that it is a permanent addition in the windows explorer.

I can attach to draw data, but I need it to show in explorer.

Any ideas guys?

GPS Mapping Util
Hi Guys,
Can someone send me the zipped files that lerouxc1 posted in his message

the link to and are no longer valid...

I need it urgently....

many thanks....


Mapping Keys
Is there any way to map the enter key to the tab key. I'm making a data entry program but people in data entry are used to hitting the enter key to move along the fields not the tab. Is this possible? Thanks for any help.

Mapping Control
I am searching for a third party control which could be used to map external source data (XML, xls, txt) to my sequil server db tables. This will allow me flexibility in keeping my source data separated from my tables.

Would be nice if control had data type conversion capability as well.

Has anyone seen any good data mapping controls that would accomplish this?


Keyboard Mapping
Hello all....

wondering the it possible to use VB6 to map a certain string to a keyboard key?

I assume that would make changes to the reg, but have never heard of same before...

can anyone offer if this 'can' be done and I'll hunt from there?



Mapping A Drive From VB
I need to map a drive from VB. Help!



Network Mapping
I want to be able to connect to a network server(netware) and copy a file using VB6.
I have got necessary netware rights for the server and the directory where the file is residing. But the other users will not have rights.
So, I want to hardcode the parameters ( such as userID,password, UNC path ) necessary to login to the server using my rights. I found few examples to do that. Examples that I have seen are using 'WNetUseConnection' or WNetAddConnection2A. These examples work fine with my login userID . But it does not work for the user's UserID.
It refuses to connect multiple login. I am getting the error message as 'Error 1219 ' .
Could any one help me on this or direct me to a link please.


Mapping Drive From Vb
Any 1 help me how i can map/disconnect network drive from vb. (both from win9x and NT). the other system has 1 shred folder n permission granted for ny special user.

Mapping Drive To PC
I would like to map a drive withing a VB6 application.
For example:

Private Sub cmdONE_Click()


End Sub

Private Sub CmdTWO_Click()


End sub

Mapping Drives
Can anyone tell me how I can Mapp a network drive in code. I am trying to use RetVal = Shell("C:windowsdesktopuser.bat", 3) the bat file contains the net use arg but I would rather not use command shell to perform this operation \ntserver1shared.

Mapping Coordinates
hey guys and gals,

I have a question, please help me out. I have pasted a BMP on the picture box, I need to map some points on the BMP as coordinates and the coordinates to be linked to the list box which I have created on the same form, its like this when the user selects the name on the list box it should be pointed to the point on the BMP. Hope you people understood my question.

please do let me know with the answer, i am stuck with my project.

thanks in advance

Drive Mapping
I am needing to check if a drive is already mapped and if not, then I need to map it (on a Win2K machine). I have looked through the forums to see if anyone has posted about this before, but found nothing. Does anyone have any suggestions?


Mapping Solutions
Has anyone any experience of using Map point (2002) with VB.

I am currently developing an application that needs to present data as a map chart and we are considering buying Microsofts Map point.

Are there any alternatives worth considering.


Question On Mapping
hey i was wondering what the code was to load a map from like a floor plann for a maze i know how to cade the rest i think. i just need the code to load it.
for example:

Mapping A Drive From VB
How do you map a drive from within VB? I've tried this:

Call Shell(Environ("ComSpec") & " /c Net Use j: fssappdtlvol1 /Persistant:Yes", vbHide)

From a previous suggestion but it doesn't work.


Drive Re-mapping
I want to create a directory on a server, if they are mapped to that server with the default letter then no problem, if not I need to get the next available letter and map the drive.
How do I go about finding out if a drive is mapped to a particular letter (ie. K:Projects). And then how do I change that drive mapping or set a new one.
Alternatively could I just use the server name in the code
ie. mkdir(\ServerNameDirectory) - will this work ?

Image Mapping

Does anyone know how to incorporate and image links into VB similar to HTML.

I need an image with various sections and when the user clicks on these sections they pass info to vb.



Mapping Directories
How can I map a drive's directories into a treeview control?

Mapping Printers
I'm tring to find a method to remap printers. If a user is currently mapped to \prtsrv1dr34sea I need to change the mapping to \Cluster1dr34sea.

I'm open to any options ADSI, API or anything else.


Network Mapping
How can I Map a Drive using an specific UserID?

I want to map a drive on a computer providing the userID and password.... All the code i've found so far is using the Windows login.

is this possible??



Mapping A Drive?
mapping a drive? ...?

Copyright 2005-08, All rights reserved