Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Right To Left ListView? (Report View)


I've tried implementing a right-aligned listview (comctl 6.0), but without any effect.
The listview is in report view mode.
Running WinXP. Shell language is Hebrew.

Code:
OldExStyle = GetWindowLong(lvwLearn.hWnd, GWL_EXSTYLE)
OldExStyle = SetWindowLong(lvwLearn.hWnd, GWL_EXSTYLE, OldExStyle _
Or WS_EX_LEFTSCROLLBAR Or WS_EX_RIGHT Or WS_EX_RTLREADING)
There is no apparent change to the listview, even though the call succeeds.

Does anyone have a solution?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
List View - Shifting Values From Right To Left If Left Column Is Empty [SOLVED]
I'm having a problem with ListView... if I delete a field value from any record, the remaining values from the other fields to the right of the empty field will "shift" to the right to ocupy the empty field.. the last field in the Db will now show empty.... this just happens in List View not in the actual Access DB

This is part of the code I'm using to populate the ListView

Code:

Public Sub PopluateListView(SQL As String, Lv As ListView)
    
    On Error Resume Next
  Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    
  Dim i As Long
  Dim j As Long
  Dim k As Long
    rs.Open SQL, cn, adOpenStatic, adLockOptimistic
    
    frmFieldsView.Caption = "Viewing Table " & frmDBTView.TableView1.SelectedItem.Text
    For i = 0 To rs.Fields.Count - 1
        Lv.ColumnHeaders.Add , , rs.Fields(i).Name
    Next i
    frmDBTView.ProgressBar1.Max = rs.RecordCount
    frmDBTView.ProgressBar1.Value = 0
    Screen.MousePointer = vbHourglass
    For k = 0 To rs.RecordCount
        If IsNull(rs.Fields(0).Value) Then Lv.ListItems.Add , , "" Else Lv.ListItems.Add , , rs.Fields(0).Value
        For j = 1 To rs.Fields.Count
            If IsNull(rs.Fields(1).Value) Then Lv.ListItems.Item(k + 1).ListSubItems.Add , , "" Else Lv.ListItems.Item(k _
                + 1).ListSubItems.Add , , rs.Fields(j).Value
        Next j
        frmDBTView.ProgressBar1.Value = k
        rs.MoveNext
    Next k
    frmFieldsView.StatusBar1.Panels(1).Text = "Record(s) " & rs.RecordCount
    frmDBTView.ProgressBar1.Value = 0
    Screen.MousePointer = vbArrow
    rs.Close
    Set rs = Nothing
    
End Sub


What am I doing wrong?

Thanks for any help

_________________________________________________________________

Edited by - vbprog1144 on 4/9/2005 11:19:53 AM

Help About ListView Report View
How can I add a new item to a particular column in report view? For example I have a columns named First and Second, I want to add an item to the Second column and not in First. Please tell me how. Please. Please. Please.

Listview - Report View With Icons?
Is it true that is you have the listview's view set to 3 (lvwReport) that it can't show icons?

I have a imagelist on a form with a picture in it. The picture has a key. I set the listview's icons and small icons to this imagelist. I tryed to add the picture to a listview menu item and used its key.

Didn't work. Any suggestions?

Listview + Report View + Colour
Can I make subitems have different backcolors or forecolors to them?

ListView (Report View) Troubles...
I have a list view that can contain alot, a few, or no values at all at any given time.
The box will display existing information in row 1, then in row 2 it will display the information that will overwrite the existing information (if the user chooses). Then the 3rd will be existing, 4th new, 5th existing, 6th new, etc...

The grid goes in pairs, and the check boxes are turned on. By default nothing is checked. I want the user to be able to click whatever they choose, if they check the box on an odd row, then all the text in every cell of that row will go bold, and the entire row after that cell will lose its bold font (incase it was selected before). The rows look like this:

