Click here to Skip to main content
16,006,707 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Run msi thru bat file... Pin
nlarson1114-Apr-09 5:25
nlarson1114-Apr-09 5:25 
QuestionVisual Interdev Issue: Not Opening Giving Error Pin
priyaahh13-Apr-09 19:32
priyaahh13-Apr-09 19:32 
AnswerRe: Visual Interdev Issue: Not Opening Giving Error Pin
Dave Kreskowiak14-Apr-09 5:06
mveDave Kreskowiak14-Apr-09 5:06 
AnswerRe: Visual Interdev Issue: Not Opening Giving Error Pin
nlarson1114-Apr-09 5:34
nlarson1114-Apr-09 5:34 
Questionhow to format vb code nice? any key is available? Pin
zhiyuan1613-Apr-09 17:08
zhiyuan1613-Apr-09 17:08 
AnswerRe: how to format vb code nice? any key is available? Pin
Luc 64801113-Apr-09 17:12
Luc 64801113-Apr-09 17:12 
AnswerRe: how to format vb code nice? any key is available? Pin
Mycroft Holmes13-Apr-09 19:31
professionalMycroft Holmes13-Apr-09 19:31 
Questionhow to calculate the value for listView subitems? [modified] Pin
zhiyuan1613-Apr-09 15:49
zhiyuan1613-Apr-09 15:49 
dear all

i am a newbie in vb6, so far i entountered a problem, how to calculate the value for listview subitem, my part code is here, anyone can help me, thanks a lot.

actually i am calculating the pixel amount in each index: for example: index value: 0, 1, 2 ...255.
when i click Button Execute in form frmHistogram: the code is following:
Private Sub cmdExecute_Click()
    'Execute the computing
    


    EasyMain1.Histogram EBW8Image1.object, frmHistogramVector.EBWHistogramVector1.object
    
    
    frmHistogramVector.EBWHistogramVector1.Refresh
    frmHistogramVector.Show
    
End Sub


and i wanna put the variable a as my subitem value, the code is the following:

Private Sub Form_Load()
    

      Dim Min As Long
      Dim Max As Long
      Min = 0
      Max = 255
    With ListView1
       
        .ColumnHeaders.Add          'add a couple columns
        .ColumnHeaders.Add
        .ColumnHeaders(1).Text = "Index"     'name the columns
        .ColumnHeaders(2).Text = "Count"
        .ColumnHeaders(1).Width = .Width * 0.35  'column width based on width of list view
        .ColumnHeaders(2).Width = .Width * 0.5
    
    Dim I As Long
    Dim a As Single

    With .ListItems
        For I = 0 To 255
        a = EasyMain1.AnalyseHistogram(EBWHistogramVector1.object, eImgPixelCount, 0, 255)
            With .Add(, , I)
                 .ListSubItems.Add , , a
               
            End With
        Next I
    End With

        
    End With
    
End Sub


however when i run program, one popup dialog remind me: invalid number of vector elements.

what is problem here. thanks.

modified on Monday, April 13, 2009 10:19 PM

AnswerRe: how to calculate the value for listView subitems? Pin
Mycroft Holmes13-Apr-09 19:32
professionalMycroft Holmes13-Apr-09 19:32 
GeneralRe: how to calculate the value for listView subitems? Pin
zhiyuan1613-Apr-09 19:41
zhiyuan1613-Apr-09 19:41 
Questionsave checked items in listview using savefiledialog Pin
siralphaomega13-Apr-09 6:54
siralphaomega13-Apr-09 6:54 
AnswerRe: save checked items in listview using savefiledialog Pin
Dave Kreskowiak13-Apr-09 10:38
mveDave Kreskowiak13-Apr-09 10:38 
GeneralRe: save checked items in listview using savefiledialog Pin
siralphaomega13-Apr-09 19:43
siralphaomega13-Apr-09 19:43 
GeneralRe: save checked items in listview using savefiledialog Pin
siralphaomega13-Apr-09 20:54
siralphaomega13-Apr-09 20:54 
AnswerRe: save checked items in listview using savefiledialog Pin
Mycroft Holmes13-Apr-09 19:37
professionalMycroft Holmes13-Apr-09 19:37 
GeneralRe: save checked items in listview using savefiledialog Pin
siralphaomega13-Apr-09 20:56
siralphaomega13-Apr-09 20:56 
GeneralRe: save checked items in listview using savefiledialog Pin
Mycroft Holmes13-Apr-09 22:21
professionalMycroft Holmes13-Apr-09 22:21 
QuestionRegwrite Pin
siva45513-Apr-09 4:20
siva45513-Apr-09 4:20 
AnswerRe: Regwrite Pin
EliottA13-Apr-09 7:14
EliottA13-Apr-09 7:14 
AnswerRe: Regwrite Pin
Dave Kreskowiak13-Apr-09 8:43
mveDave Kreskowiak13-Apr-09 8:43 
AnswerRe: Regwrite Pin
Yusuf13-Apr-09 14:23
Yusuf13-Apr-09 14:23 
QuestionRun command Pin
p_196013-Apr-09 3:06
p_196013-Apr-09 3:06 
AnswerRe: Run command Pin
Dave Kreskowiak13-Apr-09 3:52
mveDave Kreskowiak13-Apr-09 3:52 
GeneralRe: Run command Pin
p_196013-Apr-09 4:16
p_196013-Apr-09 4:16 
QuestionRe: Run command Pin
Eddy Vluggen13-Apr-09 4:36
professionalEddy Vluggen13-Apr-09 4:36 

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.