Results 1 to 2 of 2

Thread: Graphical Buttons ??

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Location
    England ?? :-)
    Posts
    1

    Exclamation Graphical Buttons ??

    Hi,

    I'm creating a program that uses a rather snazzy interface, but i'm using graphical buttons using a picture box as the button.

    I have setup a event that when the p/box is pressed that the status changes to 1 (like a boolean) when it is pressed again it changes to 0. Its seems that if you change to another picture box with the same code that does the same thing but only to itself you first need to click to give the picture box FOCUS then again to click and call the event. Here is the code i'm using, let us know please if its something stupidly wrong i have done!!.
    do not i need to use index's as there is no way i going to create 1000 buttons !!!


    Code Sample :

    rem yes page = 0
    rem index starts at 1 to 10

    Private Sub stat_Click(Index As Integer)
    If station(Index * page) = 1 Then station(Index * page) = 0 Else station(Index * page) = 1
    End Sub

    Thank you


    JD Software
    <script language="VBScript">
    a=msgbox("Hi!!, Please Post Me!!",vbOKOnly)
    </Script>

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    not your problem (it may be !) but you should use this code:

    Code:
    Private Sub stat_Click(Index As Integer) 
    If station(page * indexesperpage * Index) = 1 Then: station(page * indexesperpage * Index) = 0: Else: station(page * indexesperpage * Index) = 1
    End Sub
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width