1 asdfas as as dasdfasf asdf
1 asdf asf asdf asdf asd fasf asd
2 asf asdf asdf asf asf asdf asdf
2 asf asd fasdf asd fasdf asdf asdf
3 asdf asdf asf asf asdf asdf asdf
3 asdf asdf adsf adsf as fasd
4 adsf asdf sdf asf sa dfas fasdf as
4 asdfasdfa sdf asdf as fafs

Of course with check boxes to the left of the numbers, if i click the 2 on the bottom, it will go bold and the 2 above it will be unchecked and go back to non-bold font. I know this is possible, im pretty close already.. Here's what i have:


Code:
Private Sub lvConflicts_ItemCheck(ByVal Item As MSComctlLib.ListItem)
Dim MyCount As Integer
If Item.Checked = True Then
Item.Bold = True
For MyCount = 1 To 8
Item.ListSubItems.Item(MyCount).Bold = True
Select Case Right(Item.Index, 1)
Case Is = 1, 3, 5, 7, 9
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index + 1).ForeColor = &H808080
lvConflicts.ListItems(Item.Index + 1).Checked = False
Case Is = 0, 2, 4, 6, 8
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index - 1).ForeColor = &H808080
lvConflicts.ListItems(Item.Index - 1).Checked = False
End Select
Next MyCount
Else
Item.Bold = False
For MyCount = 1 To 8
Item.ListSubItems.Item(MyCount).Bold = False
Select Case Right(Item.Index, 1)
Case Is = 1, 3, 5, 7, 9
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index + 1).ForeColor = &H808080
Case Is = 0, 2, 4, 6, 8
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index - 1).ForeColor = &H808080
End Select
Next MyCount
End If
End Sub


Im practically doing it already, i know it.. I think im just thinking too hard.. ive been working too long on this

Listview (report View) Scrollbars
I can't seem to figure this out: how do I add vertical and horizontal scroll bars to a Listview control with its "View" property set to "lvwReport"? I have tried many thing ... but none seem to work.

Icons In Listview In Report View
Hi, I am having trouble trying to display icons in a listview. I am displaying the listview in report mode and I have all the imagelists properly bound. If im not mistaken, the icons used in the report view use the 'small' imagelist, correct? Anyway I am populating the imagelist by creating a ListItem variable and setting it to Listview1.Add each time through the loop. Could this be the problem?

Moving Columns On A Listview (Report View)
I want to programmatically set the Position of the columns in a list view.

This is an "after thought" so I am trying to do it on already loaded listviews.


I see from a little experimentation that I can easily move the column headers by simply changing the .position property.

But that does not bring over the data for that column. (Just the header)

Do I have to manually move the data or there an easier way?


