?
Solved

A mockup Phone in visual basik

Posted on 1999-12-07
5
Medium Priority
?
250 Views
Last Modified: 2006-11-17
Hi,

I am designing a mock up mobile phone in visual basic. The first problem that I have is with the "abc" buttons. I have a button to put the phone into abc mode to stop the buttons from being numbers and make 1 be "abc", 2 = def...

(assuming I have pressed the ABC mode button) When I click on the button that has the number 1 on it  once, I get "a", twice, I get "b" e.t.c. It works. The problem is, is that I would like to be able to press 1 once for an a then for the cursor to move on after a prerdetermined time limit so I can add another "A" or another letter to make up a name.

The other problem I have is with the speed dial buttons. I have 10 buttons down the side of the phone and have a button called edit. What I would like to happen is that the user puts the number that he wants saved into the speed dial in the main field that Is used for dialling. Then he presses edit and then he presses the speed dial button that he wants the number to go into and the number is saved. Then... when the edit button is not pressed, and the user presses a speed dial button, I would like the number stored in that button to be displayed in the main field. This must be done via an access database link, not variables.

I hope my explanation is not too bad!!

J
0
Comment
Question by:jazzanova
5 Comments
 
LVL 1

Expert Comment

by:KINGSMILL
ID: 2261515
This is you A-level set exercise you should do it yourself


0
 

Author Comment

by:jazzanova
ID: 2261650
BRUCE GET A LIFE YOU BIG T***
0
 

Author Comment

by:jazzanova
ID: 2261664
PLUS BRUCE, LEARN HOW TO SPELL YOUR
0
 
LVL 18

Accepted Solution

by:
deighton earned 600 total points
ID: 2261923
Private Sub Command1_Click()

    Static sPress
    Dim dThreshold, send As String
    Dim snew As String
   
    dThreshold = 1
   
    If sPress <> 0 Then
   
        If Timer - sPress < dThreshold Then
           
            send = Right(Label1, 1)
            If send = "A" Then
                snew = "B"
            ElseIf send = "B" Then
                snew = "C"
            Else
                snew = "A"
            End If
               
            Label1 = Left(Label1, Len(Label1) - 1) & snew
        Else
            Label1 = Label1 & "A"
        End If
    Else
        Label1 = Label1 & "A"
    End If
    sPress = Timer
           


End Sub
0
 
LVL 1

Expert Comment

by:Kurvy
ID: 2261940
Part 1

set a timer on the form which polls the count on the phone button if the count stays the same for say 2 seconds move the cursor on in the text box using
textbox.selstart =len(textbox.text)

Part2

set up a simple access table with two fields ID and Number
set the Id of the field to the speed dial number

use sql to retreive by using

"Select * From My Table where Id = " & clng(button.caption)

This should give you a start

kurvy
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

589 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