|
-
Jan 1st, 2006, 10:40 PM
#1
Thread Starter
Fanatic Member
ListView BackgroundImage [RESOLVED]
Why isn't this working...
VB Code:
ListView1.BackgroundImage = Image.FromFile("c:\tst.bmp")
...
I've found this:
http://dotnet.mvps.org/dotnet/faqs/?...dimage&lang=en
on the forums...
but the listview DOES have the BackgroundImage property... What's it use if it doesn't work the way I tired?
Last edited by Ruku; Jan 2nd, 2006 at 12:55 AM.
-
Jan 1st, 2006, 11:00 PM
#2
Lively Member
Re: ListView BackgroundImage [UNRESOLVED]
try this mate might just be that the control will accept bitmaps rather than images
Dim oBMP As New Bitmap(sFileName)
ListView1.BackgroundImage = obmp
-
Jan 1st, 2006, 11:03 PM
#3
Re: ListView BackgroundImage [UNRESOLVED]
Worked for me using a jpg. Visual Studio 2005 listview has a background image property, the 2003 control does not. In 2005, it worked fine and loaded my test jpg into the listview background...
VB Code:
'worked fine in 2005 express
ListView1.BackgroundImage = Image.FromFile("c:\test.jpg")
Are you sure you gave it the right file path? I do realize you are missing an "e" if you meant "test.bmp"... but even if that is correct, if you are using 2005, then it should still work...
-
Jan 1st, 2006, 11:16 PM
#4
Re: ListView BackgroundImage [UNRESOLVED]
I'm running 2003 1.1 and it doesnt work like this either.
VB Code:
Dim pic As Bitmap = New Bitmap("C:\Greenstone.bmp")
Me.ListView1.BackgroundImage = pic
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 
-
Jan 1st, 2006, 11:27 PM
#5
Re: ListView BackgroundImage [UNRESOLVED]
Is it just me or do I not see a background image property for a listview in 2003?
***EDIT - k I was only looking in designer, I see it now
-
Jan 1st, 2006, 11:37 PM
#6
Re: ListView BackgroundImage [UNRESOLVED]
The ListView has to have a BackgroundImage property because it is inherited from the Control class. It is just not displayed in the designer because it has been overridden to have no effect, which is why setting it in code does nothing. Presumably Microsoft decided to reinstate the property's behaviour in .NET 2.0 as people must have wanted it and complained about it not having an effect in .NET 1.x.
-
Jan 2nd, 2006, 12:55 AM
#7
Thread Starter
Fanatic Member
Re: ListView BackgroundImage [UNRESOLVED]
yeah, I guess... bah well...
I got 2003... If you wanna have the BG in 2003, try this link:
http://dotnet.mvps.org/dotnet/faqs/?...dimage&lang=en
Last edited by Ruku; Jan 2nd, 2006 at 01:11 AM.
-
Jan 2nd, 2006, 12:58 AM
#8
Re: ListView BackgroundImage [RESOLVED]
The link doesnt work but looks like the same one from post #1?
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 
-
Jan 2nd, 2006, 01:11 AM
#9
Thread Starter
Fanatic Member
Re: ListView BackgroundImage [RESOLVED]
w00t!
copyed it including the "..."
-
Jan 2nd, 2006, 01:20 AM
#10
Re: ListView BackgroundImage [RESOLVED]
Oh, so it was the same original link. Thanks
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 
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
|