(By "manually move the data" I mean set up a temp array, copy the column's data, update new column after moving other column into original col number)


Regards,

ListView Report Mode View - RESOLVED
When I change to report mode view nothing is showing up in my listview. When I change it to List view my data shows up. Any ideas?


VB Code:
Private Sub LoadTableSpecs()        Dim oSQLServer As New SQLDMO.SQLServer    Dim oSQLDatabase As New SQLDMO.Database    Dim oSQLTable As New SQLDMO.Table    Dim oSQLColumn As New SQLDMO.Column        Dim i As Integer    Dim liObject As ListItem        ListView1.ListItems.Clear        oSQLServer.LoginSecure = True    oSQLServer.Connect Form1.cboServer1.Text    Set oSQLDatabase = oSQLServer.Databases(Form1.cboDatabase1.Text)    Set oSQLTable = oSQLDatabase.Tables(Form1.cboTable1.Text)        For Each oSQLColumn In oSQLTable.Columns                Set liObject = ListView1.ListItems.Add(, , oSQLColumn.Name)        liObject.SubItems.Add , , oSQLColumn.Datatype        liObject.SubItems.Add , , oSQLColumn.Length        Set liObject = Nothin        Next    oSQLServer.DisConnectSet oSQLServer = NothingEnd Sub

ListView (Report View) - Adding Items
AH! This is embarassing yet very frustrating. The last time I worked with the list view control was a loooong time ago. Unfortunately, I lost that project when my computer crashed (no big deal really, the program was never even completed). At any rate, how the heck do I add subitems and items to a report view listview?!

eg
Column 1 Column 2
Add Item Add Item
Add Item Add Item

ListView (Report View) Numeric Sorting
Hi,

I have a listview control in report view, and I have it so that when I click on a columnheader it sorts the list items by that column, the problem is that when I do that on a numeric column its sorts it like this

1
11
2
3
3100
4
...

I was wondering how can I make it so it sorts the column correctly

1
2
3
4
11
3100

Let me know if you know a way

Thanks In Advance,

Zmei



Edited by - Zmei2004 on 8/29/2004 8:45:42 AM

Last Column Width In Listview (report View)
Hi,


Does anyone know an easy way I can make the width of the LAST column header in a 'report view' listview automatically be equal to the space available.


ie,

if the other columns take up half the width of the listview, the last column takes up the other half.


Similary, if the width of one of the other columns changes, the width of the last column is automatically changed appropiately (so there is never a horizontal scroll bar).


Thanks in advance for any help you can give me.


Tom.

Last Column Width In Listview (report View)
Hi,


Does anyone know an easy way I can make the width of the LAST column header in a 'report view' listview automatically be equal to the space available.


ie,

if the other columns take up half the width of the listview, the last column takes up the other half.


Similary, if the width of one of the other columns changes, the width of the last column is automatically changed appropiately (so there is never a horizontal scroll bar).


Thanks in advance for any help you can give me.


Tom.

How To Add A Thumbnail To A ListView Subitems That Will View In Report Format?
How to add a thumbnail to a ListView subitems that will view in report format?

Editing Selected Item In ListView In Report View
How can I edit the second column of data in a listview control? I am making a properties box much like the one you use in VB. The first column information for each item can not be editable but the second column is going to be the value for each item and I need for it to be able to click and type in it just like in VB (or at least similar to that).

Any help and sample code is appreciated. Thanks.

*solved*I Wanna Learn ListView In Report View
hi this is a new thread after advice on moving from Picture1 to now i believe ListView in Report view is the way to go.

Metallisoft can you help me get his going. I have attached form1 to download and change as i can't get it to work. your reference click here hasnt helped me as it gave me 3 values i only need 2

Database eg
Quote:UNIVERSAL    OEM    MFG
16190    2-1428-HI    WAI
16190    SJ-0001R    AIM
16190    91-25-1030    WILSON
16190    S9024    LUCAS REMAN
16190    9821006350    ISUZU
16190    9821006060    ISUZU
16190    S114-136    HITACHI
16190    S114-100    HITACHI
16190    SR198X    BOSCH REMAN
16190    94022494    GENERAL MOTORS
16190    RXS056    OEX
16190    94021044    GENERAL MOTORS
16190    S114-118    HITACHI I Don't need to display the UNIVERSAL Numbers Just OEM anf MFG only

Code:Private Sub Command3_Click()
Set rs = New ADODB.Recordset 'this will be the rs
Dim strSQL As String 'this the source
         
'make the selection string: filter the records right away
strSQL = "SELECT C.* FROM OEMS AS C where UNIVERSAL in(select UNIVERSAL from OEMS where oem='" & UCase$(Text1) & "')"
                       
' To hold a reference to the current Listitem (row).
Dim oLVItem As MSComctlLib.ListItem

' The (Listview.Width - 350) / 3 simply adjusts the column
' widths to 1/3 the width of the Listview (subtracting the
' width of the scrollbar)
' ListView.ColumnHeaders.Add , , "Supplier", (ListView.Width - 350) / 3 '<- Don't need to work?
ListView.ColumnHeaders.Add , , "OEM", (ListView.Width - 350) / 3
ListView.ColumnHeaders.Add , , "Manufacturer", (ListView.Width - 350) / 3

        
        
        Picture1.Cls
        Picture1.FontSize = 8
        Picture1.Font.Bold = True
        Picture1.Print ">> Supplier Information"
        Picture1.Font.Bold = False
        Picture1.Print "OEM:"; Tab(20); "Manufacturer:"

    rs.Open strSQL, oConnection, adOpenStatic, adLockOptimistic, adCmdText
     
'loop through the recordset
    Do Until rs.EOF
        M19 = rs("OEM") 'Are m19 and m20 properties or local variables? didn't want to take them out, but if they are global settings and there are more records, they will only 'remember' the values in the last record.(No they are strings in a database)
        M20 = rs("MFG")
     
        Picture1.Print M19; Tab(20); M20
        rs.MoveNext
    Loop
     
    rs.Close 'Close the recordset never leave it open!
    Set rs = Nothing 'clear the rs variable

End Sub
  OK NOW how do i replace the Picture1 to ListView in Report view after reading MSDN click here CAN anyone save me? the ColumnHeaders don't display too?





Edited by - Hopeless on 6/4/2004 12:16:16 AM

ListView Control. How Do You Extractupdate Values In Report View
I have populated my ListView control with my values using DAO. I have 10 columns set up in report view. In my code fragment below, I am looking through my listview control searching for rows that the user has selected. Now I need to be able to extract some of the sub values and update others. How do I do this? Here is my code so far.

Private Sub SelectedCountCommand_Click()
Dim i As Integer

For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems(i).Selected = True Then
'extract values from col 3 and 4 and subtract them

'update column 5 based on the results of col 3 minus col 4

End If
Next

End Sub

Help: How To View Selected Items From Listview With Crystal Report Viewer
Hi

I have a Listview with check boxes from it want to view selected items with crystal report viewer.

Private Sub cmdView_Click()
Dim lCustomerId as Long
    Dim tmpItm As ListItem
    For Each tmpItm In lstItems.ListItems
        If tmpItm.Checked = True Then
            lCustomerId = Val(Replace(tmpItm.Key, "C", ""))
          End If
    Next

  End Sub

Plz. help

regards

ListView Right To Left (RTL)
Can anybody tell me how to set my VB6 ListView control's direction to RTL, i.e. columns are added from right to left, etc. for middle east languages (there must be a way since Windows Hebrew displays all controls RTL including TreeView and ListView, in Windows Explorer).

Benny

Right To Left In ListView
can i force the listView to be right to left, i mean the icons will be right to the text

Right To Left ListView
i'm using this code to make listView RightToLeft
that's works great but... i cant use drag and drop from this window to another one.. what is the reason


Code:ReturnStyle = GetWindowLong(ListView1.hwnd, GWL_EXSTYLE)
SetWindowLong ListView1.hwnd, GWL_EXSTYLE, ReturnStyle Or WS_EX_LAYOUTRTLGetClientRect ListView1.hwnd, rClientRect
   
InvalidateRect ListView1.hwnd, rClientRect, True
Header_hWnd = GetWindow(ListView1.hwnd, GW_CHILD)
ReturnStyle = GetWindowLong(Header_hWnd, GWL_EXSTYLE)
' RightToLeft-
SetWindowLong Header_hWnd, GWL_EXSTYLE, ReturnStyle Or WS_EX_LAYOUTRTL GetClientRect Header_hWnd, rClientRect
InvalidateRect Header_hWnd, rClientRect, True

Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type




Edited by - Steven Sartain on 12/5/2001 4:39:46 AM

In Crystal Report, Report Is Viewed But Doesnot View Next Page Or Not Any Message Display!
in crystal report, report is viewed but doesn't view next page or not any message display! and surprisingly page no is increased infinitely (up to no limit!, I have checked up to 400+) but next page was not displayed! if I print report , only 1st page is print!

In this report , I have attached 6 subreports!

I hope anybody reply about my problem

Top And Left Of Listview Subitem
hi,
how to get the top and left of the subitem of my current selection.
pls. help me.

thanks...
popskie

Left/Right Click In ListView
How can i dertermind if the user has clicked the left or right button on a listView control. Basically if the user right clicks they get a pop up menu, but there is some code that i only want to be run if the left mouse is clicked. Currently it displays my popup menu and runs my code if the right mouse is clicked. Hope that hasnt confused you all too much! Any help greatly appriciated

Malb

Top And Left Of Listview Subitem
hi,
how to get the top and left of the subitem of my current selection.
pls. help me.

thanks...
popskie

Listview: Icon On The Left Or On The Right...
I want to mimic Outlooks mailclient uses icons in the columnheader when you click on them to sort.

How do I go about placing the icon on the right side of the text. I've tried the different alignment options given, but that only seem to affect the placement of the text leaving the icon stuck to the left.

TIA

//Patrik

How To Lock Left And Right Edges In Listview?
I have 4 columns in a listview. When I resize the rightmost column an empty 5th column appears on the right edge. How can I prevent this? I want to lock the right edge of the 4th column.

ListView With Strange Left Margin
I'm developing an application in vb6. The main window contains a ListView. Sometimes, when I fill the ListView with data and the list view is in Icon mode, the items in the list view are painted leaving a strange white margin at the left, like a invisible listview horizontal scrollbar had been scrolled to the right.

If I look at the Left property of the forts listview item it has the same value (315) that has a correctly positioned item. It looks like the entire view area of the list view has been moved to the right.

Any ideas?

How Can I Change The Align Of ListView To Right To Left?
Hello all, How are you???

I'm from Israel, & the software I'm developing is for showing Database values in LinkView items & subitems...
the Database contain values wrotten on the hebrew language ( Right to left direction )...
How can I change all of the text's & culmns order to be from right to left??

Thanks in advance, yours Yoni D.

Listview - VerticalScrollBar Changes Col .Left Property
Hi VBcitizens,

I'm working with the .Left property of Columnheaders in a Listview,
I have a big amount of Columns wich enables the vertical scrollbar in it,

If I V-scroll further to the right columns then it seems the .Left property of the columns changes,
it threaths the .Left property starting from the left border of the "Listview window" itself,
not from the 1st column anymore, only the visible columns on the screen.

Is there a way how to get the 'absolute' .Left position starting from the 1st column?

This what i got so far wich worked smooth... until i had a V-scrollbar in the Listview and scrolled to the right.

Code:
Private Sub ListView1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Not ListView1.ListItems.Count = 0 Then

    Dim sCol As String
    Dim PosX As Single
        PosX = x

    Dim i As Integer
    For i = 1 To ListView1.ColumnHeaders.Count
        If PosX > ListView1.ColumnHeaders.Item(i).Left And _
           PosX < ListView1.ColumnHeaders.Item(i + 1).Left Then
           sCol = i
           Exit For
        End If
    Next i
    
    Dim NewVal As String
    NewVal = InputBox("Insert New Value :")
    
    If Not NewVal = "" Then
       If sCol = 1 Then
          ListView1.SelectedItem.Text = NewVal
       Else
          ListView1.SelectedItem.SubItems(sCol - 1) = NewVal
       End If
    End If
    
End If
End Sub


=============================================
aka Red2048.

Edited by - T48 - [RedPlanet] on 8/1/2004 11:43:25 AM

Left And Right Button Clicks On A ListView
I have a listview which I want a certain function to be triggered on a right mouse click and a different function to be triggered on a left mouse click. I can get either the left mouse control to work or the right mouse click control but can't get them both to work!!

Any ideas?

How Can I Freeze Left Column(s) In ListView When Scrolling To The Right
How can I "freeze" one or two columns on the left side of a List View so they are always visible when I scroll to the right more fields than fit the window? (like in Excel - Freeze Windows)

_________________________________________________________________

Edited by - vbprog1144 on 4/13/2005 8:16:56 AM

Can Not Make It Left Allignment When Use ListView In LvwIcon Mode
I Can not make the Icons left allignment when I use ListView in lvwIcon mode to
show some elements. It always give one big gap between the left side of listview
control and the first icon column. If you have any idea about this, please let me know. Thanks.

Listview && Tree View
I have a Tree view and a List view. I have designed something like Windows Explorer. What i want to do is to be able to resize them by using Mouse inbetween the Treeview & Listview.

Please advise.

Can Anyone Help Me? ListView To View The Database
CAn anyone help me? can i used the listview to view a database?

View Thumbnails In Listview ?
Can you view the thumbnails of a Dir picture contents in a listview control or any other control for that matter ?

&lt;?&gt; Listview Icon View
Code:
'question:
'I load my listview and I use 2 different icons
'one for odd numbers, one for even. No Problem
'
I can then view my listview by LargeIcon,SmallIcon,List,Report
No Problem
However, when viewing largeicon I only get one icon
All the rest show me the 2 different icons.

There obviously is a reason...someone what to impart
that bit of knowledge on me.

'load an array with information
Dim myArr(99)
Dim i As Integer
For i = 1 To 99
myArr(i) = CInt(Rnd * 99)
Next i

'then load the array into a listview

Dim x As Variant 'differ between odd and even rows

For i = 1 To 99
'used different images every second line
'image one for odd, image2 for even
x = i / 2
If x Like "*.*" Then
Set sItem = Listview1.ListItems.Add(, , myArr(i), 1, 1)
Else
Set sItem = Listview1.ListItems.Add(, , myArr(i), 1, 2)
End If
'add subitems
sItem.SubItems(1) = "905-444-9455"
sItem.SubItems(2) = "who knows"
Next i

Listview: View An Item On The Top
Hi vbFriends !!!

I have a ListView control (Report mode) and it has a lot of items.

When I search for an item and use EnsureVisible method, it usually happens that the item is shown as the last item in the listview's area.

I would like the item to be shown on the top of the listview's area, so that is much more comfortable for the user to see it.

Any hint that could help me?

Thank you in advance !!!

P.S.: here's an example:

My ListView:
-------------------------------
| 1 |
| 2 |
| 3 |
| 4 |
|found item shown here|
-------------------------------

But:
-------------------------------
| I want it here ! |
| 6 |
| 7 |
| 8 |
| 9 |
-------------------------------

Listview Columns In List View
I am trying to use Listview to import data from an Access table and I only want to use the list view not the list report. The data imports OK and populates the list OK into (in this case with the quantity of data imported) 4 columns.

Trouble is, all the data is truncated and I can find no way of setting the column widths as you can in the normal list box. I do not have any sub-items, just a single list so I do not need to set up any column headers.

Listview Problems With Arrange And View
Hi

I have couple of issues with my listview control.

a) when I set arrange=lvwautoleft, I expect the coloumn headers to appear vertically on the left hand side. That does not happen.

