Adblock breaks this site

centering

Discussion in 'Archives' started by nipplesandlicks, May 12, 2007.

  1. nipplesandlicks

    nipplesandlicks Guest

    Referrals:
    0
    centering

    i am trying to center a pic that pops up on start up with my client and here is my code and know????

    Private Sub Command1_Click()

    End Sub

    Private Sub timer1_timer()

    Form1.Show
    Unload Me

    End Sub
     
  2. WoW Sucks

    WoW Sucks Global Moderator
    Banned

    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0
    centering

    Just make the picture smaller, center it, then drag it out to the right size?
     
  3. timk777

    timk777 Active Member

    Joined:
    Feb 19, 2007
    Posts:
    156
    Referrals:
    0
    Sythe Gold:
    0
    centering

    Do you mean like a splash screen?
    If so, make a form with the picture on it. Then hold ctrl and hit P. Go down to properties select that. Then on the right side theres a dropdown box titled 'Startup Form'. Select the form with the picture on it. If thats not what you wanted, post back and I'll help.
     
  4. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    centering

    Code:
    Private Sub Form_Load()
        Image1.Left = (Me.Width / 2) - (Image1.Width / 2)
        Image1.Top = (Me.Height / 2) - (Image1.Height / 2)
    End Sub
     
  5. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    centering

    Set the image's stretch property to true (Not picturebox, Image control FTW) and then set the form to borderless. Use a timer for anything else you may be wanting.
     
< selling some guys | Buy Account 100+ >


 
 
Adblock breaks this site