473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can u help me resolve any of the issues in the code

Following is the source code

Expand|Select|Wrap|Line Numbers
  1. Private Sub ListImos()
  2.     On Error GoTo ErrorHandler
  3.  
  4.     Dim lCount              As Long
  5.     Dim sPict               As String
  6.     Dim objMouse            As New CMouse
  7.     Dim lvwItem             As ListItem
  8.  
  9.     objMouse.SetHourglass
  10.  
  11.     If m_objBookedUnit Is Nothing Then Set m_objBookedUnit = New CBookedUnit
  12.  
  13.     With lvwIMO
  14.         .ListItems.Clear
  15.         .Icons = objApp.ClassPictures(lPictureSize:=FW_BOICONVIEW_LARGE)
  16.         .SmallIcons = objApp.ClassPictures(lPictureSize:=FW_BOICONVIEW_SMALL)
  17.         .View = lvwReport
  18.  
  19.         For lCount = 1 To m_objBookedUnit.IMOs.Count
  20.  
  21.             If m_objBookedUnit.IMOs.Item(lCount).sUpdateState = FW_BOSTATE_LOADED Or _
  22.             m_objBookedUnit.IMOs.Item(lCount).sUpdateState = FW_BOSTATE_NEW Then
  23.  
  24.                 If m_objBookedUnit.IMOs.Item(lCount).sUpdateState = FW_BOSTATE_LOADED Then
  25.                     sPict = "IMO"
  26.                 ElseIf m_objBookedUnit.IMOs.Item(lCount).sUpdateState = FW_BOSTATE_NEW Or _
  27.                 m_objBookedUnit.IMOs.Item(lCount).sUpdateState = FW_BOSTATE_EMPTY Then
  28.                     sPict = "NEWIMO"
  29.                 End If
  30.  
  31.  
  32.                 Set lvwItem = .ListItems.Add _
  33.                    (, , m_objBookedUnit.IMOs.Item(lCount).sTechnicalName)
  34.  
  35.                 With lvwItem
  36.  
  37.                     .Icon = sPict
  38.                     .SmallIcon = sPict
  39.                     .Tag = lCount
  40.                     .SubItems(1) = m_objBookedUnit.IMOs.Item(lCount).dNetWeight
  41.                     .SubItems(2) = m_objBookedUnit.IMOs.Item(lCount).sIMOClass
  42.  
  43.                 End With
  44.  
  45.             End If
  46.  
  47.         Next lCount
  48.  
  49.     End With
  50.  
  51.     Set CurrentItem = Nothing
  52.     Set m_OldItem = Nothing
  53.  
  54.     Exit Sub
  55. ErrorHandler:
  56.     objApp.objAppError.BackTraceError TypeName(Me), "ListIMOs"
  57.     Err.Raise Err
  58. End Sub



Its Green code is




