473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Make Visual Basic to press a key

2
I don't know how to make visual basic press a key using code, can someone help me?!
Jul 13 '07 #1
4 2285
Killer42
8,435 Expert 8TB
It sounds as though you're probably looking for the SendKeys function. How it works depends on what version of VB you are using, but check your documentation.
Jul 13 '07 #2
Mague
137 100+
Most the time all you have to do is put this code
Expand|Select|Wrap|Line Numbers
  1. sendkeys(string)
  2.  
I found for some reason this didnt work on my visual studio 2005 so if it doesnt try this
Expand|Select|Wrap|Line Numbers
  1. sendkeys.send(string)
  2.  
Hope this helped
Mague
Jul 13 '07 #3
hariharanmca
1,977 1GB
I don't know how to make visual basic press a key using code, can someone help me?!
Expand|Select|Wrap|Line Numbers
  1. strKey = "{<Key Name>}"  in VB 6.0
  2.  
  3. sendkeys strKey 
This will do. Just throw the versions in the questions that you are using .
Jul 13 '07 #4
Virox
2
Thanks a lot, that was what i was looking for.
I use visual basic 6
Jul 14 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steve | last post by:
Visual Studio 2003 .Net / C# I have a Datagrid on the screen that I can tab into at the relevant point in my tab cycle. Basically the datagrid displays rows of basic information and if the user...
1
by: rdshultz | last post by:
I am the beginner of all beginners in Visual Basic.Net 2003. I'm looking for two types of books. One specifically directed towards beginners and one that shows examples of code for different...
1
by: nicole bissell | last post by:
Hello, I am working in a new form and still making changes to the visual basic code of the form. Not always, but very often when I try to save my changes in the visual basic window and press the...
4
by: James Thompson | last post by:
I'm sure this question has been asked a hundred times. I did a google search and found some older post and some mixed reviews. I am looking for an updated opinion on which book is the best for...
4
by: Andy | last post by:
In visual studio, I have an asp.net project. When I debug, I have to manually attach to aspnet_wp.exe. My project used to automatically attach to this process. How do I get it to automatically...
4
by: Pat | last post by:
Hi, Could you please suggest a good reference book for VB.NET? At present, I am working on VB.NET project. and looking for a book that would be useful as a reference book. Also, I would...
1
by: Ricardo Furtado | last post by:
I've been developing an application in visual basic .net 2005 from the beginning. I allways looked at the IDE as being slow, but i only had, 8 forms, some classes and 2 modules. Recently i imported...
4
by: MikeB | last post by:
I've been all over the net with this question, I hope I've finally found a group where I can ask about Visual Basic 2005. I'm at uni and we're working with Visual Basic 2005. I have some books, ...
2
by: mahmoodn | last post by:
Hi, My problem is with visual basic in powerpoint. Every time I open, close or navigate slides (in slide show mode), I get this error: Microsoft Visual Basic, System error &H8007007E module not...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.