Click here to Skip to main content
15,890,506 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Need help with poker hands codes Pin
Dave Kreskowiak14-Jul-14 2:20
mveDave Kreskowiak14-Jul-14 2:20 
GeneralRe: Need help with poker hands codes Pin
Lapin Noir14-Jul-14 5:18
Lapin Noir14-Jul-14 5:18 
GeneralRe: Need help with poker hands codes Pin
Dave Kreskowiak14-Jul-14 6:57
mveDave Kreskowiak14-Jul-14 6:57 
GeneralRe: Need help with poker hands codes Pin
Lapin Noir14-Jul-14 9:42
Lapin Noir14-Jul-14 9:42 
GeneralRe: Need help with poker hands codes Pin
Dave Kreskowiak14-Jul-14 10:31
mveDave Kreskowiak14-Jul-14 10:31 
GeneralRe: Need help with poker hands codes Pin
Lapin Noir14-Jul-14 11:56
Lapin Noir14-Jul-14 11:56 
GeneralRe: Need help with poker hands codes Pin
Dave Kreskowiak14-Jul-14 18:23
mveDave Kreskowiak14-Jul-14 18:23 
QuestionRemove image from first column in ListView Pin
jkirkerx13-Jul-14 12:41
professionaljkirkerx13-Jul-14 12:41 
I actually have 2 questions

I added an imagelist to my listview, and it always add the first image in the list to the first column.
I can eliminate the image, but it always leave a space for the image before the text, changing my aligment from left to sort of right.

Is there a way to override this?
Dim item1 As New ListViewItem(sJC(idx).FINVNO.ToString)
item1.Checked = False
item1.SubItems.Add(sJC(idx).FCUSTNO)
item1.SubItems.Add(sJC(idx).FTRANSDATE)
item1.SubItems.Add(sJC(idx).FTRANSTIME)
item1.SubItems.Add(sJC(idx).FCOMPANY)
item1.SubItems.Add(sJC(idx).FCONTACT1)
item1.SubItems.Add(sJC(idx).FEMAIL1)
item1.SubItems.Add("")
item1.SubItems.Add("")
lv_journal_icons.Items.Add(item1)


Question 2:
I used some code that extends the listview so you can add an icon or image to a subitem.
It adds the image, but I want to center the image in the column
So the code sends a message to the pump setting the cell.
I've done some c++ with listview, but I can't remember if I can send a message to the pump to center the image.
Public Sub AddIconToSubitem( _
       ByVal row As Integer,
       ByVal col As Integer,
       ByVal icon_num As Integer)

       Dim lvi As New ListViewWithIcons.LV_ITEM()
       lvi.iItem = row         ' Row.
       lvi.iSubItem = col      ' Column.

       ' Indicate what we're setting.
       ' lvi.mask = ListViewWithIcons.LVIF_IMAGE Or
       ' ListViewWithIcons.LVIF_TEXT
       lvi.mask = ListViewWithIcons.LVIF_IMAGE

       ' Image index in the ImageList.
       lvi.iImage = icon_num

       ' Send the LVM_SETITEM message.
       ListViewWithIcons.SendMessage(Me.Handle, ListViewWithIcons.LVM_SETITEM, 0, lvi)


   End Sub

I looked at the structure for LVITEM, and didn't see anything for alignment.
Public Structure LV_ITEM

        Public mask As UInt32
        Public iItem As Int32
        Public iSubItem As Int32
        Public state As UInt32
        Public stateMask As UInt32
        Public pszText As String
        Public cchTextMax As Int32
        Public iImage As Int32
        Public lParam As IntPtr

    End Structure


Queston3:
Is it default behavior for the listiew to resize the image large, I made my image 16x16 but it always displays larger.
AnswerRe: Remove image from first column in ListView Pin
Eddy Vluggen14-Jul-14 0:32
professionalEddy Vluggen14-Jul-14 0:32 
GeneralRe: Remove image from first column in ListView Pin
jkirkerx14-Jul-14 6:38
professionaljkirkerx14-Jul-14 6:38 
GeneralRe: Remove image from first column in ListView Pin
Eddy Vluggen14-Jul-14 7:43
professionalEddy Vluggen14-Jul-14 7:43 
Questionhow to Add Combo-box in DataGrid View to Select My Product Pin
D-Matrix's Systemware13-Jul-14 6:59
professionalD-Matrix's Systemware13-Jul-14 6:59 
AnswerRe: how to Add Combo-box in DataGrid View to Select My Product Pin
Richard MacCutchan13-Jul-14 7:31
mveRichard MacCutchan13-Jul-14 7:31 
QuestionList of List returning only copies of last list added Pin
BubbaBeans8-Jul-14 13:05
BubbaBeans8-Jul-14 13:05 
AnswerRe: List of List returning only copies of last list added Pin
Estys9-Jul-14 0:34
Estys9-Jul-14 0:34 
GeneralRe: List of List returning only copies of last list added Pin
BubbaBeans9-Jul-14 6:29
BubbaBeans9-Jul-14 6:29 
AnswerRe: List of List returning only copies of last list added Pin
Dave Kreskowiak9-Jul-14 2:36
mveDave Kreskowiak9-Jul-14 2:36 
QuestionVB.net debug question Pin
James Carlo Valdeavilla8-Jul-14 4:40
James Carlo Valdeavilla8-Jul-14 4:40 
AnswerRe: VB.net debug question Pin
Dave Kreskowiak8-Jul-14 14:33
mveDave Kreskowiak8-Jul-14 14:33 
AnswerRe: VB.net debug question Pin
Richard MacCutchan8-Jul-14 23:23
mveRichard MacCutchan8-Jul-14 23:23 
GeneralRe: VB.net debug question Pin
James Carlo Valdeavilla9-Jul-14 12:51
James Carlo Valdeavilla9-Jul-14 12:51 
GeneralRe: VB.net debug question Pin
Bernhard Hiller9-Jul-14 21:04
Bernhard Hiller9-Jul-14 21:04 
QuestionSaving image into ms access database Pin
Member 109246424-Jul-14 4:03
Member 109246424-Jul-14 4:03 
AnswerRe: Saving image into ms access database Pin
CHill604-Jul-14 5:39
mveCHill604-Jul-14 5:39 
AnswerRe: Saving image into ms access database Pin
Richard MacCutchan4-Jul-14 5:56
mveRichard MacCutchan4-Jul-14 5:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.