b) When I set view = lvwicon, lvwsmallicon, or lvwlist, I see nothing in the listview control, only the lvwreport works (I see the image and the text in the colomn header). I have set up the image icon and all the setting etc.

regards

Yamin

It Is Possible To View Image In The Listview Items?
I have microsoft accesss store image path location in record.I would like to know, it is possible to view image in the listview items from database?for example ".jpg" image file format.

Listview(view=lvwreport) Set Colour
In a Listview Report, how can I set colour on a selected ROWs based on inputed data.

e.g. if "Year = 2001" is red colour OR if "Year = 2003" is blue colour.

Thank you in advance

View Thumnail Images In A Listview
Hi All,
I have an image control on a form that shows images to a listview (with checkboxes) I want to be able to check certain ones and display the checked thumbnails only. What is the best way to start? would it be better to have a second image control and a second listview or is there a easier way to do it?
Thanks

2 Questions In ListView (View=3-lvwReport)
Hello every one...
I'm trying to use the ListView control to make something like an Adress Book in my program..So i make 4 columns and i made another form with 4 text boxes to add info to the Adress Book (See the Picture in the Attachement).
- My first question is how can i add info to these 4 columns.
- My second question is how to save info in them (I mean does the Savesettings and Getsettings works with ListView?).

Listview Doubleclick To View Details HELP!!!
I have looked and fumbled for 2 weeks and am admitting total defeat!

