Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 05:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



ListView Control extract?

Discussion on ListView Control extract? within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
PraDevil[ELITE]'s Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,486
Received Thanks: 919
ListView Control extract?

hello ppl, like the title said..does anyone know how to get the ListView control from vb.net? instead of .dll, it will be great if i can get it in .vb extension. i want this control for my project, which i need to turn the listview into transparent background, i'll find one on google but it seem the listview do not have the LargeImageList so i'll create one..btw i cant seem to get the default draw like the original listview does..
here are the code i'll use
Code:
    Protected Overrides Sub OnDrawItem(ByVal e As System.Windows.Forms.DrawListViewItemEventArgs)

        [B]If Not (e.State And ListViewItemStates.Selected) = 0 OrElse e.Item.Selected Then
            Using br As New Drawing2D.LinearGradientBrush(e.Bounds, _startcolor, _endcolor, Drawing2D.LinearGradientMode.Vertical)

                ' Draw the background for a selected item.
                e.Graphics.FillRectangle(br, e.Bounds)
            End Using
        End If[/B]

        Dim sf As New StringFormat()

        Dim index As Integer
        index = e.ItemIndex


        If SmallImageList IsNot Nothing Then
            e.Graphics.DrawImage(SmallImageList.Images.Item(index), New Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 16, 16))
            e.Graphics.DrawString(e.Item.Text, Me.Font, Brushes.Black, New Rectangle(e.Bounds.X + SmallImageList.ImageSize.Width + 4, e.Bounds.Y, e.Bounds.Width - SmallImageList.ImageSize.Width - 4, e.Bounds.Height), sf)

        ElseIf [B]LargeImageList IsNot Nothing Then
            e.Graphics.DrawImage(LargeImageList.Images(index), New Rectangle(e.Bounds.X + 30, e.Bounds.Y + 15, 32, 32))
            e.Graphics.DrawString(e.Item.Text, Me.Font, Brushes.Black, New Rectangle(e.Bounds.X + 15, e.Bounds.Y + 50, 70, 32))[/B]
        Else
            e.Graphics.DrawString(e.Item.Text, Me.Font, Brushes.Black, e.Bounds)
        End If

        MyBase.OnDrawItem(e)
    End Sub
PraDevil[ELITE] is offline  
Reply


Similar Threads Similar Threads
Extract epk and eix error (Dont extract because eix)
12/26/2012 - Metin2 Private Server - 2 Replies
Hi, My first topic xD... But i have a problem extracting... how gives the informacion for extract is archive eix, and if isn´t the correct archive eix for archive epk don´t extract... it´s my problem... isn´t the correct eix file... And i need to extract pc2... is possible creat a archive eix for archive epk?? Please! I Need really... if possible for today! Try don´t respond in German... Or, write right... for i can translate...
[C#]listView
07/28/2011 - .NET Languages - 4 Replies
Hey Leute, wie der Titel schon sagt brauche ich Hilfe beim listView in C#. Mein Problem ist folgendes: Ich will einen Password Manager machen, und das Passwort usw. über eine andere Form in die listView von Form1 einfügen. Das funktioniert soweit auch, jedoch wenn ich nun ein zweites einfüge, dann wird die erste Zeile geändert, da ich das gleiche item noch mals einfüge nur mit anderem Text oder so. Hier ist mal der Source:
Autoit3 Listview Transparent
12/31/2010 - AutoIt - 3 Replies
Hallo Leute, kann mir wer sagen wie ich es schaffe, ein Listview Control transparent zu machen, damit das Hintergrundbild der GUI durchscheint. Danke schon mal. PaPa-Schlumpf
Control Center for Admin Easy to Control all
10/16/2009 - MapleStory - 2 Replies
Credits go to ucyc for making this nice programm http://www.pictureupload.de/originals/pictures/15 1009164127_2.jpg http://www.pictureupload.de/originals/pictures/15 1009164303_3.jpg Download Click here



All times are GMT +1. The time now is 05:28.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.