Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / October 2005

Tip: Looking for answers? Try searching our database.

image not display in picturebox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Li Weng - 26 Oct 2005 13:43 GMT
Hi,

I have a form with a picturebox. I added an image in picturebox at design
time. I create the form in codes with New and .Show() to pop up. But image
doesn't show up. The picturebox looks transparent.
Please help.
Thanks in advance.

Li
Cor Ligthert [MVP] - 26 Oct 2005 16:40 GMT
Li

Can you show some code because there are endles methods to do what you want
to achieve.

Cor
Li Weng - 26 Oct 2005 19:22 GMT
To call the form is simple:
           Dim aform As New ImageForm
           aform.Show()

For ImageForm, I did everything on design time. Below are the codes from
"Windows Form Designer generated code":

       Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(ImageForm))
       Me.PictureBox1 = New System.Windows.Forms.PictureBox
       Me.SuspendLayout()
       '
       'PictureBox1
       '
       Me.PictureBox1.Image =
CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
       Me.PictureBox1.Location = New System.Drawing.Point(72, 16)
       Me.PictureBox1.Name = "PictureBox1"
       Me.PictureBox1.Size = New System.Drawing.Size(75, 75)
       Me.PictureBox1.SizeMode =
System.Windows.Forms.PictureBoxSizeMode.AutoSize
       Me.PictureBox1.TabIndex = 0
       Me.PictureBox1.TabStop = False
       '
       'ImageForm
       '
       Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
       Me.ClientSize = New System.Drawing.Size(226, 113)
       Me.ControlBox = False
       Me.Controls.Add(Me.PictureBox1)
       Me.Cursor = System.Windows.Forms.Cursors.Default
       Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
       Me.Name = "ImageForm"
       Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
       Me.Text = "Please Wait ..."
       Me.ResumeLayout(False)

Thanks.

Li

> Li
>
> Can you show some code because there are endles methods to do what you want
> to achieve.
>
> Cor
"Jeffrey Tan[MSFT]" - 31 Oct 2005 10:38 GMT
Hi Li,

Does my reply make sense to you? Is your problem resolved? Please feel free
to tell me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.