Expand|Select|Wrap|Line Numbers
  1. Private Sub listImos()
  2.         Try 
  3.  
  4.             Dim spict As String = ""
  5.             Dim objmouse As New CMouse
  6.             Dim lvwitem As ListViewItem
  7.  
  8.             objmouse.SetHourglass()
  9.  
  10.             If m_objBookedUnit Is Nothing Then m_objBookedUnit = New PhxBL.CBookedUnit()
  11.  
  12.             With LvwIMO
  13.                 .Items.Clear()
  14.                 'UPGRADE_WARNING: (1037) Couldn't resolve default property of object LvwIMO.Icons. More Information: http://www.vbtonet.com/ewis/ewi1037.aspx
  15.                 .LargeImageList = ObjApp.ClassPictures(FW_BOICONVIEW_LARGE)
  16.                 'UPGRADE_WARNING: (1037) Couldn't resolve default property of object LvwIMO.SmallIcons. More Information: http://www.vbtonet.com/ewis/ewi1037.aspx
  17.                 .SmallImageList = ObjApp.ClassPictures(FW_BOICONVIEW_SMALL)
  18.                 .View = View.Details
  19.  
  20.                 For lCount As Integer = 1 To m_objBookedUnit.IMOs.Count()
  21.  
  22.                     If m_objBookedUnit.IMOs.Item(lcount).SUpdateState = FW_BOSTATE_LOADED Or m_objBookedUnit.IMOs.Item(lcount).SUpdateState = FW_BOSTATE_NEW Then
  23.  
  24.                         If m_objBookedUnit.IMOs.Item(lcount).SUpdateState = FW_BOSTATE_LOADED Then
  25.                             spict = "IMO"
  26.                         ElseIf m_objBookedUnit.IMOs.Item(lcount).SUpdateState = FW_BOSTATE_NEW Or m_objBookedUnit.IMOs.Item(lcount).SUpdateState = FW_BOSTATE_EMPTY Then 
  27.                             spict = "NEWIMO"
  28.                         End If
  29.  
  30.  
  31.                         lvwitem = .Items.Add(m_objBookedUnit.IMOs.Item(lcount).STechnicalName)
  32.  
  33.                         With lvwitem
  34.  
  35.                             'UPGRADE_ISSUE: (2064) MSComctlLib.ListItem property lvwItem.Icon was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
  36.                             UpgradeStubs.MSComctlLib_IListItem.setIcon(lvwitem, spict)
  37.                             'UPGRADE_ISSUE: (2064) MSComctlLib.ListItem property lvwItem.SmallIcon was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
  38.                             UpgradeStubs.MSComctlLib_IListItem.setSmallIcon(lvwitem, spict)
  39.                             'UPGRADE_WARNING: (1037) Couldn't resolve default property of object lvwItem.Tag. More Information: http://www.vbtonet.com/ewis/ewi1037.aspx
  40.                             .Tag = CStr(lcount)
  41.                             ListViewHelper.GetListViewSubItem(lvwitem, 1).Text = CStr(m_objBookedUnit.IMOs.Item(lcount).DNetWeight)
  42.                             ListViewHelper.GetListViewSubItem(lvwitem, 2).Text = m_objBookedUnit.IMOs.Item(lcount).SIMOClass
  43.  
  44.                         End With
  45.  
  46.                     End If
  47.  
  48.                 Next lcount
  49.  
  50.             End With
  51.  
  52.             CurrentItem = Nothing
  53.             m_OldItem = Nothing
  54.  
  55.         Catch 
  56.  
  57.             ObjApp.ObjAppError.BackTraceError(Me.GetType().Name, "ListIMOs")
  58.             Throw New System.Exception(Information.Err().Number.ToString())
  59.         End Try
  60.  
  61.     End Sub
Sep 8 '09 #1
1 1799
tlhintoq
3,525 Expert 2GB
You have asked no questions... Described no problems... provided no exceptions or errors.

What is your question or problem?
Sep 8 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

188
by: Ilias Lazaridis | last post by:
I'm a newcomer to python: - E01: The Java Failure - May Python Helps? http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553 - I've download (as suggested) the python...
2
by: asanford | last post by:
We use StackWalk(StackWalk64) from dbghelp.dll to walk our callstacksas needed, using the various Sym* methods (SymGetSymFromAddr, SymGetLineFromAddr) to resolve source file, function name, and...
16
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a...
1
by: Hennesey | last post by:
Hello all, I am developing a Visual Studio .Net 2005 application that consumes an Axis 1.3 web service. Importing the WSDL file generates an error "cannot resolve apachesoap:Map type" ...
6
by: Chris Johnson | last post by:
Greetings all. I am really stuck on this one as I can't seem to grok if I am abusing the C++ language or if I am simply using components of the C++ Standard Library incorrectly. Here is the code:...
1
by: ivanet | last post by:
Hello everyone, I am trying to use the following Schema but I get the error "src- resolve: Cannot resolve the name 'ValuesList' to a(n) 'element declaration' component." at line 144. I have...
5
by: carlpayne1984 | last post by:
Hi all, I'm fairly new to XML, however already I have studied myself stupid without being able to solve this problem. Basically, I have an XML file/Schema about a CD catalog that I've created that...
4
by: =?Utf-8?B?SnVhbiBEZW50?= | last post by:
Hi, I am getting the following in a VC++ EXE (using VS2005) that links several C++ DLLs and uses MFC and ATL, when I try to start it under the debugger: ------- 'Exactus.UX.Studio.v1.exe':...
5
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I am trying to get the DNS name of an arbitrary IP address on the network. If I use GetHostEntry as the documentation suggests I only get the name of the machine I am running the code on. All...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.