DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    picturebox resizing

    [Originally posted by Chats]

    I have this˙ code but nonthing˙ seems˙ to happen˙
    what im tring to do is to resize the picture to fit the picture box˙ can some one˙ tell me˙ why this˙ doesnt work and how to venter teh picture in the picture box˙


    Private Sub Picture1_Resize()
    If (Picture1.Picture) = LoadPicture Then
    Else
    ˙ ˙ Picture1.Picture = LoadPicture(vbCenter = 2)
    End If
    Picture1.Picture = Picture.Loaded(vbCenter)
    End
    End Sub

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:picturebox resizing

    [Originally posted by Greg Givler]

    From what I remember the picturebox can't do that. So what you have to do is set the Picture box to AutoSize then center the whole control on the form. You can I believe state the size of a picture in LoadPicture, but I don't ever remember doing that. I used a very good shareware Picturebox replacement, GVBOX, if I remember correctly. I cost around $50 at the time, and was very good. It may still be around, in fact a quick check of Google and it is, here is the link.

    http://jcoconsulting.com/index.asp?Section=GVOCX

    You can download the OCX and develop with it, it displays a nag screen during development in your compiled programs.

    Greg

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links