|
-
Aug 7th, 2007, 07:19 PM
#1
Thread Starter
Member
[RESOLVED] Upload Image Using Vusual Studio .NET 2003
How can i upload image, like uploading of BackGroundImage?
-
Aug 7th, 2007, 07:23 PM
#2
Re: Upload Image Using Vusual Studio .NET 2003
You mean uploading something to a webserver or ???
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 7th, 2007, 07:55 PM
#3
Thread Starter
Member
Re: Upload Image Using Vusual Studio .NET 2003
Upload Image from a file to picturebox... just like when I'm set a backGroundImage, i want to do it on a button...
-
Aug 7th, 2007, 08:23 PM
#4
Re: Upload Image Using Vusual Studio .NET 2003
Ok, then it really wouldnt be called uploading but rather just setting an image to a picturebox.
Code:
Private Sub btnBrowsePic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowsePic.Click
With Me.dlgOpenFile
.Filter = "Image files only (.gif, .jpg, bmp)|*.gif; *.jpg; *.bmp"
.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)
If .ShowDialog = DialogResult.OK Then
Dim Image1 As Image
Image1 = New Bitmap(.FileName())
Me.PictureBox1.Image = Image1
End If
End With
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 7th, 2007, 10:20 PM
#5
Thread Starter
Member
Re: Upload Image Using Vusual Studio .NET 2003
-
Aug 7th, 2007, 10:34 PM
#6
Thread Starter
Member
Re: [RESOLVED] Upload Image Using Vusual Studio .NET 2003
Can you explain to me why there is |*.gif; *.jpg; *.bmp" even though i already declared a .gif, .jpg, bmp.......
-
Aug 7th, 2007, 10:43 PM
#7
Re: [RESOLVED] Upload Image Using Vusual Studio .NET 2003
The bit on the left of the vertical bar is what gets displayed to the user while the bit on the right is the actual filter used by the dialogue. You often do but you don't have to include the filter in what gets displayed to the user.
The filters always come in pairs like that. If you want a choice of two filters you would have four sections separated by vertical bars. The first and third would what got displayed to the user while the second and fourth would be the actual filters.
Try setting this as the filetr for a dialogue:
Code:
Image Files|*.gif; *.jpg; *.png; *.bmp|All Files|*.*
and then try this:
Code:
Image Files (*.gif, *.jpg, *.png, *.bmp)|*.gif; *.jpg; *.png; *.bmp|All Files|*.*
Notice that the functionality of the dialogue doesn't change. Only what the user sees changes, because you've added the extra bit to the string displayed to the user.
-
Aug 7th, 2007, 11:15 PM
#8
Thread Starter
Member
Re: [RESOLVED] Upload Image Using Vusual Studio .NET 2003
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|