Lock Key Controls

Posted on 2003-03-23
Medium Priority
Last Modified: 2010-05-01
Right now I designed a game which I use the arrows on the keyboard to move an object.  What I want to do is to lock the key controls once the object dies.  Is there anyway in doing so?  And activate it once I reload the game again.

Question by:n-generation
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

GeneM earned 200 total points
ID: 8191166
Sometimes the simplest way to do something like this is the best way.  For example, you could do something like this:

Public ObjDead as boolean

'Then in the form load:
ObjDead = false

'When the object dies:
ObjDead = true

'Then in the logic where you process the keys (keydown,etc), you could do:

If objdead then exit sub

I hope this helps....


Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question