Hi,
I just do this sample, so it crashes : (VB6 SP6 - Win 7 32)
http://forum.codejock.com/uploads/5580/Projet1.zip - uploads/5580/Projet1.zip
---------------------------------------------------------------------
Function AddReportRecord(Parent As ReportRecord, _ Read As Boolean, _ Subject As String, _ From As String, _ Sent As Date, _ Size As Long, _ Price As Single) As ReportRecord
Dim Record As ReportRecord
If Parent Is Nothing Then
Set Record = wndReportControl.Records.Add() Else
Set Record = Parent.Childs.Add() End If
Dim Item As ReportRecordItem
Set Item = Record.AddItem("") Item.Icon = IIf(Read, 3, 2)
Set Item = Record.AddItem("") Item.HasCheckbox = True Item.Checked = False Record.AddItem Subject Record.AddItem From Record.AddItem Sent Record.AddItem Size
Set Item = Record.AddItem(Price) Item.Format = "$ %s"
Set AddReportRecord = Record End Function
Private Sub LoadReport() Dim Record As ReportRecord ' Setup ReportControl records AddReportRecord Nothing, True, "Undeliverable Mail", " mailto:postmaster@mail.codejock.com - postmaster@mail.codejock.com ", "21/06/2004", 7, 5.23 AddReportRecord Nothing, False, "RE: Hi Mary", "Peter Parker", "19/06/2004", 17, 3.34
Set Record = AddReportRecord(Nothing, True, "RE:", "Bruce Wayne", "19/06/2004", 11, 3.32) AddReportRecord Record, True, "Re: it's me again", "Clark Kent [ckent@codetoolbox.com]", "17/06/2004", 10, 6.34 AddReportRecord Record, True, "Re: it's me again", "QueryReply", "17/06/2004", 41, 16.42
Set Record = AddReportRecord(Record, False, "I don't understand:", "Bruce Wayne", "17/06/2004", 1, 5.12) AddReportRecord Record, False, "Re:", "Bruce Wayne", "17/06/2004", 23, 8.76 wndReportControl.Populate End Sub
Private Sub CreateColunm() Dim Column As ReportColumn
' Setup ReportControl columns Set Column = wndReportControl.Columns.Add(1, "Icon", 18, False) Column.Icon = 0 Column.Sortable = False
Set Column = wndReportControl.Columns.Add(2, "Check", 18, False) Column.Icon = 1 Column.Sortable = False
Set Column = wndReportControl.Columns.Add(3, "Subject", 280, True) Column.TreeColumn = True wndReportControl.Columns.Add 4, "From", 180, True wndReportControl.Columns.Add 5, "Sent", 150, True wndReportControl.Columns.Add 6, "Size", 50, True wndReportControl.Columns.Add 7, "Price", 80, True End Sub
Private Sub Form_Load() ReportControlGlobalSettings.ResourceImages.LoadFromFile App.Path & "\Office2010.dll", "Office2010Blue.ini" CreateColunm LoadReport wndReportControl.PaintManager.ColumnStyle = xtpColumnResource End Sub
What's wrong ?
Thanks
|