I have a database that tracks fleet vehicles.
Access 2k mdb
tblVeh fields:
VehNum
Year
Make
Model
etc1
etc2 (and so on)

I'd like to have a ListView box that shows all the vehicles sorted by VehNum
(which is a owner assigned number). When the user double clicks (or click,
I'm not picky), it would fill in the rest of that record in other fields on
the same (or different) form.

I have gotten the form to come up but can not get it to work otherwise. I'm
ready to trash the existing code (20 lines or so total - so no big loss) and
start fresh with any ideas that you might have.

I'm using ADO code vs the data tool (although I'm not sure why, I was lead
to believe that coe was better than the tools).

I'm looking forward to your assistance and am *very* greatful for any help
that you might provide.

Chris

View Report
hi!!!
Is there any other way to view data from Access DB and put it in the cells in a multiline mode to see the entire content
without using text controls? I tried using MSCOMCONTROL(Listview) and MSHFLEXGRID and had not come up with the right answer. THanks.......

Cannot View Report
The error is shown for the blue line there when I debug,mentioning 424:Object Required.But,the fieldname is correct.The green line there,there is error for .Orientation.This error quite weird.Sometimes,it can display,but sometimes show the .Orientation error again.Please help me,all expert



VB Code:
Private Sub cmdView_Click()Private Sub cmdView_Click()On Error GoTo exithandler If optProgram.Value = True Then         cmbVendor.Text = Empty        cmbEquip.Text = Empty        cmbStatus.Text = Empty                If Trim(cmbProgram) = Empty Then            Call MsgBox("Please select the Program from the list", vbInformation, "Program Required")            cmbProgram.SetFocus            Exit Sub        End If                On Error Resume Next        Unload rptEnvironment        If cmbProgram.Text = "All" Then            Call rptEnvironment.MainReport'           MainRpt.Orientation = rptOrientPortrait            MainRpt.Show        Else            Call rptEnvironment.ProgramReport(cmbProgram)'            ProgramRpt.Orientation = rptOrientPortrait            ProgramRpt.Show        End IfElseIf optVendor.Value = True Then         cmbProgram.Text = Empty        cmbEquip.Text = Empty        cmbStatus.Text = Empty                If Trim(cmbVendor) = Empty Then            Call MsgBox("Please select the Vendor Name from the list", vbInformation, "Vendor Name Required")            cmbVendor.SetFocus            Exit Sub        End If                [color=Blue]Call rptEnvironment.VendorReport(cmbVendor)[/color]        VendorRpt.Orientation = rptOrientPortrait               VendorRpt.ShowElseIf ....                End If

