CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: button slide

  1. #1
    Join Date
    Mar 1999
    Location
    Siberia
    Posts
    1

    button slide



    hi


    i had desighned a form with a single command button my objective is that

    the button ..at run time the mouse pointer focus should not be able to reach the button


    ie.. if i place mouse pointer on the button.. button should slide of randomly all over the form so that i should not be able to click that button at all


    can some one help me over this problem


    regards

    Nike



  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: button slide



    Hi


    This could get very annoying, but it's quite fun ...


    Try something like :


    Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)


    Dim lLeft As Long

    Dim lTop As Long



    lLeft = Rnd(1) * (ScaleWidth - Command1.Width)

    lTop = Rnd(1) * (ScaleHeight - Command1.Height)



    Command1.Move lLeft, lTop



    End Sub


    Regards


    Chris Eastwood


    Codeguru - the website for developers

    http://www.codeguru.com/vb



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

Featured