Flicker While Populating Tree View And ListView
Hi,

In a project that I am currently working on in VB6, I have a treeview (showing folders) and a listview (in report view mode).

I have defined database operations (Add/Update/Delete, etc) in an Activex DLL which raises events on success or failure on any of the operations.

I have about 7 rows in my folder table and 800+ rows in my details table (40+ fields mainly varchars and 2 blobs columns).

I am populating the Treeview with the data in the Folder Table and the Listview with the data from the Contact Table. After populating the folder tree and listview in the Form_Load event, when I show the form using Form.Show there is a noticeable flicker in the treeview and the listview, before the form is shown. This is very annoying I want the form to appear with the data loaded in the tree view and list view.

I have tried LockWindowUpdate and SendMessage (WM_SETREDRAW) API calls to no avail.

Any suggestions on how I can achieve this?

Listview ListItem ToolTips - Icon View
I am attempting to use the Tooltip Property of a ListItem in a Listview but I notice that the property only works in Report mode. Are there any workarounds to make the tooltip work in Icon Mode?


VB Code:
Private Sub Form_Load()Dim LVI As MSComctlLib.ListItem     With ListView1        .Icons = ImageList1        .View = lvwIcon                With .ListItems            Set LVI = .Add(, "_" & 1, "Text 1", "LargeIcon")            LVI.ToolTipText = "This is a Tooltip"        End With    End WithEnd Sub

Copyright © 2005-08 www.BigResource.com, All rights reserved