none
adding image to listview and how to group items

    Question

  • Hi

    Have the following code "part of it below" to add results to a listview

    But how I can I add images to the listview? can I add an image in any column, or does it have to be the first column?

    So for each item I will want an image/icon next to it - and in some case perhaps another image in a later column

    Finally if I have multiple items and add groups - how do I tell it to add it to a certain group? and can the group heading have an image?

    Sorry excuse all the questions - have tried googled but just overwhelmed with information

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    
            ' get processor type
            Dim cpu_query As String = "SELECT * FROM Win32_Processor"
            Dim cpu_searcher As New ManagementObjectSearcher(cpu_query)
            Dim cpu_result As String = ""
            For Each info As ManagementObject In cpu_searcher.Get()
                cpu_result = info.Properties("Name").Value.ToString()
            Next info
    
            ' Create columns and set width
            ListView1.Columns.Add("Name", 100)
            ListView1.Columns.Add("Description", 270)
            ListView1.Columns.Add("Type", 150)
    
            ' Create array to hold contents for listview
            Dim array(3) As String
            Dim RPlist As ListViewItem
    
            'Add items to list view using array
            array(0) = ("Processor:")
            array(1) = (cpu_result)
            array(2) = ("")
            RPlist = New ListViewItem(array)
            ListView1.Items.Add(RPlist)
    
    
        End Sub


    Darren Rose

    Sunday, January 26, 2014 8:36 PM

Answers

All replies

  • Darren,

    You'll need to create a new ImageList, then make the assignments (have a look at the full documentation for a ListView which will explain it).

    You might also want to have a look at Deborah's reply in this thread.

    As for grouping and such - and really good control over all these things - I can suggest a good (but not cheap) third-party control to use if you're interested?


    Please call me Frank :)

    Sunday, January 26, 2014 9:15 PM
  • Thanks - will have a read

    Yes if you could suggest a good third-party control then I would like to have a look at it


    Darren Rose

    Sunday, January 26, 2014 9:35 PM
  • Yes if you could suggest a good third-party control then I would like to have a look at it

    These are the controls that I use and everything they make is top-notch. With regard to what you want to do with Grouping and adding icons/images and such, they have it worked out well as shown with this particular control.

    You'd think I made money they way I promote them here but I don't - I just really think they're fantastic with support second to none. :)


    Please call me Frank :)


    Sunday, January 26, 2014 9:40 PM
  • That's handy - as I was actually looking at them for some other controls I needed (gauges and state indicators) - so good to hear them recommended!!

    Did see that control - but assumed it would only work if linked to a "data source" - hopefully I am wrong and I can just add values manually to it like I would a listview item?

    Thanks


    Darren Rose

    Sunday, January 26, 2014 9:48 PM
  • That's handy - as I was actually looking at them for some other controls I needed (gauges and state indicators) - so good to hear them recommended!!

    Did see that control - but assumed it would only work if linked to a "data source" - hopefully I am wrong and I can just add values manually to it like I would a listview item?

    Thanks


    Darren Rose

    It will only support a datasource but don't think twice about that part; I can show you how to do that and no - no actual database needed.

    Think about it a DataSource is really just a well-defined set of objects which follow certain "rules" (interfaces to be exact). Heck we can do that even without a 'real' database behind it. At the most simplistic level though you can create an in-memory datatable but if you create a class (I'll lead you through all that) then use ... ok, I'll explain more if/when we get there. ;-)

    It's not hard though. Don't let that part cause you to falter at all.


    Please call me Frank :)

    Sunday, January 26, 2014 9:53 PM
  • That's handy - as I was actually looking at them for some other controls I needed (gauges and state indicators) - so good to hear them recommended!!

    Did see that control - but assumed it would only work if linked to a "data source" - hopefully I am wrong and I can just add values manually to it like I would a listview item?

    Thanks


    Darren Rose

    Better yet: Let me prove to you what I meant about their support being second to none.

    Use their support system and tell them that you're considering purchasing their product (I'd suggest the suite, and I re-up every year -- yea I really think that much of them!), and "this is what I'm trying to accomplish..."

    Ask them how you could use their controls to do that - let them answer it.

    :)


    Please call me Frank :)

    Sunday, January 26, 2014 9:56 PM
  • Excellent - thank you so much

    Well I have the 30 day trial of them controls installed so can certainly have a go

    I have lots of information like the cpu info in code above I want to add to the grid(list)

    I want it in groups i.e. hardware / software etc - and would like to be able to use an image in the group heading

    and then the information that I have obtained in my code such as cpu info (and lots more) to be added to the required group

    I already have all the code that gets me the information I need and currently it just shows in textboxes, so how do I modify this to "store" the information in a format I could use with that control?


    Darren Rose

    Sunday, January 26, 2014 9:58 PM
  • Having enough trouble explaining to you exactly what I am doing - so not sure where to start with asking them directly - not until I get a better understanding myself!!!

    Darren Rose

    Sunday, January 26, 2014 9:59 PM
  • on a separate note:

    I had also been looking at them controls for the reporting tools (and printing/data export) - thinking it might solve my question you had replied to here:-

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/e294010e-2642-4797-8505-5cdd3690858c/creating-a-report-based-on-information-obtained-in-my-app?forum=vbgeneral

    Thought perhaps I could achieve what I wanted above - which would justify the purchase cost a bit more!


    Darren Rose


    • Edited by wingers Sunday, January 26, 2014 10:07 PM
    Sunday, January 26, 2014 10:03 PM
  • Having enough trouble explaining to you exactly what I am doing - so not sure where to start with asking them directly - not until I get a better understanding myself!!!

    Darren Rose

    I would build a class that does ALL of it - you can use the stuff you currently have and just relocate it to your class, but I'm sure you don't want to expose all of your hard work here. I understand.

    If you just want the class to be used "so you can display the information", then it's a much easier set up - but the contructor will be chock full of parameters (which is what it will use the set it up so that the properties can then return the values).

    I'll go further into this if you want, but paramount is the class. We'll then use a specialized collection which intrinsically uses what's needed: The IBindable Interface, but first things first ... tell me how you want to set this class up.

    Secondly though, I obviously need to know what's going to be in it. ;-)


    Please call me Frank :)

    Sunday, January 26, 2014 10:06 PM
  • on a separate note:

    I had also been looking at them controls for the reporting tools (and printing/data export) - thinking it might solve my question you had replied to here:-

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/e294010e-2642-4797-8505-5cdd3690858c/creating-a-report-based-on-information-obtained-in-my-app?forum=vbgeneral

    Thought perhaps I could achieve what I wanted above - which would justify the purchase cost a bit more!


    Darren Rose


    Oh it absolutely will (once we have things set up for it, starting with the class.)

    In fact, a simple call to a dialog will show the report (once you lay it out) and then the user can click one button which they've put in there to export it to a PDF file. They have other options too like exporting to Excel, and others, but the PDF seems to be the most popular.


    Please call me Frank :)

    Sunday, January 26, 2014 10:09 PM
  • So for each item I will want an image/icon next to it - and in some case perhaps another image in a later column

    You can include a small icon as the first item in a listview row in details view by creating an image list that includes the icons you want to display, and then setting the listview item image index property to the index of the icon in the image list (or setting the image key property to the key of the image in the image list)

        Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            ListView1.View = View.Details
            ListView1.SmallImageList = ImageList1
    
            '''
    
            RPlist = New ListViewItem(array)
            RPlist.ImageIndex = 1 'the image number for this item
            ListView1.Items.Add(RPlist)
            
        End Sub


    • Edited by Acamar Sunday, January 26, 2014 10:11 PM sp
    Sunday, January 26, 2014 10:10 PM
  • on a separate note:

    I had also been looking at them controls for the reporting tools (and printing/data export) - thinking it might solve my question you had replied to here:-

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/e294010e-2642-4797-8505-5cdd3690858c/creating-a-report-based-on-information-obtained-in-my-app?forum=vbgeneral

    Thought perhaps I could achieve what I wanted above - which would justify the purchase cost a bit more!


    Darren Rose


    Oh it absolutely will (once we have things set up for it, starting with the class.)

    In fact, a simple call to a dialog will show the report (once you lay it out) and then the user can click one button which they've put in there to export it to a PDF file. They have other options too like exporting to Excel, and others, but the PDF seems to be the most popular.


    Please call me Frank :)


    fantastic that is good to know - certainly making me think about the purchase now!

    Darren Rose

    Sunday, January 26, 2014 10:11 PM
  • Having enough trouble explaining to you exactly what I am doing - so not sure where to start with asking them directly - not until I get a better understanding myself!!!


    Darren Rose

    I would build a class that does ALL of it - you can use the stuff you currently have and just relocate it to your class, but I'm sure you don't want to expose all of your hard work here. I understand.

    If you just want the class to be used "so you can display the information", then it's a much easier set up - but the contructor will be chock full of parameters (which is what it will use the set it up so that the properties can then return the values).

    I'll go further into this if you want, but paramount is the class. We'll then use a specialized collection which intrinsically uses what's needed: The IBindable Interface, but first things first ... tell me how you want to set this class up.

    Secondly though, I obviously need to know what's going to be in it. ;-)


    Please call me Frank :)

    Okay that makes sense - had thought about putting all the code which does the job of getting my results in a separate class anyway

    Basically I have lots of sections such as the cpu bit above that currently just writes to a text box with the result, so I would have dozens of chunks like this to put in a class

    Never done a class before so not sure how would be best to set it up? perhaps so it contains all my code that finds the results (i.e. like the cpu bit) and then returns the values/results to main app to add to grid - or is that not the best idea?

    Quite a bit of code in my section that gets the info so not sure if too much to post here - perhaps a better way we could communicate?


    Darren Rose

    Sunday, January 26, 2014 10:16 PM
  • That's handy - as I was actually looking at them for some other controls I needed (gauges and state indicators) - so good to hear them recommended!!

    Did see that control - but assumed it would only work if linked to a "data source" - hopefully I am wrong and I can just add values manually to it like I would a listview item?

    Thanks


    Darren Rose

    Have a look at a "getting started" video about their grid control here.

    Fair warning here: Amanda always makes it look so damned easy  but then again, that's her job. ;-)


    Please call me Frank :)


    Sunday, January 26, 2014 10:22 PM
  • Okay that makes sense - had thought about putting all the code which does the job of getting my results in a separate class anyway

    Basically I have lots of sections such as the cpu bit above that currently just writes to a text box with the result, so I would have dozens of chunks like this to put in a class

    Never done a class before so not sure how would be best to set it up? perhaps so it contains all my code that finds the results (i.e. like the cpu bit) and then returns the values/results to main app to add to grid - or is that not the best idea?

    Quite a bit of code in my section that gets the info so not sure if too much to post here - perhaps a better way we could communicate?


    Darren Rose

    Let's start at the top, then see where it goes.

    Can you give me the elevator speech about just what information it retrieves?


    Please call me Frank :)

    Sunday, January 26, 2014 10:24 PM
  • on a separate note:

    I had also been looking at them controls for the reporting tools (and printing/data export) - thinking it might solve my question you had replied to here:-

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/e294010e-2642-4797-8505-5cdd3690858c/creating-a-report-based-on-information-obtained-in-my-app?forum=vbgeneral

    Thought perhaps I could achieve what I wanted above - which would justify the purchase cost a bit more!


    Darren Rose


    Oh, also this: We talked the other night about using HTML for the output. That's one of the export options built in.

    Additionally is an RTF file and everyone should be able to open those.

    I didn't suggest it because I don't know the raw RTF specification -- but they do. ;-) That's really the best all around "yes they can open it" option in my opinion. No web browser needed.


    Please call me Frank :)

    Sunday, January 26, 2014 10:27 PM
  • on a separate note:

    I had also been looking at them controls for the reporting tools (and printing/data export) - thinking it might solve my question you had replied to here:-

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/e294010e-2642-4797-8505-5cdd3690858c/creating-a-report-based-on-information-obtained-in-my-app?forum=vbgeneral

    Thought perhaps I could achieve what I wanted above - which would justify the purchase cost a bit more!


    Darren Rose


    I had to hunt for this one (they have bunches of video tutorials).

    This one shows a simple report set up which uses grouping and sorting. Hopefully I didn't screw up the link this time. ;-)


    Please call me Frank :)

    Sunday, January 26, 2014 11:13 PM
  • Okay that makes sense - had thought about putting all the code which does the job of getting my results in a separate class anyway

    Basically I have lots of sections such as the cpu bit above that currently just writes to a text box with the result, so I would have dozens of chunks like this to put in a class

    Never done a class before so not sure how would be best to set it up? perhaps so it contains all my code that finds the results (i.e. like the cpu bit) and then returns the values/results to main app to add to grid - or is that not the best idea?

    Quite a bit of code in my section that gets the info so not sure if too much to post here - perhaps a better way we could communicate?


    Darren Rose

    Let's start at the top, then see where it goes.

    Can you give me the elevator speech about just what information it retrieves?


    Please call me Frank :)

    lots of information about the system (cpu, ram, network settings), various operating system settings and information such as whether system restore enabled, uac, what virus software installed (whether updated/enabled), mostly bits from WMI, other bits from registry - mostly just string results - sometimes values such as hard disk total/free space - can send you the code or a screenshot of the current output if it helps make sense

    Darren Rose

    Sunday, January 26, 2014 11:19 PM
  • lots of information about the system (cpu, ram, network settings), various operating system settings and information such as whether system restore enabled, uac, what virus software installed (whether updated/enabled), mostly bits from WMI, other bits from registry - mostly just string results - sometimes values such as hard disk total/free space - can send you the code or a screenshot of the current output if it helps make sense

    Yes show me a screenshot please.

    Is all of it being done in a single method or multiple methods or just how?


    Please call me Frank :)

    Sunday, January 26, 2014 11:23 PM
  • Darren,

    I won't be on much longer tonight but I look forward to working with you on this - assuming you want my involvement of course.

    I'll have a look tomorrow.

    :)


    Please call me Frank :)

    Monday, January 27, 2014 12:26 AM
  • at the moment each tab's code is simply in a separate button click event for that tab - just whilst I put it together and worked out how to do each thing

    screenshot attached of the first tab - if I know how to do this, then I can use same method to add bits from rest of tabs (not all of it needed, some tabs were just me learning really)


    Darren Rose


    • Edited by wingers Monday, January 27, 2014 12:41 AM
    Monday, January 27, 2014 12:39 AM
  • Darren,

    I won't be on much longer tonight but I look forward to working with you on this - assuming you want my involvement of course.

    I'll have a look tomorrow.

    :)


    Please call me Frank :)

    That is fine, I am off to bed now anyway

    Yes please I really appreciate your advise and help - it is really helping me learn more - so thank you


    Darren Rose

    Monday, January 27, 2014 12:42 AM
  • Darren,

    I won't be on much longer tonight but I look forward to working with you on this - assuming you want my involvement of course.

    I'll have a look tomorrow.

    :)


    Please call me Frank :)

    That is fine, I am off to bed now anyway

    Yes please I really appreciate your advise and help - it is really helping me learn more - so thank you


    Darren Rose

    Dang - that's a bunch! You've been hard at work on it no doubt.

    I've have another look tomorrow.


    Please call me Frank :)

    Monday, January 27, 2014 12:45 AM
  • That's handy - as I was actually looking at them for some other controls I needed (gauges and state indicators) - so good to hear them recommended!!

    Did see that control - but assumed it would only work if linked to a "data source" - hopefully I am wrong and I can just add values manually to it like I would a listview item?

    Thanks


    Darren Rose

    Have a look at a "getting started" video about their grid control here.

    Fair warning here: Amanda always makes it look so damned easy  but then again, that's her job. ;-)


    Please call me Frank :)



    Just watched this video - very interesting - seems very powerful (and reasonably easy to use) - just need to work out how to store my information correctly so I can use it without having a sql database etc

    Darren Rose

    Monday, January 27, 2014 1:35 PM
  • on a separate note:

    I had also been looking at them controls for the reporting tools (and printing/data export) - thinking it might solve my question you had replied to here:-

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/e294010e-2642-4797-8505-5cdd3690858c/creating-a-report-based-on-information-obtained-in-my-app?forum=vbgeneral

    Thought perhaps I could achieve what I wanted above - which would justify the purchase cost a bit more!


    Darren Rose


    I had to hunt for this one (they have bunches of video tutorials).

    This one shows a simple report set up which uses grouping and sorting. Hopefully I didn't screw up the link this time. ;-)


    Please call me Frank :)


    again - very interesting video - she makes it look so simple ;)

    Darren Rose

    Monday, January 27, 2014 1:41 PM
  • Just watched this video - very interesting - seems very powerful (and reasonably easy to use) - just need to work out how to store my information correctly so I can use it without having a sql database etc

    That's actually not as hard as you might think. From something which I worked just last week:

    That sure looks like there's a database behind it, right? There's no database involved - none.

    In one of those videos (maybe both, I don't remember now), did you notice that she steps through the wizard setting up the database and she says something like "Now choose database..." then she goes on with the setup.

    When we do it here, the only difference will be that step - we'll choose to connect it to an object instead (it's called "Object Binding") and I can step you through all of that.


    Please call me Frank :)

    Monday, January 27, 2014 1:43 PM
  • Darren,

    Do you have a list (or can you make one rather, I'm sure you don't have it off-hand) of the results and the types of those results? That can get me started even if I don't have the code that produces those results.

    Also, I wanted to ask this: In your screenshot I see a button to "Scan Computer". Would I be right that there's a similar button on each tab? So by the that, they can elect to get some portion of the results, but not all? Will you explain how you have that please?

    How long does it take to run these diagnostics?


    Please call me Frank :)

    Monday, January 27, 2014 1:47 PM
  • Just watched this video - very interesting - seems very powerful (and reasonably easy to use) - just need to work out how to store my information correctly so I can use it without having a sql database etc

    That's actually not as hard as you might think. From something which I worked just last week:

    That sure looks like there's a database behind it, right? There's no database involved - none.

    In one of those videos (maybe both, I don't remember now), did you notice that she steps through the wizard setting up the database and she says something like "Now choose database..." then she goes on with the setup.

    When we do it here, the only difference will be that step - we'll choose to connect it to an object instead (it's called "Object Binding") and I can step you through all of that.


    Please call me Frank :)


    okay that makes sense, just had a look and can see that you choose object etc - so just need to get my code in a class somehow, so it then gives me an object to work with I assume?

    Darren Rose

    Monday, January 27, 2014 1:48 PM
  • okay that makes sense, just had a look and can see that you choose object etc - so just need to get my code in a class somehow, so it then gives me an object to work with I assume?

    Well we need to have the instances of the class stored in a BindingList(T) where, in this case, the "T" (the type) will be the class.


    A few weeks back, I put this together which demonstrates the basis of object binding.

    Monday, January 27, 2014 1:51 PM
  • Darren,

    Do you have a list (or can you make one rather, I'm sure you don't have it off-hand) of the results and the types of those results? That can get me started even if I don't have the code that produces those results.

    Also, I wanted to ask this: In your screenshot I see a button to "Scan Computer". Would I be right that there's a similar button on each tab? So by the that, they can elect to get some portion of the results, but not all? Will you explain how you have that please?

    How long does it take to run these diagnostics?


    Please call me Frank :)

    Yes each page has a scan button - this was only really done during test/building of this app whilst I learnt how to do each bit - just to keep it separate until I built the final app - so yes each button only does the "scan" for that tab (and not all of it will be needed in final app anyway, it was just me learning and playing about really, adding things as I found out how to do them for reference in future)

    Concentrating on that main tab for now - the scan only takes a few seconds to run

    Will put a list together now and post it shortly


    Darren Rose

    Monday, January 27, 2014 1:51 PM
  • Darren,

    Do you have a list (or can you make one rather, I'm sure you don't have it off-hand) of the results and the types of those results? That can get me started even if I don't have the code that produces those results.

    Also, I wanted to ask this: In your screenshot I see a button to "Scan Computer". Would I be right that there's a similar button on each tab? So by the that, they can elect to get some portion of the results, but not all? Will you explain how you have that please?

    How long does it take to run these diagnostics?


    Please call me Frank :)

    Attached is another screenshot this time showing the fields populated

    Nearly all of them are just string/text fields

    Apart from:-

    Age of PC - shortdatestring

    reboot on error - returns true or false and then shows Enabled/Disabled depending on the result

    system restore enabled - same as above

    paging file - returns text or numbers depending on how it is setup

    UAC - same as reboot on error

    install date - datetime

    automatic updates - true/false - same as UAC etc

    caps/num - not worried about this

    free/total ram - is string formatted using formatnumber

    chassis type - returns a value and has a case statement to display result

    free disk space - is string formatted using formatnumber


    Darren Rose


    • Edited by wingers Monday, January 27, 2014 2:16 PM because I forgot the picture :)
    Monday, January 27, 2014 2:00 PM
  • Darren,

    Do you have a list (or can you make one rather, I'm sure you don't have it off-hand) of the results and the types of those results? That can get me started even if I don't have the code that produces those results.

    Also, I wanted to ask this: In your screenshot I see a button to "Scan Computer". Would I be right that there's a similar button on each tab? So by the that, they can elect to get some portion of the results, but not all? Will you explain how you have that please?

    How long does it take to run these diagnostics?


    Please call me Frank :)


    happy to supply you the code for it if easier - just prefer to do it via email or something rather than posting it

    Darren Rose

    Monday, January 27, 2014 2:02 PM
  • Attached is another screenshot this time showing the fields populated

    I think you forgot the screenshot. ;-)

    Nearly all of them are just string/text fields

    Apart from:-

    Age of PC - shortdatestring

    reboot on error - returns true or false and then shows Enabled/Disabled depending on the result

    system restore enabled - same as above

    paging file - returns text or numbers depending on how it is setup

    UAC - same as reboot on error

    install date - datetime

    automatic updates - true/false - same as UAC etc

    caps/num - not worried about this

    free/total ram - is string formatted using formatnumber

    chassis type - returns a value and has a case statement to display result

    free disk space - is string formatted using formatnumber

    I need to deal with the real datatypes though - no matter how you have them formatted. I can guess at most (for example, bytes will be type Long), but tell me about this paging file? What is it exactly?


    Please call me Frank :)

    Monday, January 27, 2014 2:06 PM
  • Attached is another screenshot this time showing the fields populated

    whoops - screenshot added :)

    I need to deal with the real datatypes though - no matter how you have them formatted. I can guess at most (for example, bytes will be type Long), but tell me about this paging file? What is it exactly?

    probably easier to post the code for that bit - as not sure, partly true/false then gets two numerical results

    Dim pagingfile_query As String = "SELECT * FROM Win32_ComputerSystem"
            Dim pagingfile_searcher As New ManagementObjectSearcher(pagingfile_query)
            For Each info As ManagementObject In pagingfile_searcher.Get()
                If info.Properties("AutomaticManagedPagefile").Value = True Then
                    tbpagingfile.Text = ("System Managed")
                Else
                    Dim pagingfilesize_searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PageFileSetting")
                    For Each queryObj As ManagementObject In pagingfilesize_searcher.Get()
                        tbpagingfile.Text = ("Custom Size = ") & queryObj("InitialSize") & ("Mb - ") & queryObj("MaximumSize") & ("Mb")
                    Next
                End If
            Next info


    Darren Rose

    Monday, January 27, 2014 2:19 PM
  • Attached is another screenshot this time showing the fields populated

    whoops - screenshot added :)

    I need to deal with the real datatypes though - no matter how you have them formatted. I can guess at most (for example, bytes will be type Long), but tell me about this paging file? What is it exactly?

    probably easier to post the code for that bit - as not sure, partly true/false then gets two numerical results

    Dim pagingfile_query As String = "SELECT * FROM Win32_ComputerSystem"
            Dim pagingfile_searcher As New ManagementObjectSearcher(pagingfile_query)
            For Each info As ManagementObject In pagingfile_searcher.Get()
                If info.Properties("AutomaticManagedPagefile").Value = True Then
                    tbpagingfile.Text = ("System Managed")
                Else
                    Dim pagingfilesize_searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PageFileSetting")
                    For Each queryObj As ManagementObject In pagingfilesize_searcher.Get()
                        tbpagingfile.Text = ("Custom Size = ") & queryObj("InitialSize") & ("Mb - ") & queryObj("MaximumSize") & ("Mb")
                    Next
                End If
            Next info


    Darren Rose

    I think I'll leave it as a string then. ;-)

    *****

    Here's something which I'd like to get you to make a decision on. Even though it only takes a few seconds (but that contradicts what we worked on a few weeks ago with the CPU Usage), if I set it up now to use threading (via a BackgroundWorker) in the class then I can also set up events so that your program can then show "status". Not so much progress as status like Step 1 of 12 or the name of the current process that it's getting, that sort of thing.

    It's a lot more to it and I won't say you can't go back and add it later, but I think you'll end up with more and more at some point in time which would then need the threading aspect.

    Tell me your thoughts.


    Please call me Frank :)

    Monday, January 27, 2014 2:26 PM
  • Here's something which I'd like to get you to make a decision on. Even though it only takes a few seconds (but that contradicts what we worked on a few weeks ago with the CPU Usage), if I set it up now to use threading (via a BackgroundWorker) in the class then I can also set up events so that your program can then show "status". Not so much progress as status like Step 1 of 12 or the name of the current process that it's getting, that sort of thing.

    It's a lot more to it and I won't say you can't go back and add it later, but I think you'll end up with more and more at some point in time which would then need the threading aspect.

    Tell me your thoughts.

    As the main scan doesn't take many seconds to run, I am not sure if that is really needed - although as you say if I add further bits to it later then it could well need it then

    The cpu usage bit is sort of separate at the moment, but yes that does take longer to run, and I was going to change it to show results on gauges etc as a later task - but may well need in report - so good point

    My concern is whether I will understand it, as quite new to VB, so this is all a learning curve.... (although a very enjoyable learning curve)

    But I assume if we do it using background threading then if a scan takes longer then it won't hang the main app - so perhaps that would be a good idea then


    Darren Rose

    Monday, January 27, 2014 2:33 PM
  • As the main scan doesn't take many seconds to run, I am not sure if that is really needed - although as you say if I add further bits to it later then it could well need it then

    The cpu usage bit is sort of separate at the moment, but yes that does take longer to run, and I was going to change it to show results on gauges etc as a later task - but may well need in report - so good point

    My concern is whether I will understand it, as quite new to VB, so this is all a learning curve.... (although a very enjoyable learning curve)

    But I assume if we do it using background threading then if a scan takes longer then it won't hang the main app - so perhaps that would be a good idea then


    Darren Rose

    We can have the best of both here now that I think about it. We'll end up with more than one class anyway so I shouldn't restrict my thinking as I was. At least one more class which does one single thing: It stores any exceptions thrown during any process.

    I'll set it up so that rather than causing the program to stop entirely, if that particular section (that "process") causes an exception to be thrown, it's logged by way of a List(Of the class which I'll have for the exception), but it will keep on going.

    So let's say there are a dozen processes - a dozen "steps" if you will. It performs step one, then step two - and let's say an exception is thrown in that second one. Ok, well it logs that and continues on to step three and so on. That way, it doesn't stop where it is just because one failed.

    In that same way then, later on, will be another class who's sole responsibility is to direct the other class to go perform this or that process. That can be done later and that one will have the BGW with the events and all that.

    I've done that before and while I was waiting, I looked to see if I could show you the code for something I did a few months ago which uses exactly what I'm explaining here. Unfortunately it's over 5200 lines of code -- even the thing I built (using Dev's controls) winced when I tried to get it to turn it into HTML so I could upload it and show you. ;-)

    But my point is that I've done it before with multiple classes and I wasn't thinking but about one class earlier, but it'll end up with several anyway so may as well go that route to start with.

    How's that sound?


    Please call me Frank :)

    Monday, January 27, 2014 2:41 PM
  • We can have the best of both here now that I think about it. We'll end up with more than one class anyway so I shouldn't restrict my thinking as I was. At least one more class which does one single thing: It stores any exceptions thrown during any process.

    I'll set it up so that rather than causing the program to stop entirely, if that particular section (that "process") causes an exception to be thrown, it's logged by way of a List(Of the class which I'll have for the exception), but it will keep on going.

    So let's say there are a dozen processes - a dozen "steps" if you will. It performs step one, then step two - and let's say an exception is thrown in that second one. Ok, well it logs that and continues on to step three and so on. That way, it doesn't stop where it is just because one failed.

    In that same way then, later on, will be another class who's sole responsibility is to direct the other class to go perform this or that process. That can be done later and that one will have the BGW with the events and all that.

    I've done that before and while I was waiting, I looked to see if I could show you the code for something I did a few months ago which uses exactly what I'm explaining here. Unfortunately it's over 5200 lines of code -- even the thing I built (using Dev's controls) winced when I tried to get it to turn it into HTML so I could upload it and show you. ;-)

    But my point is that I've done it before with multiple classes and I wasn't thinking but about one class earlier, but it'll end up with several anyway so may as well go that route to start with.

    How's that sound?

    Yes that sound perfect - I like the idea of a class to handle errors so that it continues running whatever

    and having separate classes for different bits makes sense so I can perhaps reuse them in other projects like that i.e. one classes scans system information and another class for network related bits perhaps

    Shame this forum doesn't allow you to do private messages or add attachments - would make it easier to share the code etc


    Darren Rose

    Monday, January 27, 2014 2:49 PM
  • Yes that sound perfect - I like the idea of a class to handle errors so that it continues running whatever

    and having separate classes for different bits makes sense so I can perhaps reuse them in other projects like that i.e. one classes scans system information and another class for network related bits perhaps

    Shame this forum doesn't allow you to do private messages or add attachments - would make it easier to share the code etc

    I said that I can't show the code of the big program (I could but I'd have to chop it into pieces which would then make it really confusing), but I can show the class diagram here which demonstrates the concept anyway.

    The class called "ImageMetaProperties" is the 'main' class. The class named "GetMyImages" is the one which does the running of everything in a BGW and has events to show progress, then there are two other classes used which are also shown.

    *****

    What do you want to call this thing? I'll start a new project folder and set the classes up, or at least a start on it.

    I do have to explain though that it's Monday morning here (US Central Time, I'm in Nashville, Tennessee), so even though I work from a home-office, it only takes one phone call to force the rest of my day to be focued on whatever that is.


    Please call me Frank :)

    Monday, January 27, 2014 2:56 PM
  • I said that I can't show the code of the big program (I could but I'd have to chop it into pieces which would then make it really confusing), but I can show the class diagram here which demonstrates the concept anyway.

    The class called "ImageMetaProperties" is the 'main' class. The class named "GetMyImages" is the one which does the running of everything in a BGW and has events to show progress, then there are two other classes used which are also shown.

    *****

    What do you want to call this thing? I'll start a new project folder and set the classes up, or at least a start on it.

    I do have to explain though that it's Monday morning here (US Central Time, I'm in Nashville, Tennessee), so even though I work from a home-office, it only takes one phone call to force the rest of my day to be focued on whatever that is.


    Please call me Frank :)

    thanks for that - handy to see an image explaining what you mean - make sense

    PC Health Check Tool is the name I currently have for it

    That's completely understandable, same here I am self-employed so in/out all the time - I really appreciate you finding the time to help me - it really is appreciated


    Darren Rose

    Monday, January 27, 2014 3:05 PM
  • thanks for that - handy to see an image explaining what you mean - make sense

    PC Health Check Tool is the name I currently have for it

    That's completely understandable, same here I am self-employed so in/out all the time - I really appreciate you finding the time to help me - it really is appreciated

    Ok, give me a few hours and I'll be back.

    It won't be "finished" by any stretch of the imagination, but it'll be a start so that I can get your feedback about it.

    :)


    Please call me Frank :)

    Monday, January 27, 2014 3:08 PM
  • Ok, give me a few hours and I'll be back.

    It won't be "finished" by any stretch of the imagination, but it'll be a start so that I can get your feedback about it.

    :)

    That's fine - anything to help me get started will be great - once I get the idea I can then add to it and finish it off

    Darren Rose

    Monday, January 27, 2014 3:10 PM
  • Darren,

    Where I see "Age Of PC", there's a date shown.

    That's not age -- what is it? Date of the original installation of the OS or something like that?


    Please call me Frank :)

    Monday, January 27, 2014 3:21 PM
  • Darren,

    Where I see "Age Of PC", there's a date shown.

    That's not age -- what is it? Date of the original installation of the OS or something like that?


    Please call me Frank :)

    whoops - my mistake - seem to have duplicated that field

    It is install date from WMI, so yes date of OS installation - the closest I can work out a rough age of a PC (assuming it hasn't been reinstalled obviously)


    Darren Rose

    Monday, January 27, 2014 3:39 PM
  • whoops - my mistake - seem to have duplicated that field

    It is install date from WMI, so yes date of OS installation - the closest I can work out a rough age of a PC (assuming it hasn't been reinstalled obviously)

    Ok so I can eliminate that one then, correct?

    Also, would you have a look at this image and let me know the answers?

    The first question looks like I may can use an enumerator (if it's a multiple-choice sort of thing) and the second one, about the drives, those are going to need to be in another class so that in this class I can then use a List(Of Class) to provide the ability to have an unlimited number of drives.


    Please call me Frank :)

    Monday, January 27, 2014 3:43 PM
  • Ok so I can eliminate that one then, correct?

    Also, would you have a look at this image and let me know the answers?

    The first question looks like I may can use an enumerator (if it's a multiple-choice sort of thing) and the second one, about the drives, those are going to need to be in another class so that in this class I can then use a List(Of Class) to provide the ability to have an unlimited number of drives.

    yes eliminate install date and keep age of PC

    1) At the moment just Desktop or Laptop (it returns a value and I then used select case to display answer depending on value returned) - although may need to change this later to use WMI > Win32_SystemEnclosure instead which returns more values as per here http://msdn.microsoft.com/en-us/library/aa394474(v=vs.85).aspx - had done it using Win32_ComputerSystem/PCSystemType for now as couldn't get the other way working as it returns an array

    2) It is per hard drive, so could list more than one result - but normally just one as most "home" computers I work on only ever have one internal drive


    Darren Rose


    • Edited by wingers Monday, January 27, 2014 3:53 PM
    Monday, January 27, 2014 3:51 PM
  • Ok so I can eliminate that one then, correct?

    Also, would you have a look at this image and let me know the answers?

    The first question looks like I may can use an enumerator (if it's a multiple-choice sort of thing) and the second one, about the drives, those are going to need to be in another class so that in this class I can then use a List(Of Class) to provide the ability to have an unlimited number of drives.

    yes eliminate install date and keep age of PC

    1) At the moment just Desktop or Laptop (it returns a value and I then used select case to display answer depending on value returned) - although may need to change this later to use WMI > Win32_SystemEnclosure instead which returns more values as per here http://msdn.microsoft.com/en-us/library/aa394474(v=vs.85).aspx - had done it using Win32_ComputerSystem/PCSystemType for now as couldn't get the other way working as it returns an array

    2) It is per hard drive, so could list more than one result - but normally just one as most "home" computers I work on only ever have one internal drive


    Darren Rose


    Ok, about the drive information, what all do you want to have in it?

    I see TotalBytes (type Long), AvailableBytes (type Long), SmartStatus (type Boolean?), DirtyBit (whatever that means ... type Boolean?). Is there any other information like maybe the Volume Label or ... anything?


    Please call me Frank :)

    Monday, January 27, 2014 3:57 PM
  • volume label is returned as string at the moment

    For smart again at the moment it is just returned the value.tostring - so not sure how I see what type it is? if I hover over the code it says "value as object"

    Dirty bit is set if a disk needs chkdsk running on reboot - again I have it as value.tostring, but it says "value as object" as I think most of the WMI code does

    Would it be easier if I pasted the code for that bit?


    Darren Rose

    Monday, January 27, 2014 4:02 PM
  • volume label is returned as string at the moment

    For smart again at the moment it is just returned the value.tostring - so not sure how I see what type it is? if I hover over the code it says "value as object"

    Dirty bit is set if a disk needs chkdsk running on reboot - again I have it as value.tostring, but it says "value as object" as I think most of the WMI code does

    Would it be easier if I pasted the code for that bit?


    Darren Rose

    No not yet anyway - I really just need to get it set up then we'll move to the "how do you fill in the blanks".

    I'll set it as an enum (with "OK" and "Not OK", or whatever you want the state to be) - in your code, you can make a decision about what constitutes an "OK" status and what doesn't.

    I'll continue on and have something we can discuss in a few hours.


    Please call me Frank :)

    Monday, January 27, 2014 4:08 PM
  • volume label is returned as string at the moment

    For smart again at the moment it is just returned the value.tostring - so not sure how I see what type it is? if I hover over the code it says "value as object"

    Dirty bit is set if a disk needs chkdsk running on reboot - again I have it as value.tostring, but it says "value as object" as I think most of the WMI code does

    Would it be easier if I pasted the code for that bit?


    Darren Rose

    Have a look at where I am so far then we can discuss it.

    I also have a work-related e-mail that I need to attend to for a bit, so I might be a few hours getting back on this.


    Please call me Frank :)

    Monday, January 27, 2014 4:21 PM
  • Have a look at where I am so far then we can discuss it.

    I also have a work-related e-mail that I need to attend to for a bit, so I might be a few hours getting back on this.


    Please call me Frank :)

    Yes that make sense

    The only bit I don't get the need for is the section commented "This class is used to find the difference in two dates, expressed as whole units. " - if this is for the age of PC, then not really needed as I tend to show the date returned - rather than working out the difference between that date and today's date - so if I look at a report I created a year back I can see the date it was installed and know its age without having to check report date as well - hope that makes sense - apols if I have got the point of that section completely wrong though :)


    Darren Rose

    Monday, January 27, 2014 4:28 PM
  • Yes that make sense

    Do you see and understand what I'm doing with the class for the disk information?

    The only bit I don't get the need for is the section commented "This class is used to find the difference in two dates, expressed as whole units. " - if this is for the age of PC, then not really needed as I tend to show the date returned - rather than working out the difference between that date and today's date - so if I look at a report I created a year back I can see the date it was installed and know its age without having to check report date as well - hope that makes sense - apols if I have got the point of that section completely wrong though :)

    That's what that was for, yes. I'll remove it - it's a class I put together a while back and I've used it many times. You said age so by golly I was going to give you the age right down to the second!

    ;-)

    I'll take it out though.


    Please call me Frank :)

    Monday, January 27, 2014 4:33 PM
  • Do you see and understand what I'm doing with the class for the disk information?

    Yes I think so

    That's what that was for, yes. I'll remove it - it's a class I put together a while back and I've used it many times. You said age so by golly I was going to give you the age right down to the second!

    Yes don't think I need it worked out - thanks though.   I did used to record them like this (when I did all this manually on a paper form!) - but found it was always a pain to have to re-work out the age at a later date, so was easier just to show install date (probably me confusing things by calling field age of PC!)

    Darren Rose

    Monday, January 27, 2014 4:43 PM
  • Darren,

    Ok, have a look at this revision. Specifically the Enum that I'm calling "ProcessType". What I have in mind is that I'll use this in various places:

    First, that will be one of the parameters used in the Exception Logging (so you'll know which process threw the exception) and then later when I get to the class that will do the work in the BGW so that you can then show your user what it's currently busy doing.

    In order to do that, the methods either need to be split up into 24 separate subs or I do the whole thing in one sub, but if the latter, it'll have a bunch of individual Try/Catch's in it (and to me, that's confusing).

    Tell me your thoughts?

    *****

    I thought what I'd do would be to create "stubs" ... that is, I'll have a place for you to then fill in the actual code which gets the actual information. Are ok on that or do you want me to?


    Please call me Frank :)

    Monday, January 27, 2014 5:02 PM
  • idea of "ProcessType" makes complete sense

    yes I agree it sounds better to have 24 separate subs, rather than lots of confusing try/catch's in one sub

    "stubs" is fine with me - happy to insert the code which gets the information in the right places - thanks

    On a completely separate note, and certainly not to get sidetracked for now but I notice on your website (the link you send with the images) you have images titled "example file copy program" 15 Jan I believe - what forum were you talking about this on, as really sounds like a discussion I would like to read in future, as this was another project on my to-do list! - but one thing at a time.... :)


    Darren Rose

    Monday, January 27, 2014 5:10 PM
  • idea of "ProcessType" makes complete sense

    yes I agree it sounds better to have 24 separate subs, rather than lots of confusing try/catch's in one sub

    "stubs" is fine with me - happy to insert the code which gets the information in the right places - thanks

    On a completely separate note, and certainly not to get sidetracked for now but I notice on your website (the link you send with the images) you have images titled "example file copy program" 15 Jan I believe - what forum were you talking about this on, as really sounds like a discussion I would like to read in future, as this was another project on my to-do list! - but one thing at a time.... :)


    Darren Rose

    Ok good - this next part will take a while so it may be tomorrow getting back to you, but I wanted to ask something:

    We got to talking about all of this as a result of wanting to have something bindable - like a database - but not a database.

    Unless I'm mistaken on how this will be used though, it will only ever have one "row" (if you were to show it in a grid as an example).

    How then would a grid or your original thought of a ListView be helpful?

    Don't get me wrong though, I think that even if you never use that, something like this should be relegated to its own class (namespace in this case), if for no reason other than reusability, but I'm really curious about how you originally had in mind to use the ListView. Would you mind filling in my blank mind here? ;-)

    *****

    That was from another long thread (seems like if it's really long, you can bet I'm involved! Ha!) from a few weeks ago shown here.


    Please call me Frank :)

    Monday, January 27, 2014 5:22 PM
  • Ok good - this next part will take a while so it may be tomorrow getting back to you, but I wanted to ask something:

    We got to talking about all of this as a result of wanting to have something bindable - like a database - but not a database.

    Unless I'm mistaken on how this will be used though, it will only ever have one "row" (if you were to show it in a grid as an example).

    How then would a grid or your original thought of a ListView be helpful?

    Don't get me wrong though, I think that even if you never use that, something like this should be relegated to its own class (namespace in this case), if for no reason other than reusability, but I'm really curious about how you originally had in mind to use the ListView. Would you mind filling in my blank mind here? ;-)

    *****

    That was from another long thread (seems like if it's really long, you can bet I'm involved! Ha!) from a few weeks ago shown here.

    The way I wanted to show it would be something like this, so it has two columns (perhaps three if I decide to add an icon/image next to each item), and it is grouped by a section (hopefully with an image as well) i.e. hardware information, os information etc - so each result would be on a separate row

    have mocked up a very rough image which hopefully shows what I mean

    Then it will look nicer on screen than my current use of lots of text boxes - and will be in a format that  I can then create a report with or save/export etc


    Darren Rose

    Monday, January 27, 2014 5:45 PM
  • That looks pretty good!

    I should have something for you tomorrow.


    Please call me Frank :)

    Monday, January 27, 2014 6:23 PM
  • Darren,

    Ok, have a look at where this version is. I don't have XML documentation in it (that would take a while), but it should be a fairly good starting point for this.

    If you want me to, I'll zip up my project folder for you to download so you don't have to copy/paste. If you do decide to copy it from the code in that link, at the top click the link to see a text file - copy from that, not from the formatted one.


    Please call me Frank :)

    Monday, January 27, 2014 9:30 PM
  • Darren,

    Ok, have a look at where this version is. I don't have XML documentation in it (that would take a while), but it should be a fairly good starting point for this.

    If you want me to, I'll zip up my project folder for you to download so you don't have to copy/paste. If you do decide to copy it from the code in that link, at the top click the link to see a text file - copy from that, not from the formatted one.


    Please call me Frank :)

    Looks great - probably best if you could zip it up for me, saves any errors in me copying it across myself - if you don't mind

    Darren Rose

    Monday, January 27, 2014 10:26 PM
  • Looks great - probably best if you could zip it up for me, saves any errors in me copying it across myself - if you don't mind

    Sure. I have it here.

    Eventually I'll move it to a class in the project - I always test them this way (just convenience really), but by putting it into its own file, then later when it's all done, if you want to add the whole thing to another project, you just use Solution Explorer and do "Add >> Existing File", find that, done - your other project automatically has the whole thing then.


    Please call me Frank :)

    Monday, January 27, 2014 10:33 PM
  • excellent thanks

    May sound a stupid question, but what exactly do I need to do now to test it - other than obviously putting my relevant code in each section to get the values? how can I quickly see that it is doing what it should and getting the right information?

    Getting late this end, so will catch up on replies tomorrow - thanks again for all your help so far with this, it really is appreciated and helping me learn more too


    Darren Rose

    Monday, January 27, 2014 11:29 PM
  • excellent thanks

    May sound a stupid question, but what exactly do I need to do now to test it - other than obviously putting my relevant code in each section to get the values? how can I quickly see that it is doing what it should and getting the right information?

    Getting late this end, so will catch up on replies tomorrow - thanks again for all your help so far with this, it really is appreciated and helping me learn more too


    Darren Rose

    Yes, exactly - if you'll look at the private subs in the main class you'll see that I have comments put where you need to add the code.

    Do the first one, then just press <F5> as I already have the test set up. It'll "Stop" where you see that in the form's .Load event and let you know if it was successful. Following that, hover your mouse over the variable that I called "thisProcess" and you should see the result (of that one) shown in the properties.

    Let me know how you fare when you get back to it. :)


    Please call me Frank :)

    Tuesday, January 28, 2014 12:32 AM
  • @ Frank L. Smith

    Right, slowly getting all the code copied across - most seem okay, but having issues with this one at the moment:-

    Get_rebootonerror - gives me error about can't convert string to enableddisabled

      Dim rebootonerror_query As String = "SELECT * FROM Win32_ComputerSystem"
                    Dim rebootonerror_searcher As New ManagementObjectSearcher(rebootonerror_query)
                    For Each info As ManagementObject In rebootonerror_searcher.Get()
                        _rebootOnError = info.Properties("AutomaticResetBootOption").Value.ToString()
                    Next info

    Perhaps instead of type of enableddisabled I could change it to string and then use my original code to set the value to Enabled/Disabled? (original code below)

    Dim rebootonerror_query As String = "SELECT * FROM Win32_ComputerSystem"
            Dim rebootonerror_searcher As New ManagementObjectSearcher(rebootonerror_query)
            For Each info As ManagementObject In rebootonerror_searcher.Get()
                If info.Properties("AutomaticResetBootOption").Value.ToString() = True Then
                    tbrebootonerror.Text = "Enabled"
                  Else
                    tbrebootonerror.Text = "Disabled"
                  End If
            Next info

    same error with get_systemrestore

    _systemRestore = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore", "RPSessionInterval", Nothing)

    not sure how I should format the code - or perhaps it needs to be set to a different type?

    got to pop out for couple of hours to do some work, so have zipped up what I have done so far - with some notes in the notes.txt and also a copy of my code in code.txt

    Modified code


    Darren Rose





    • Edited by wingers Tuesday, January 28, 2014 11:29 AM
    Tuesday, January 28, 2014 10:09 AM
  • Darren,

    A long and good conversation between you and Frank.

    However, to come back to your original question. '

    Look what the right view of Windows Explorer (File Explorer in versions 8) can do and then you have a good sight on what is possible with a Windows Forms and WPF Listview. In my idea does that not contain an image inside a detail or list view.

     


    Success
    Cor

    Tuesday, January 28, 2014 10:33 AM
  • Darren,

    A long and good conversation between you and Frank.

    However, to come back to your original question. '

    Look what the right view of Windows Explorer (File Explorer in versions 8) can do and then you have a good sight on what is possible with a Windows Forms and WPF Listview. In my idea does that not contain an image inside a detail or list view.

     


    Success
    Cor


    Yes very true - but I wanted more control over it - i.e. grouped by with an image in the group etc etc - don't think listview can do this? and also the post has somewhat changed to solve several issues - but thanks for your reply

    Darren Rose

    Tuesday, January 28, 2014 11:09 AM
  • @ Frank L. Smith

    Right, slowly getting all the code copied across - most seem okay, but having issues with this one at the moment:-

    Get_rebootonerror - gives me error about can't convert string to enableddisabled

      Dim rebootonerror_query As String = "SELECT * FROM Win32_ComputerSystem"
                    Dim rebootonerror_searcher As New ManagementObjectSearcher(rebootonerror_query)
                    For Each info As ManagementObject In rebootonerror_searcher.Get()
                        _rebootOnError = info.Properties("AutomaticResetBootOption").Value.ToString()
                    Next info

    Perhaps instead of type of enableddisabled I could change it to string and then use my original code to set the value to Enabled/Disabled? (original code below)

    Dim rebootonerror_query As String = "SELECT * FROM Win32_ComputerSystem"
            Dim rebootonerror_searcher As New ManagementObjectSearcher(rebootonerror_query)
            For Each info As ManagementObject In rebootonerror_searcher.Get()
                If info.Properties("AutomaticResetBootOption").Value.ToString() = True Then
                    tbrebootonerror.Text = "Enabled"
                  Else
                    tbrebootonerror.Text = "Disabled"
                  End If
            Next info

    same error with get_systemrestore

    _systemRestore = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore", "RPSessionInterval", Nothing)

    not sure how I should format the code - or perhaps it needs to be set to a different type?

    got to pop out for couple of hours to do some work, so have zipped up what I have done so far - with some notes in the notes.txt and also a copy of my code in code.txt

    Modified code


    Darren Rose





    Good morning (I'm six hours behind you I think).

    With those which expect a selection of an enumeration, you'll need to set yours up to perform logic, so if the return value is this, set the enum to that, elseif if the value is this ... that sort of thing.


    Please call me Frank :)

    Tuesday, January 28, 2014 1:01 PM
  • Good morning Frank - yes it is about 1.30 in the afternoon here in the UK

    okay will try that

    This one only works if option strict is OFF - but beyond my knowledge as to why - is this a problem, do I need option strict set to ON - will it cause me issues later on?

    Dim pagingfile_query As String = "SELECT * FROM Win32_ComputerSystem"
                    Dim pagingfile_searcher As New ManagementObjectSearcher(pagingfile_query)
                    For Each info As ManagementObject In pagingfile_searcher.Get()
                        If info.Properties("AutomaticManagedPagefile").Value = True Then
                            _pagingFile = ("System Managed")
                        Else
                            Dim pagingfilesize_searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PageFileSetting")
                            For Each queryObj As ManagementObject In pagingfilesize_searcher.Get()
                                _pagingFile = ("Custom Size = ") & queryObj("InitialSize") & ("Mb - ") & queryObj("MaximumSize") & ("Mb")
                            Next
                        End If
                    Next info

    same with this

    Dim age_query As String = "SELECT * FROM Win32_OperatingSystem"
                    Dim age_searcher As New ManagementObjectSearcher(age_query)
                    For Each info As ManagementObject In age_searcher.Get()
                        _installDate = ManagementDateTimeConverter.ToDateTime(info("InstallDate")).ToShortDateString
                    Next info

    no idea how to add my existing "disk" code to your new section

    But will continue adding the others - think most bits added now


    Darren Rose

    Tuesday, January 28, 2014 1:28 PM
  • Darren,

    I'm leaving for a meeting but I should be back in a few hours and I'll have a look then.


    Please call me Frank :)

    Tuesday, January 28, 2014 1:33 PM
  • right - have added all apart from above (paging file and age of PC) and disk bits

    But I am getting "object reference not set to an instance of an object" when I run it - but doesn't show me what line is causing the error

    Think it may be this section and how I am getting result from registry - used a couple of times and it seems to return wrong value - so must be how I coded it to work with your enableddisabled code - originally I had just got it as string and then set the value depending on result - perhaps I could still do this, but would like to understand why it doesn't work using your method (or my code!)

     ' get the UserAccountControl.
                    Dim readValue = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", Nothing)
                    If readValue Is "1" Then
                        _userAccountControl = EnabledDisabled.Enabled
                    Else
                        _userAccountControl = EnabledDisabled.Disabled
                    End If
    

    Link above updated with latest changes


    Darren Rose


    • Edited by wingers Tuesday, January 28, 2014 3:16 PM
    Tuesday, January 28, 2014 1:39 PM
  • Darren,

    I'm back but I first need to attend to something work-related (based on the meeting I just left from), then I'll have a look at this.

    I wanted to ask you if you'd please do this: Can you tell me what group names you had in mind and what goes into each of these groups?


    Please call me Frank :)

    Tuesday, January 28, 2014 4:34 PM
  • Darren,

    I'm back but I first need to attend to something work-related (based on the meeting I just left from), then I'll have a look at this.

    I wanted to ask you if you'd please do this: Can you tell me what group names you had in mind and what goes into each of these groups?


    Please call me Frank :)

    Okay thank you Frank

    Groups I think (may change as app develops though) are:

    Operating System - which will contain items in System on screenshot above

    Hardware - as per screenshot

    Storage - as per screenshot

    Network - this is bits on second tab not covered yet - hoping I can add them on later once get basics working with your help

    Security - as above this is basically antivirus, antispyware and firewall info - shows product name, whether enabled and whether up-to-date (on third tab on my screenshot)


    Darren Rose

    Tuesday, January 28, 2014 4:40 PM
  • Darren,

    I'm back but I first need to attend to something work-related (based on the meeting I just left from), then I'll have a look at this.

    I wanted to ask you if you'd please do this: Can you tell me what group names you had in mind and what goes into each of these groups?


    Please call me Frank :)

    Okay thank you Frank

    Groups I think (may change as app develops though) are:

    Operating System - which will contain items in System on screenshot above

    Hardware - as per screenshot

    Storage - as per screenshot

    Network - this is bits on second tab not covered yet - hoping I can add them on later once get basics working with your help

    Security - as above this is basically antivirus, antispyware and firewall info - shows product name, whether enabled and whether up-to-date (on third tab on my screenshot)


    Darren Rose

    Ok, have a look at how I have it set up now (version 4 shown here). I also have the project folder zipped up and available here.

    I'd like to get you to run it and and - assuming it returns as successful - you'll have a new text file on your desktop which shows the ".ToString" method of this class. Also though, hover your mouse over the instance declared in the form's .Load event and look at all of the properties (the properties will be below the private variables because they're shown alphabetically).

    The way that I did the properties here, as I normally do, is that for anything which isn't a string naturally, I have the "real value" so that I can access that if/when I need, then I have a "_String" property following it so that I don't have to convert it to a string for displaying it.

    At any rate, run that and then we can talk some more.

    The Paging File information isn't working - you might want to look more into that but please don't set Option Strict Off -- find the issue if it's showing one and work through it.

    Let me know what you think. :)


    Please call me Frank :)


    Tuesday, January 28, 2014 7:09 PM
  • Hi Frank

    That seems to work fine, and creates the text file you mentioned (copied below) - and I can also see the information when hovering over the instance

    Will have a play with the paging file information code - works fine in my original app, so will see what I can do with it - just stopping for some food and then I will take a look at it

    I notice that for some reason SMART status is coming back as unknown?

    The error I got before "but that is not a problem to me, as some of the other bits in my app needed admin anyway

    ----- System -----
    
         Operating System: Microsoft Windows 8.1 Pro
         Version: 6.3.9600 SP 0.0
         Type: 64-Bit
         Internet Explorer Version: 9.11.9600.16476
         Owner Name: **REMOVED**
         Reboot On Error: Enabled
         System Restore: Enabled
         Paging File: Unknown
         User Account Control: Enabled
         Install Date: 04/12/2013
         Automatic Updates: Enabled
    
    
    ----- Hardware -----
    
         CPU Type: Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
         Number Of Processors: 4
         RAM Total: 11.88 Gigs
         RAM Available: 5.78 Gigs
         Manufacturer: Gigabyte Technology Co., Ltd.
         Model: H87-HD3
         BIOS Version: F5
         Graphics Card Name: Intel(R) HD Graphics 4600
         Graphics Card Resolution: 1680 Horizontal x 1050 Vertical
         Chassis Type: Low-Profile Desktop
    
    
    ----- Storage -----
    
         Drive Letter: C:\
         Drive Volume Label: WINDOWS
         Drive Format: NTFS
         Drive Type: Fixed
         Total Size (bytes): 111.27 Gigs
         Available Size (bytes): 59.10 Gigs
         S.M.A.R.T Status: Unknown
         Disk Failure Predict Status: OK
         Dirty Bit Status: OK
    
    
         Drive Letter: D:\
         Drive Volume Label: STORAGE
         Drive Format: NTFS
         Drive Type: Fixed
         Total Size (bytes): 445.47 Gigs
         Available Size (bytes): 232.59 Gigs
         S.M.A.R.T Status: Unknown
         Disk Failure Predict Status: OK
         Dirty Bit Status: OK
    
    
         Drive Letter: E:\
         Drive Volume Label: DATA
         Drive Format: NTFS
         Drive Type: Fixed
         Total Size (bytes): 20.28 Gigs
         Available Size (bytes): 11.70 Gigs
         S.M.A.R.T Status: Unknown
         Disk Failure Predict Status: OK
         Dirty Bit Status: OK
    
    


    Darren Rose


    • Edited by wingers Tuesday, January 28, 2014 7:33 PM
    Tuesday, January 28, 2014 7:31 PM
  • Darren,

    I should have said this before: I'm on XP so I'll never know if something needs administrator privledges or not - it always work on my end (but that doesn't mean anything for other OS's).

    As for the paging file, or a lot of this for that matter, I'm surely no pro with WMI -- WMI is chock full of things but I was following your lead on that part of it, I was just setting up the class library for it.

    :)


    Please call me Frank :)

    Tuesday, January 28, 2014 7:37 PM
  • Darren,

    I should have said this before: I'm on XP so I'll never know if something needs administrator privledges or not - it always work on my end (but that doesn't mean anything for other OS's).

    As for the paging file, or a lot of this for that matter, I'm surely no pro with WMI -- WMI is chock full of things but I was following your lead on that part of it, I was just setting up the class library for it.

    :)


    Please call me Frank :)

    That's fine - I think I remember you saying you were on XP in another post - so thought that might be it

    As for the paging file, I know the locations etc I am looking in WMI work with my app, so could be an XP thing? will have a play and report back


    Darren Rose

    Tuesday, January 28, 2014 7:40 PM
  • That's fine - I think I remember you saying you were on XP in another post - so thought that might be it

    As for the paging file, I know the locations etc I am looking in WMI work with my app, so could be an XP thing? will have a play and report back

    Again, I don't know - I was following your lead on it all.

    This is what the .ToString output on my end.


    Please call me Frank :)

    Tuesday, January 28, 2014 7:43 PM
  • After I posted that link to the .ToString example, I've gone back and added an overload (so it's an option when you use the .ToString method) which shows something that I've been wondering about for a while now:

    How much - total - disk space do I have and how much do I have available which is shown when using that overloaded version.

    I don' know why I never thought about it before but I need to add TeraBytes to my function. It's never come up before! ;-)


    Please call me Frank :)

    Tuesday, January 28, 2014 7:57 PM
  • After I posted that link to the .ToString example, I've gone back and added an overload (so it's an option when you use the .ToString method) which shows something that I've been wondering about for a while now:

    How much - total - disk space do I have and how much do I have available which is shown when using that overloaded version.

    I don' know why I never thought about it before but I need to add TeraBytes to my function. It's never come up before! ;-)


    Please call me Frank :)

    :)

    Partly got the paging file working, in that it can detect if system managed, but getting error in second part of code which I don't understand so need to work on that still

    On the third line I get an error of "Option Strict On prohibits operands of type Object for operator '&'"

    Dim pagingfilesize_searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PageFileSetting")
                            For Each queryObj As ManagementObject In pagingfilesize_searcher.Get()
                                _pagingFile = ("Custom Size = ") & queryObj("InitialSize") & ("Mb - ") & queryObj("MaximumSize") & ("Mb")
                            Next

    As for smart status I am confused as yours seems to show correctly, but mind says unknown, but if I run my original app it returns okay - will look at that later


    Darren Rose

    Tuesday, January 28, 2014 8:06 PM
  • After I posted that link to the .ToString example, I've gone back and added an overload (so it's an option when you use the .ToString method) which shows something that I've been wondering about for a while now:

    How much - total - disk space do I have and how much do I have available which is shown when using that overloaded version.

    I don' know why I never thought about it before but I need to add TeraBytes to my function. It's never come up before! ;-)


    Please call me Frank :)

    :)

    Partly got the paging file working, in that it can detect if system managed, but getting error in second part of code which I don't understand so need to work on that still

    On the third line I get an error of "Option Strict On prohibits operands of type Object for operator '&'"

    Dim pagingfilesize_searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PageFileSetting")
                            For Each queryObj As ManagementObject In pagingfilesize_searcher.Get()
                                _pagingFile = ("Custom Size = ") & queryObj("InitialSize") & ("Mb - ") & queryObj("MaximumSize") & ("Mb")
                            Next

    As for smart status I am confused as yours seems to show correctly, but mind says unknown, but if I run my original app it returns okay - will look at that later


    Darren Rose

    As to the use of ampersand, that's correct - the ampersand is used to concatenate strings and it's not a string; it's an object (not looking at the code but based on the compile error you said).

    Look at how I'm doing those. I'm not fond of boxing/unboxing but there's option here -- it always returns a type object.

    Test first that the object isn't null (and if it is, set it to something applicable like I've done in the others). If it's NotNothing (not null), then you can use the .ToString method to take it to a string (that's one way, there are others). But notice in every step of what I did, I'm testing things, either as being null (if a reference) or that it can be cast to the correct value type (using TryParse).

    *****

    As for the S.M.A.R.T. status ... again, I was following your lead so ...


    Please call me Frank :)

    Tuesday, January 28, 2014 8:12 PM
  • Darren,

    This is a start on that (then test that these two variables aren't null):

    Private Sub Get_thisPagingFile() Try _currentProcess = ProcessType.Get_PagingFile ' Code here to get the PagingFile. ' Dim pagingfilesize_searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PageFileSetting") For Each queryObj As ManagementObject In pagingfilesize_searcher.Get() Dim initialSizeObj As Object = queryObj("InitialSize") Dim maxSizeObj As Object = queryObj("MaximumSize") Stop Next Catch ex As Exception ProcessException.AddNew(_exceptionsThrown, _ _currentProcess, _ New Exception(ex.Message, ex.InnerException)) End Try End Sub


    But for all of that, I don't know what it's supposed to be to start with. I don't understand how "Managed" is ascertained based on those two numbers?


    Please call me Frank :)

    Tuesday, January 28, 2014 8:22 PM
  • okay will give it a try

    it checks two different WMI entries - if system managed is true then that is fine and we can report "system managed" - if system managed appears as false then it means a custom sized paging file is in use, so the second WMI bit looks for the min and max sizes configured for the paging file

    Think part of it is just me getting used to coding things differently when option strict is on, which I have never done before

    i.e. before I could use this

    If info.Properties("AutomaticManagedPagefile").Value = True Then
    
    End If

    but with option strict on is tells me I can't use "=", but have to use Is which then doesn't work

    Will keep trying with it


    Darren Rose

    Tuesday, January 28, 2014 8:36 PM
  • ...but with option strict on is tells me I can't use "=", but have to use Is which then doesn't work

    Right. You're dealing with a reference type, not a value type.

    With Option Strict Off you're relying on the compiler to "understand what I meant" which is dangerous. It doesn't always guess right!

    Additionally though, from something I've posted many times (Armin wrote this):

    “The first action after installing VB should be setting Option Strict On as the default value in the IDE options. For already created projects you can enable it in the project properties, or on a per-file basis by putting "Option Strict On" at the top of a code file. With Option Strict Off, your code may fail because you've activated unsafe programming, disabled compiler checks and enabled the automatic and unattended generation of implicit conversions that may fail or not, or may give unexpected or undesirable results. In addition, it enables late-binding which is slow at run-time and steals the ability of verifying the existence of type members from the compiler. It is often hard for people trying to help if the code is not compilable and errors have to be fixed first. Data type awareness and correct data type handling are most essential for every programmer.”


    Please call me Frank :)

    Tuesday, January 28, 2014 8:41 PM
  • Okay thanks - will make sure I always have it turned on in future

    Not sure if the best way to do it or not (my skills are no where as good as yours!), but this code works for displaying correct paging file information, tested it on two different machines here, one with system managed and one with custom size and it reported correct information

    Private Sub Get_thisPagingFile()
    
                Try
                    _currentProcess = ProcessType.Get_PagingFile
    
                    ' Code here to get the PagingFile.
    
                    Dim pagingfile_query As String = "SELECT * FROM Win32_ComputerSystem"
                    Dim pagingfile_searcher As New ManagementObjectSearcher(pagingfile_query)
                    For Each info As ManagementObject In pagingfile_searcher.Get()
                        If info.Properties("AutomaticManagedPagefile").Value.ToString = "True" Then
                            _pagingFile = ("System Managed")
                        Else
                            Dim pagingfilesize_searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PageFileSetting")
                            For Each queryObj As ManagementObject In pagingfilesize_searcher.Get()
                                _pagingFile = ("Custom Size = ") & queryObj("InitialSize").ToString & ("Mb - ") & queryObj("MaximumSize").ToString & ("Mb")
                            Next
                        End If
                    Next info
                   
    
    
                Catch ex As Exception
                    ProcessException.AddNew(_exceptionsThrown, _
                                            _currentProcess, _
                                            New Exception(ex.Message, ex.InnerException))
                End Try
    
            End Sub


    Darren Rose

    Tuesday, January 28, 2014 9:02 PM
  • as for the SMART status - I have double checked my code and the values using WMI explorer and it definitely shows OK for all my disks

    If I put a breakpoint in the code at the line that says

    Dim statusObj As Object = info.Properties("Status").Value

    Then it is clearly showing me that the value it is getting returned from WMI for status is OK, so not sure why it then returns unknown instead


    Darren Rose

    Tuesday, January 28, 2014 9:13 PM
  • as for the SMART status - I have double checked my code and the values using WMI explorer and it definitely shows OK for all my disks

    If I put a breakpoint in the code at the line that says

    Dim statusObj As Object = info.Properties("Status").Value

    Then it is clearly showing me that the value it is getting returned from WMI for status is OK, so not sure why it then returns unknown instead


    Darren Rose

    On this one, keep stepping through and see which one it goes to. It should go to the first one.

    *****

    The paging file isn't working here but it's shown me that my exception handling routine isn't working correctly.

    I'll try to figure out why not -- right now it's not making sense to me, but that needs to be in place.

    Mine may simply not exist - and if that's the case with mine, it may be with others so that was the purpose of the specialized exception handling. I'll see what I figure out on it.


    Please call me Frank :)

    Tuesday, January 28, 2014 9:20 PM
  • Darren,

    Ok, I'm glad this happened.

    I found and resolved the issue with the exception handling, so it works now. As a result, I've modified the .ToString method(s) and if there are any exceptions thrown, they'll show up in the output as shown here.

    I don't want us to get out of synch so I won't post the modified version yet. Let me know what you discover about the issue with the S.M.A.R.T. status.


    Please call me Frank :)

    Tuesday, January 28, 2014 9:53 PM
  • I think in XP it has the paging file information in a different area in WMI - which is fine for me, as I don't tend to see many (if any) XP machines now, mainly vista, 7 and 8 - so I suspect that is why it doesn't work for you

    Could confirm if you run wmi explorer and check that value

    As for the SMART status - it seems to jump to the second instance of "thisInstance.SmartStatus = Status.Unknown" - shown bold/underlined below - just gone through the logic in my head and can't see why it is doing it, will look again later, maybe just tired eyes and I am missing it

    For Each info As ManagementObject In smart_searcher.Get()
                                Dim obj As Object = info.Properties("MediaType").Value
    
                                If obj IsNot Nothing Then
                                    If obj.ToString.ToLower.Contains("fixed") Then
                                        Dim statusObj As Object = info.Properties("Status").Value
    
                                        If statusObj IsNot Nothing Then
    
                                            If statusObj.ToString.ToLower.Contains("OK") Then
                                                thisInstance.SmartStatus = Status.OK
                                            Else
                                                thisInstance.SmartStatus = Status.NotOK
                                            End If
                                        Else
                                            thisInstance.SmartStatus = Status.Unknown
                                        End If
                                    Else
                                        thisInstance.SmartStatus = Status.NotApplicable
                                    End If
                                Else
                                    thisInstance.SmartStatus = Status.Unknown
                                End If
                            Next info


    Darren Rose

    Tuesday, January 28, 2014 10:06 PM
  • Darren,

    This:

    If statusObj.ToString.ToLower.Contains("OK") Then

    Will always return false. It's being taken to lower then comparing it to all upper.

    Is that what I put in there or did you change it? I'll go look now...


    Please call me Frank :)

    Tuesday, January 28, 2014 10:10 PM
  • No, that's not what I put in there.

    This is the latest revision. How about put a breakpoint on line 1092 then run it and step through it. Let me know how what it does please?


    Please call me Frank :)

    Tuesday, January 28, 2014 10:17 PM
  • Darren,

    This:

    If statusObj.ToString.ToLower.Contains("OK") Then

    Will always return false. It's being taken to lower then comparing it to all upper.

    Is that what I put in there or did you change it? I'll go look now...


    Please call me Frank :)

    Think it must have been me when playing with it - but even ok in lower case still returns unknown

    If I put a break point in and then look at value of thisinstance it shows okay for C: drive, then I click continue and it breaks again, this time showing C: drive again and again shows OK, this repeats four times for drive C:  - 1st, 2nd and 4th time show OK, 3rd time shows unknown - it then does same for drive D: etc etc - showing OK 1st,2nd and 4th loop and unknown for 3rd loop

    So for some reason it is looping? and testing the same drive four times?


    Darren Rose

    Tuesday, January 28, 2014 10:19 PM
  • Darren,

    This:

    If statusObj.ToString.ToLower.Contains("OK") Then

    Will always return false. It's being taken to lower then comparing it to all upper.

    Is that what I put in there or did you change it? I'll go look now...


    Please call me Frank :)

    Think it must have been me when playing with it - but even ok in lower case still returns unknown

    If I put a break point in and then look at value of thisinstance it shows okay for C: drive, then I click continue and it breaks again, this time showing C: drive again and again shows OK, this repeats four times for drive C:  - 1st, 2nd and 4th time show OK, 3rd time shows unknown - it then does same for drive D: etc etc - showing OK 1st,2nd and 4th loop and unknown for 3rd loop

    So for some reason it is looping? and testing the same drive four times?


    Darren Rose


    For Each info As ManagementObject In smart_searcher.Get()

    That's a loop. ;-)

    If need be I can Exit that loop, but that's not happening on my end.

    Try that latest version and see if you can detect what's different per loop there. That's done "per drive" so I don't know why it finds more than one.


    Please call me Frank :)

    Tuesday, January 28, 2014 10:23 PM
  • Darren,

    Replace your entire method with the following, then try it:

    Private Sub Get_thisDiskInfo() Try _currentProcess = ProcessType.Get_DiskInfo For Each drv As IO.DriveInfo In IO.DriveInfo.GetDrives If drv.IsReady Then _diskInfoList.Add(New DiskInfo(drv)) ' Set the three properties of "thisInstance": Dim thisInstance As DiskInfo = _diskInfoList(_diskInfoList.Count - 1) Dim smart_query As String = "SELECT * FROM Win32_DiskDrive" Dim smart_searcher As New ManagementObjectSearcher(smart_query) For Each info As ManagementObject In smart_searcher.Get() Dim obj As Object = info.Properties("MediaType").Value If obj IsNot Nothing Then If obj.ToString.ToLower.Contains("fixed") Then Dim statusObj As Object = info.Properties("Status").Value If statusObj IsNot Nothing Then If statusObj.ToString.ToLower.Contains("ok") Then thisInstance.SmartStatus = Status.OK Else thisInstance.SmartStatus = Status.NotOK End If Else thisInstance.SmartStatus = Status.Unknown End If Else thisInstance.SmartStatus = Status.NotApplicable End If Exit For Else thisInstance.SmartStatus = Status.Unknown End If Next info Dim failureprecict_searcher As New ManagementObjectSearcher("root\WMI", "SELECT * FROM MSStorageDriver_FailurePredictStatus") For Each info As ManagementObject In failureprecict_searcher.Get() Dim obj As Object = info.Properties("PredictFailure").Value If obj IsNot Nothing Then Dim b As Boolean If Boolean.TryParse(obj.ToString, b) Then If b Then thisInstance.DiskFailurePredictStatus = Status.NotOK Else thisInstance.DiskFailurePredictStatus = Status.OK End If Else thisInstance.DiskFailurePredictStatus = Status.Unknown End If Exit For Else thisInstance.DiskFailurePredictStatus = Status.Unknown End If Next info Dim dirtybit_query As String = "SELECT * FROM Win32_LogicalDisk" Dim dirtybit_searcher As New ManagementObjectSearcher(dirtybit_query) For Each info As ManagementObject In dirtybit_searcher.Get() Dim obj As Object = info.Properties("DriveType").Value If obj IsNot Nothing Then Dim tempInt As Integer If Integer.TryParse(obj.ToString, tempInt) Then If tempInt = 3 Then Dim dirtyObj As Object = info.Properties("VolumeDirty").Value If dirtyObj IsNot Nothing Then Dim b As Boolean If Boolean.TryParse(dirtyObj.ToString, b) Then If b Then thisInstance.DirtyBitStatus = Status.NotOK Else thisInstance.DirtyBitStatus = Status.OK End If Else thisInstance.DirtyBitStatus = Status.Unknown End If Else thisInstance.DirtyBitStatus = Status.Unknown End If End If Else thisInstance.DirtyBitStatus = Status.Unknown End If Exit For Else thisInstance.DirtyBitStatus = Status.Unknown End If Next info End If Next Catch ex As Exception ProcessException.AddNew(_exceptionsThrown, _ _currentProcess, _ New Exception(ex.Message, ex.InnerException)) End Try End Sub



    Please call me Frank :)

    Tuesday, January 28, 2014 10:29 PM
  • yes that works okay - what changed?

    Darren Rose

    Tuesday, January 28, 2014 10:34 PM
  • yes that works okay - what changed?

    Darren Rose

    I used "Exit For" once it finds that the object "IsNot Nothing".

    Like I said earlier, as for the actual processes being done, I was following your lead on that. Tomorrow I'll go through each of them and see if that might be a potential issue elsewhere and do the same (and if so, it'll speed it up a bit).

    *****

    You're close enough now that tomorrow, how about contact Dev and show them your mock up image.

    Explain that you have a class which encapsulates all of the values that you want to show and ask them which control they'd suggest and how they'd recommend you get the data from the single instance of the class and show them in their control.

    They're super bright and have always worked with me when I've run into problems. Let me know what they say please?

    For now -- go get sleep! ;-)


    ***** EDIT *****

    Just for clarification here, once it finds the object not being null, it goes through the entire routine then, at the end of that, exits the loop. In rereading it, what I said might be confusing.


    Tuesday, January 28, 2014 10:40 PM
  • yes that works okay - what changed?


    Darren Rose

    I used "Exit For" once it finds that the object "IsNot Nothing".

    Like I said earlier, as for the actual processes being done, I was following your lead on that. Tomorrow I'll go through each of them and see if that might be a potential issue elsewhere and do the same (and if so, it'll speed it up a bit).

    *****

    You're close enough now that tomorrow, how about contact Dev and show them your mock up image.

    Explain that you have a class which encapsulates all of the values that you want to show and ask them which control they'd suggest and how they'd recommend you get the data from the single instance of the class and show them in their control.

    They're super bright and have always worked with me when I've run into problems. Let me know what they say please?

    For now -- go get sleep! ;-)


    Please call me Frank :)

    Okay that makes sense

    Sorry all I knew was that the code I used worked in my app, but obviously I did it in a different way than you did, as I was just showing what "status" reported back in WMI, rather than enumerating through the results to then set OK, NOT OK etc etc i.e.

    Dim smart_query As String = "SELECT * FROM Win32_DiskDrive"
            Dim smart_searcher As New ManagementObjectSearcher(smart_query)
            For Each info As ManagementObject In smart_searcher.Get()
                If info.Properties("MediaType").Value = "Fixed hard disk media" Then
                    tbSmartStatus.Text = tbSmartStatus.Text & info.Properties("Caption").Value.ToString()
                    tbSmartStatus.Text = tbSmartStatus.Text & " : "
                    tbSmartStatus.Text = tbSmartStatus.Text & info.Properties("Status").Value.ToString()
                    tbSmartStatus.Text = tbSmartStatus.Text & vbCrLf
                End If
            Next info

    For info: username missing from output so added in below in relevant two places in code

    sb.AppendLine(Space(5) & "User Name: " & UserName)

    Thanks for all your continuing help Frank

    Yes I will contact dev tomorrow like you said and see what they say and report back


    Darren Rose


    • Edited by wingers Tuesday, January 28, 2014 10:53 PM
    Tuesday, January 28, 2014 10:48 PM
  • yes that works okay - what changed?


    Darren Rose

    I used "Exit For" once it finds that the object "IsNot Nothing".

    Like I said earlier, as for the actual processes being done, I was following your lead on that. Tomorrow I'll go through each of them and see if that might be a potential issue elsewhere and do the same (and if so, it'll speed it up a bit).

    *****

    You're close enough now that tomorrow, how about contact Dev and show them your mock up image.

    Explain that you have a class which encapsulates all of the values that you want to show and ask them which control they'd suggest and how they'd recommend you get the data from the single instance of the class and show them in their control.

    They're super bright and have always worked with me when I've run into problems. Let me know what they say please?

    For now -- go get sleep! ;-)


    Please call me Frank :)

    Okay that makes sense

    Sorry all I knew was that the code I used worked in my app, but obviously I did it in a different way than you did, as I was just showing what "status" reported back in WMI, rather than enumerating through the results to then set OK, NOT OK etc etc i.e.

    Dim smart_query As String = "SELECT * FROM Win32_DiskDrive"
            Dim smart_searcher As New ManagementObjectSearcher(smart_query)
            For Each info As ManagementObject In smart_searcher.Get()
                If info.Properties("MediaType").Value = "Fixed hard disk media" Then
                    tbSmartStatus.Text = tbSmartStatus.Text & info.Properties("Caption").Value.ToString()
                    tbSmartStatus.Text = tbSmartStatus.Text & " : "
                    tbSmartStatus.Text = tbSmartStatus.Text & info.Properties("Status").Value.ToString()
                    tbSmartStatus.Text = tbSmartStatus.Text & vbCrLf
                End If
            Next info

    For info: username missing from output so added in below in relevant two places in code

    sb.AppendLine(Space(5) & "User Name: " & UserName)

    Thanks for all your continuing help Frank

    Yes I will contact dev tomorrow like you said and see what they say and report back


    Darren Rose

    Well that's what testing it is for. ;-)

    I'll modify it here also.


    Please call me Frank :)

    Tuesday, January 28, 2014 10:50 PM
  • Have just emailed dev now - so will let you know the result

    Time for a nice cold drink and a relax before I can sleep

    Cheers for the help - I am learning so much, it is just a bit overwhelming at times, but I am enjoying it!!!


    Darren Rose

    Tuesday, January 28, 2014 10:55 PM
  • Have just emailed dev now - so will let you know the result

    Time for a nice cold drink and a relax before I can sleep

    Cheers for the help - I am learning so much, it is just a bit overwhelming at times, but I am enjoying it!!!


    Darren Rose

    I'm glad it's helping. :)

    *****

    I have modified the .ToString for the anomaly you found as shown here.

    Let me know what Dev says - I'm anxious to know what they suggest. :)


    Please call me Frank :)

    Tuesday, January 28, 2014 11:01 PM
  • will let you know later as soon as I hear back from dev

    Trying to sleep last night something was niggling me about the SMART status - and why originally I chose to simply return the string value in my app - and this morning I remembered why - it is because it can have a lot more values than OK, NOT OK etc - so think I need to modify that bit of code so it simply returns as a string what is held in the "status" field of WMI - as result could be "OK", "Error", "Degraded", "Unknown", "Pred Fail", "Starting", "Stopping", "Service", "Stressed", "NonRecover", "No Contact" or "Lost Comm"


    Darren Rose

    Wednesday, January 29, 2014 10:07 AM
  • will let you know later as soon as I hear back from dev

    Trying to sleep last night something was niggling me about the SMART status - and why originally I chose to simply return the string value in my app - and this morning I remembered why - it is because it can have a lot more values than OK, NOT OK etc - so think I need to modify that bit of code so it simply returns as a string what is held in the "status" field of WMI - as result could be "OK", "Error", "Degraded", "Unknown", "Pred Fail", "Starting", "Stopping", "Service", "Stressed", "NonRecover", "No Contact" or "Lost Comm"


    Darren Rose

    Oh, I didn't know that.

    Once you change the sub that runs that process, how about post it and I'll update it on my end. I made some changes last night so I'll do it that way so that we're not out of synch with it.


    Please call me Frank :)

    Wednesday, January 29, 2014 1:21 PM
  • Oh, I didn't know that.

    Once you change the sub that runs that process, how about post it and I'll update it on my end. I made some changes last night so I'll do it that way so that we're not out of synch with it.


    Please call me Frank :)

    No I had completely forgot too - it was one of those things that kept niggling in the back of my head, and then I remembered why!

    Changes I made below - seems to work for me, so hopefully I have done it in the best way possible, if not correct me as to what I should have done better!

    1) In Public Class DiskInfo - changed to "Private _smartStatus As String"
    
    2) Removed section "Public ReadOnly Property SmartStatus_String() As String"
    
    3) Changed "Public Property SmartStatus() ...." to the following:-
    
    Public Property SmartStatus() As String
                Get
                    Return _smartStatus
                End Get
    
                Set(value As String)
                    _smartStatus = value
                End Set
    End Property
    
    4) Amended stringbuilder (in two places) so it says ("S.M.A.R.T Status: " & SmartStatus)
    
    5) Changed this section in Get_thisDiskInfo sub
    
    Dim smart_query As String = "SELECT * FROM Win32_DiskDrive"
                            Dim smart_searcher As New ManagementObjectSearcher(smart_query)
    
                            For Each info As ManagementObject In smart_searcher.Get()
                                Dim obj As Object = info.Properties("MediaType").Value
    
                                If obj IsNot Nothing Then
                                    If obj.ToString.ToLower.Contains("fixed") Then
    
                                        thisInstance.SmartStatus = info.Properties("Status").Value.ToString
    
                                    End If
    
                                End If
                            Next info


    Darren Rose

    Wednesday, January 29, 2014 1:54 PM
  • Darren,

    Ok I'll get mine caught up then.

    Let me know what Dev says when they get back to you.


    Please call me Frank :)

    Wednesday, January 29, 2014 2:03 PM
  • Darren,

    Ok I'll get mine caught up then.

    Let me know what Dev says when they get back to you.


    Please call me Frank :)

    Dev initially suggested a GridControl with a LayoutView and sent a sample - but didn't like the format i.e. it looked like sort of a card view like in outlook

    They then sent another sample using gridcontrol which looks nicer - I have asked if I can use images in the group headings and waiting for response

    As for getting data in they said "it is not quite clear how your class is built" - and as this is all new to me I am struggling to provide an answer, so may have to send it to them when done so they can advise further


    Darren Rose

    Wednesday, January 29, 2014 2:09 PM
  • Dev initially suggested a GridControl with a LayoutView and sent a sample - but didn't like the format i.e. it looked like sort of a card view like in outlook

    They then sent another sample using gridcontrol which looks nicer - I have asked if I can use images in the group headings and waiting for response

    As for getting data in they said "it is not quite clear how your class is built" - and as this is all new to me I am struggling to provide an answer, so may have to send it to them when done so they can advise further

    They're real good with doing things like that. They've sent me videos showing me how to set things up "just so" because I wanted a special look, they've built entire classes for me, examples, they're really good with their support.

    As for sending them the class, even though it's changed some, how about send them the same zip file that I uploaded yesterday? I've done that before. Do be sure you let them know this is VB Net because their default is C#, not VB, but they'll work with either one.


    Please call me Frank :)

    Wednesday, January 29, 2014 2:21 PM
  • They're real good with doing things like that. They've sent me videos showing me how to set things up "just so" because I wanted a special look, they've built entire classes for me, examples, they're really good with their support.

    As for sending them the class, even though it's changed some, how about send them the same zip file that I uploaded yesterday? I've done that before. Do be sure you let them know this is VB Net because their default is C#, not VB, but they'll work with either one.


    Please call me Frank :)

    Yes they do seem very helpful - and quick to reply

    Just sent it to them - so will let you know what they say


    Darren Rose

    Wednesday, January 29, 2014 2:25 PM
  • Just tested on another couple of computers and also works fine!

    One question - is there an easy way so that the "Get_thisDiskInfo()" section can only do fixed disks and not removable? - but without changing it too much, so I can always change my mind about it later?


    Darren Rose

    Wednesday, January 29, 2014 4:00 PM
  • One question - is there an easy way so that the "Get_thisDiskInfo()" section can only do fixed disks and not removable? - but without changing it too much, so I can always change my mind about it later?

    Sure.

    In the sub that gets the drive information (Get_thisDiskInfo()), you'll see a line showing "If drv.IsReady". Change that to the following:

    If drv.IsReady AndAlso drv.DriveType = IO.DriveType.Fixed Then

    That should do it (untested but it should work).

    :)


    Please call me Frank :)

    Wednesday, January 29, 2014 4:07 PM
  • Sure.

    In the sub that gets the drive information (Get_thisDiskInfo()), you'll see a line showing "If drv.IsReady". Change that to the following:

    If drv.IsReady AndAlso drv.DriveType = IO.DriveType.Fixed Then

    That should do it (untested but it should work).

    :)


    fantastic - that worked fine :)

    Darren Rose


    • Edited by wingers Wednesday, January 29, 2014 4:12 PM
    Wednesday, January 29, 2014 4:10 PM
  • Darren,

    I've made a number of changes between last night and today, the latest being another class which does what we talked about early on: It runs each process (but can be cancelled in between), it includes getting the CPU Usage, and it reports progress along the way.

    The updated project folder is zipped up and uploaded here.

    For my test (you'll see it when you open that), I set up an example which uses *some* of the available event args (put a breakpoint in the event handler then hover your mouse over "e" if you want to see a list of all of them), and that's shown following:

    >

    >

    >

    >

    I hope you find this useful. :)


    Please call me Frank :)

    Wednesday, January 29, 2014 5:04 PM
  • @ Frank

    That is fantastic!!! looking great - thank you so much


    Darren Rose

    Wednesday, January 29, 2014 5:21 PM
  • @ Frank

    That is fantastic!!! looking great - thank you so much


    Darren Rose

    You've come a ways since you first posted this question!

    I'm glad it's well-received.


    Please call me Frank :)

    Wednesday, January 29, 2014 5:24 PM
  • @ Frank

    That is fantastic!!! looking great - thank you so much


    Darren Rose

    You've come a ways since you first posted this question!

    I'm glad it's well-received.


    Please call me Frank :)

    Yes definitely - and I would never have achieved so much without your assistance

    Will start looking into adding my security bits and network bits so report contains all I need and then I think I am pretty much on my way - just need to get it outputting to a "dev" control once I hear back from them


    Darren Rose

    Wednesday, January 29, 2014 5:28 PM
  • Will start looking into adding my security bits and network bits so report contains all I need and then I think I am pretty much on my way - just need to get it outputting to a "dev" control once I hear back from them

    Well let me know if you want me to add those parts in so that it all stays in harmony, but once again, I'll follow your lead on the actual process itself - I figure that my "role" here is the class library.

    *****

    I'm curious to know what Dev suggests on the "how". I'm thinking that they may suggest outputing to an .xml file and if so, that's also something the class can do.


    Please call me Frank :)

    Wednesday, January 29, 2014 5:37 PM
  • Well let me know if you want me to add those parts in so that it all stays in harmony, but once again, I'll follow your lead on the actual process itself - I figure that my "role" here is the class library.

    *****

    I'm curious to know what Dev suggests on the "how". I'm thinking that they may suggest outputing to an .xml file and if so, that's also something the class can do.


    Please call me Frank :)

    For info: the file here gives an idea of what fields appear on the network and security tabs - and also what code I used to get the information that appears

    network and security bits

    Haven't heard anything back yet from Dev, but suspect if they work US hours then it may be later or overnight that I hear from them again


    Darren Rose

    Wednesday, January 29, 2014 6:01 PM
  • For info: the file here gives an idea of what fields appear on the network and security tabs - and also what code I used to get the information that appears

    network and security bits

    You have a pretty good template to follow now, or are you uncomfortable giving it a go on your own?


    Please call me Frank :)

    Wednesday, January 29, 2014 6:06 PM
  • You have a pretty good template to follow now, or are you uncomfortable giving it a go on your own?


    Please call me Frank :)

    Yes I think I can probably manage to have a try now

    Perhaps you could just add some comments/notes to the code to give me a rough guide of each area I need to amend when adding new items in? don't worry if not, I know I am asking a lot!  :)


    Darren Rose

    Wednesday, January 29, 2014 6:09 PM
  • Perhaps you could just add some comments/notes to the code to give me a rough guide of each area I need to amend when adding new items in?

    That's not a bad idea at all.

    Give me a few hours and I'll have something back to you on it.


    Please call me Frank :)

    Wednesday, January 29, 2014 6:14 PM
  • Darren,

    Ok, have a look at these:

    Image


    PDF


    Excel

    I think that's all of them but ...


    Please call me Frank :)


    Wednesday, January 29, 2014 7:01 PM
  • Darren,

    Ok, have a look at these:

    Image


    PDF


    Excel

    I think that's all of them but ...


    Please call me Frank :)


    fantastic - thanks Frank - will start adding the additional bits over the next day or so and let you know how I get on

    Will also reply as soon as I hear back from dev


    Darren Rose

    Wednesday, January 29, 2014 7:10 PM
  • Sounds good. :)

    Please call me Frank :)

    Wednesday, January 29, 2014 7:13 PM
  • Darren,

    I was thinking - and I'd like to give you more control over how the "CPU Usage" is done. All of this pertains to the class named "Public Class GetAllProcesses":

    In the private variables, add these two:

    Private _cpuUsageLoops As Integer = 20
    Private _cpuWaitMilliseconds As Integer = 1000

    Shown above are the default values (what's hard-coded in my original). Next, in the sub called "Start", you'll see where I'm calculating the _totalCount. Change yours to the following:

     _totalCount = (values.Length - 5) + _cpuUsageLoops

    Lastly then, in the "bgw_GetProcesses_DoWork", near the bottom of it is where it's running the loop to get the CPU Usage, so change yours to the following:

    Do Until cpuUsageList.Count = _cpuUsageLoops If _userCancel Then bgw_GetProcesses.CancelAsync() Exit Do Else Dim cpuusage_query As String = "SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name = '_Total'" Dim cpuusage_searcher As New ManagementObjectSearcher(cpuusage_query) For Each info As ManagementObject In cpuusage_searcher.Get() cpuUsageList.Add(CDbl(info.Properties("PercentProcessorTime").Value) / 100) Next info Threading.Thread.Sleep(_cpuWaitMilliseconds) _loopCount += 1 End If Loop


    This now gives you control over how many loops and how long (in milliseconds) to wait before continuing the loop.

    I hope this helps. :)


    Please call me Frank :)

    Wednesday, January 29, 2014 9:13 PM
  • excellent, thanks - I will give it a try

    So I assume the same sort of thing can be done to include network, disk and memory performance too?

    i.e.

    Dim diskperf_query As String = "SELECT * FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk WHERE Name = '_Total'"
                Dim diskperf_searcher As New ManagementObjectSearcher(diskperf_query)
                For Each info As ManagementObject In diskperf_searcher.Get()
                    disksample.Add((info.Properties("PercentDiskTime").Value))
                Next info
    
                Dim networkbandwidth_query As String = "SELECT * FROM Win32_PerfFormattedData_Tcpip_NetworkAdapter WHERE BytesTotalPerSec > '0'"
                Dim networkbandwidth_searcher As New ManagementObjectSearcher(networkbandwidth_query)
                For Each info As ManagementObject In networkbandwidth_searcher.Get()
                    Dim BytesTotalPerSec = info.Properties("BytesTotalPerSec").Value
                    Dim CurrentBandwidth = info.Properties("CurrentBandwidth").Value
                    networksample.Add(((BytesTotalPerSec * 8) / CurrentBandwidth) * 100)
                Next info
    
                Dim TotalRAM = FormatNumber(My.Computer.Info.TotalPhysicalMemory / 1024 / 1024 / 1024, 1)
                Dim FreeRAM = FormatNumber(My.Computer.Info.AvailablePhysicalMemory / 1024 / 1024 / 1024, 1)
                Dim UsedRAM = TotalRAM - FreeRAM
                ramsample.Add(CInt(UsedRAM / TotalRAM * 100))


    Darren Rose

    Wednesday, January 29, 2014 9:25 PM
  • excellent, thanks - I will give it a try

    So I assume the same sort of thing can be done to include network, disk and memory performance too?

    I don't know - WMI really isn't my forte although I've done *some* with it.

    Rather than formatting it like you're doing, maybe you didn't notice that I already have a function there to do it for you?

    Utilities.ShowTotalFileSize

    It'd not only be easier but would maintain consistency.


    Please call me Frank :)

    Wednesday, January 29, 2014 9:29 PM
  • Yes I had noticed that - code I posted above was just the bits out of my old app as an example - I hadn't tried modifying it or putting it in yet - but I do know that it works fine in my existing app, so hopefully I can just convert it over

    I will give it a try, as would be good to test all four areas together and then get the four results to show

    I had planned to do this anyway in my new app - as was intending to use the "dev" gauge controls to show the results


    Darren Rose

    Wednesday, January 29, 2014 9:44 PM
  • Darren,

    I know it's late there so deal with this tomorrow, but this is an issue!

    I got to thinking about this - why was the disk information sub looping? Obviously it's because it's a "for each" loop - and there are more than one. So how do we know that in the main loop which gets the basic disk information, that's the one it found in this secondary loop?

    You don't!

    What's more, when I added the Exit For, it just gets the information from the first one it finds and then exits.

    NOTHING matches the two -- and I can't find anything which does other than the size:

    Dim test As Object = info.Properties("Size").Value

    How were you doing it originally?

    This needs to be dealt with because currently it's not right and worse, it's falsely reporting data.

    I don't see where in the Win32_DiskDrive class it has information which relates it to either the volume label or the drive letter, and matching it to the size means nothing -- more than one drive can have identical sizes.


    As best I can tell, what's being returned by the methods in that class is the equivalent of this:


    Wednesday, January 29, 2014 10:11 PM
  • Here is the code I was using in my original app and running it seems to show correct information when comparing it with checking manually

    ' get free disk space (Free/Total)
            tbdiskspace.Clear()
            For Each drive As System.IO.DriveInfo In My.Computer.FileSystem.Drives
                If drive.IsReady Then
                    tbdiskspace.Text = tbdiskspace.Text & drive.Name
                    tbdiskspace.Text = tbdiskspace.Text & " - " & drive.VolumeLabel
                    tbdiskspace.Text = tbdiskspace.Text & " - " & FormatNumber(drive.AvailableFreeSpace / 1024 / 1024 / 1024, 2) & " Gb" & " / " & FormatNumber(drive.TotalSize / 1024 / 1024 / 1024, 2) & " Gb"
                    tbdiskspace.Text = tbdiskspace.Text & vbCrLf
                End If
            Next
    
            ' get SMART status for all drives
            ' only lists Fixed hard disk by checking MediaType, so it doesn't show card readers etc - could also do this by checking InterfaceType for IDE rather than USB
            Dim smart_query As String = "SELECT * FROM Win32_DiskDrive"
            Dim smart_searcher As New ManagementObjectSearcher(smart_query)
            For Each info As ManagementObject In smart_searcher.Get()
                If info.Properties("MediaType").Value = "Fixed hard disk media" Then
                    tbSmartStatus.Text = tbSmartStatus.Text & info.Properties("Caption").Value.ToString()
                    tbSmartStatus.Text = tbSmartStatus.Text & " : "
                    tbSmartStatus.Text = tbSmartStatus.Text & info.Properties("Status").Value.ToString()
                    tbSmartStatus.Text = tbSmartStatus.Text & vbCrLf
                End If
            Next info
    
            ' get failure predict status for all drives
            ' got this information from looking at the XML files created by perfmon /report (SMART Disk Check.xml)
            Dim failureprecict_searcher As New ManagementObjectSearcher("root\WMI", "SELECT * FROM MSStorageDriver_FailurePredictStatus")
            For Each info As ManagementObject In failureprecict_searcher.Get()
                If info.Properties("PredictFailure").Value = True Then
                    tbFailurePredictStatus.Text = "Disk Failure Possible"
                Else
                    tbFailurePredictStatus.Text = "OK"
                End If
            Next info
    
            ' check disk dirty bit
            Dim dirtybit_query As String = "SELECT * FROM Win32_LogicalDisk"
            Dim dirtybit_searcher As New ManagementObjectSearcher(dirtybit_query)
            For Each info As ManagementObject In dirtybit_searcher.Get()
                If info.Properties("DriveType").Value = "3" Then
                    tbDirtyBit.Text = tbDirtyBit.Text & info.Properties("Caption").Value.ToString()
                    If info.Properties("VolumeDirty").Value = False Then
                        tbDirtyBit.Text = tbDirtyBit.Text & " OK" & vbCrLf
                    Else
                        tbDirtyBit.Text = tbDirtyBit.Text & " Chkdsk required" & vbCrLf
                    End If
                End If
            Next info


    Darren Rose

    Wednesday, January 29, 2014 10:58 PM
  • I think the difference is I was showing the result separately, so could see which one related to which drive - see screenshot below of results in my app - for disk space I had shown drive letter and then for smart had to retrieve drive name as couldn't find drive letter etc - think that may be part of the reason perhaps?

    I am still up for an hour or so here, so will respond if any questions


    Darren Rose

    Wednesday, January 29, 2014 11:03 PM
  • I think the difference is I was showing the result separately, so could see which one related to which drive - see screenshot below of results in my app - for disk space I had shown drive letter and then for smart had to retrieve drive name as couldn't find drive letter etc - think that may be part of the reason perhaps?

    I am still up for an hour or so here, so will respond if any questions


    Darren Rose

    If one comes back bad, how do you know which drive it was?

    That's the one for the S.M.A.R.T. status but my point is the same - I don't see how you're going to match them to a drive letter or drive volume. Is that an issue or no?

    Either way, I need to modify the class for the disk information substantially, so please don't add to it yet - not until we get this resolved.

    I'm not going to work on it any more today though, either way. ;-)


    Please call me Frank :)


    Wednesday, January 29, 2014 11:07 PM
  • I assume we are just talking about the disk failure predict status here?

    As both the other routines (at least in the testing of my original code) show the disk it is referring too each time, so in the For Each routine it finds caption and status for each drive in turn, so we know they match i.e. for SMART it finds drive name (Samsung ssd 840 120gb) and then status (OK) - and same for dirty bit which gets caption and status this time caption holds drive letter so returns C: and OK etc

    The only one not doing it the same is disk failure predict which gets its info from a different WMI area (MSStorageDriver_FailurePredictStatus) - which doesn't show caption or anything, just an instance name, so makes it harder to tie it to a particular disk - see screenshot below

    Or am I completely missing your point here? quite possible I have had a drink or two ;)


    Darren Rose

    Wednesday, January 29, 2014 11:39 PM
  • Darren,

    My message didn't go through ... but anyway, I'll look more tomorrow.

    I don't see the connection in SMART for example -- I haven't gone to the others yet, but that specific class that the SMART is from has no connection to a drive letter or drive volume name.

    I'll look more tomorrow...


    Please call me Frank :)

    Wednesday, January 29, 2014 11:49 PM
  • Darren,

    My message didn't go through ... but anyway, I'll look more tomorrow.

    I don't see the connection in SMART for example -- I haven't gone to the others yet, but that specific class that the SMART is from has no connection to a drive letter or drive volume name.

    I'll look more tomorrow...


    Please call me Frank :)

    I use WMI explorer to view the information download here

    And if you look at screenshot below of win32_diskdrive you can see for each drive it has a CAPTION property which in example shows (Samsung SSD....) and the Status field showing OK


    Darren Rose

    Thursday, January 30, 2014 12:41 AM
  • Yes - and we can get that (I don't need the tool).

    But what hard drive is that?

    C:\, D:\, K:\ ?

    That's my point. It can't be associated as I have it currently - there's nothing to relate the two.


    Please call me Frank :)

    Thursday, January 30, 2014 12:49 AM
  • Ah yes, sorry I was being completely dim - that is why I had to divide up the results on my form as couldn't find no relation between the two different checks

    Darren Rose

    Thursday, January 30, 2014 1:43 AM
  • Reply from dev re best way of getting data from class to control

    ".... our GridControl supports data sources that implement one of the following interfaces: IList, IListSource, ITypedList or IBindingList. - they also suggested I read this"

    Just had second reply saying roughly the same "You can create your own custom class and then use the System.ComponentModel.BindingList<> or System.Collections.Generic.List<> generic types to create a list. Or, create a class encapsulating a list of records and implement the IList, IListSource, ITypedList or IBindingList interface for this class."

    As you said XML also seems to be an option


    Darren Rose



    • Edited by wingers Thursday, January 30, 2014 4:18 PM
    Thursday, January 30, 2014 2:44 PM
  • Reply from dev re best way of getting data from class to control

    ".... our GridControl supports data sources that implement one of the following interfaces: IList, IListSource, ITypedList or IBindingList. - they also suggested I read this"

    Just had second reply saying roughly the same "You can create your own custom class and then use the System.ComponentModel.BindingList<> or System.Collections.Generic.List<> generic types to create a list. Or, create a class encapsulating a list of records and implement the IList, IListSource, ITypedList or IBindingList interface for this class."

    As you said XML also seems to be an option


    Darren Rose



    Ok, we can deal with that when we get there.

    This thing about the disk checking is where my head has been. How about try this latest version uploaded here and tell me what you think about this concept?


    Please call me Frank :)

    Thursday, January 30, 2014 4:30 PM
  • Ok, we can deal with that when we get there.

    This thing about the disk checking is where my head has been. How about try this latest version uploaded here and tell me what you think about this concept?


    Please call me Frank :)

    Hi Frank

    Getting this exception - "Exception Message: The signature returned null.Process Which Caused Exception: Get Disk S.M.A.R.T Status" 

    But apart from that - yes I like the concept, it would show me all the information I need which is great

     

    Darren Rose

    Thursday, January 30, 2014 4:45 PM
  • Hi tried commenting out the signature section (lines 1396-1400), but then I get

    Exception Message: The size returned null.
    Process Which Caused Exception: Get Disk S.M.A.R.T Status

    Examining all my disks using the WMI explorer shows that one of my hard disks (my Samsung SSD) has nothing under signature - and size is empty (null) on devices it finds which are not hard disks, in my case card reader slots

    Perhaps we could filter on either InterfaceType which shows USB for the card readers it is showing and IDE for the disks (even though they are SATA!) - or perhaps MediaType which shows Fixed hard disk media for the disks and is blank for the card readers?


    Darren Rose


    • Edited by wingers Thursday, January 30, 2014 4:59 PM added suggestion at end
    Thursday, January 30, 2014 4:54 PM
  • Getting this exception - "Exception Message: The signature returned null.Process Which Caused Exception: Get Disk S.M.A.R.T Status" 

    At least my exception handling worked.

    Let me think about how best to work around this. Is the signature of value to you? You may not know if yours didn't show it, but this is what mine returned:

    Here's my thinking: Instead of throwing an exception, I can set it to something like "No Value Returned" (as a string). so that it continues to get the rest of the information. What do you think of that notion?


    Please call me Frank :)

    Thursday, January 30, 2014 4:57 PM
  • Hi tried commenting out the signature section (lines 1396-1400), but then I get

    Exception Message: The size returned null.
    Process Which Caused Exception: Get Disk S.M.A.R.T Status

    Examining all my disks using the WMI explorer shows that one of my hard disks (my Samsung SSD) has nothing under signature - and size is empty (null) on devices it finds which are not hard disks, in my case card reader slots

    Perhaps we could filter on either InterfaceType which shows USB for the card readers it is showing and IDE for the disks (even though they are SATA!) - or perhaps MediaType which shows Fixed hard disk media for the disks and is blank for the card readers?


    Darren Rose


    I should have thought to ensure it's a fixed drive, so in addition to what I just said, I'll make sure that first it's the correct type drive.

    How's that sound?


    Please call me Frank :)

    Thursday, January 30, 2014 5:01 PM
  • yes exception handling works like a dream!

    I don't think signature is really of any value at all, so could be removed

    And yes could either do as you say so it reports no value.. or as per my amendment above

    "Perhaps we could filter on either InterfaceType (which shows USB for the card readers it is showing and IDE for the disks (even though they are SATA!)) - or perhaps MediaType (which shows Fixed hard disk media for the disks and is blank for the card readers)?"


    Darren Rose

    Thursday, January 30, 2014 5:03 PM
  • I should have thought to ensure it's a fixed drive, so in addition to what I just said, I'll make sure that first it's the correct type drive.

    How's that sound?


    Please call me Frank :)

    yes that sounds perfect

    Darren Rose

    Thursday, January 30, 2014 5:05 PM
  • P.S. Think manufacturer could possibly go under the SMART as well - from some quick research it never appears as anything other than (Standard disk drives) so not sure if much use

    Really love all the extra information you have found as well i.e. configuration manager status :)


    Darren Rose

    Thursday, January 30, 2014 5:11 PM
  • P.S. Think manufacturer could possibly go under the SMART as well - from some quick research it never appears as anything other than (Standard disk drives) so not sure if much use

    Really love all the extra information you have found as well i.e. configuration manager status :)


    Darren Rose

    Well, part of my thinking here is this: The fact that your users will see this, even if it's not *really* of any value to you in diagnosis, dress to impress. ;-)

    Try this version and let me know please. It's the same name as the zip file earlier, but I overwrote it with this latest one.


    Please call me Frank :)

    Thursday, January 30, 2014 5:16 PM
  • Well, part of my thinking here is this: The fact that your users will see this, even if it's not *really* of any value to you in diagnosis, dress to impress. ;-)

    Try this version and let me know please. It's the same name as the zip file earlier, but I overwrote it with this latest one.


    Please call me Frank :)

    Yes that is a fair point!

    Works fine for me now


    Darren Rose

    Thursday, January 30, 2014 5:43 PM
  • Yes that is a fair point!

    Works fine for me now

    Ok, then keep on with your new additions and let me know if you have a problem.

    Insofar as the control that you're going to use (from Dev), have you settled on that yet?


    Please call me Frank :)

    Thursday, January 30, 2014 5:50 PM
  • Ok, then keep on with your new additions and let me know if you have a problem.

    Insofar as the control that you're going to use (from Dev), have you settled on that yet?


    Please call me Frank :)

    Ok thanks - will do

    Yes I think the dev datagrid is the best option, as can lay it out like my rough image, with each section having an image for the group title - unless you have a better idea - although the "nice look" of it is more important for the export/report bit, so doesn't necessarily have to have the image on screen, I could just do that in the report - what do you think?


    Darren Rose

    Thursday, January 30, 2014 5:54 PM
  • Ok thanks - will do

    Yes I think the dev datagrid is the best option, as can lay it out like my rough image, with each section having an image for the group title - unless you have a better idea - although the "nice look" of it is more important for the export/report bit, so doesn't necessarily have to have the image on screen, I could just do that in the report - what do you think?

    Honestly I'm not sure.

    The issue is the "grouping" because there's nothing intrinsic to group things on. By that I mean there's nothing in the class(es) which say "ok this is in group so and so, and that's in group such and such".

    Normally you're dealing with [the equivelent of] a DataTable, and for that matter, we can make a DataTable in code if need be.

    While you spend the next few days adding the other stuff in, I'll think about how this might best be done with their controls.


    Please call me Frank :)

    Thursday, January 30, 2014 6:00 PM
  • Darren,

    How about use this version when you start adding. This latest one has the namespace in its own file (so that you can later easily reuse it).


    Please call me Frank :)

    Thursday, January 30, 2014 6:09 PM
  • Darren,

    How about use this version when you start adding. This latest one has the namespace in its own file (so that you can later easily reuse it).


    Please call me Frank :)


    Thanks - will do :)

    Darren Rose

    Thursday, January 30, 2014 6:38 PM
  • @Frank

    If you get a moment could you just take a look at the updated PC_Health.vb here

    I have added in Antivirus detection and all seems to work fine, just wanted you to glance over it and comment if I have done anything "wrong" before I start adding the rest

    Thank you


    Darren Rose

    Thursday, January 30, 2014 8:21 PM
  • @Frank

    If you get a moment could you just take a look at the updated PC_Health.vb here

    I have added in Antivirus detection and all seems to work fine, just wanted you to glance over it and comment if I have done anything "wrong" before I start adding the rest

    Thank you


    Darren Rose

    Looking only at the code of the class library (and I didn't look all the way through, just what you're doing to get the information), I see some issues.

    In the method (sub) that gets the information:

    First, you need to set "_currentProcess" to the currently running process. Do that as the first line in the Try so that it's set before any exceptions are thrown.

    Secondly, I see you're using a very old way of string manipulation (Mid). Consider using up-to-date dotNet methods like .Substring.

    A bigger concern is shown here:

    That doesn't even make sense. I'd suggest that you either set up three properties rather than one, or that you create a new class with three public properties (it's really the same thing if you think about it) then this property will return an instance of that new class.

    If it were me, no more than this is, I'd just use three properties in this class.

    At whatever point you're done adding these, hand the class library back to me (like you did here) and I'll go back through it to add/modify things. 

    I'm likewise going to be adding some things in the next days. I think I may have found a good way to display the data using a Dev control, but I'm in uncharted territory here as I've never used it before, so there's a learning curve. ;-)


    Please call me Frank :)

    Thursday, January 30, 2014 8:41 PM
  • Good morning Frank

    Thanks - corrections made as above, and MID replaced with .Substring

    All bits added for antivirus, antispyware and firewall (everything that appears on my security tab) - and appears to be working fine on all PC's here I tried it on - believe you may have different results running on XP though, as the information for av etc was stored in a different area of WMI back then - but that is not an issue for me as tool won't be used on XP machines

    updated PC_Health.vb here 

    Will start working on network tab next - this may take a bit longer as some of the code was quite complex and took a while for me to get working last time I did it :)


    Darren Rose


    • Edited by wingers Friday, January 31, 2014 2:02 PM
    Friday, January 31, 2014 2:01 PM
  • Good morning Frank

    Thanks - corrections made as above, and MID replaced with .Substring

    All bits added for antivirus, antispyware and firewall (everything that appears on my security tab) - and appears to be working fine on all PC's here I tried it on - believe you may have different results running on XP though, as the information for av etc was stored in a different area of WMI back then - but that is not an issue for me as tool won't be used on XP machines

    updated PC_Health.vb here 

    Will start working on network tab next - this may take a bit longer as some of the code was quite complex and took a while for me to get working last time I did it :)


    Darren Rose


    Ok I'll wait until you're done with it entirely. When you are, would you give me a synopsis of the changes made/additions please?

    I'm continuing to look into just how to get you as close as possible to what you want with Dev, and I'm at the point now of realizing that I need to write an entire program - the control alone is pointless without seeing it work in context.

    I might be a day or two doing that though (obviously 'real work' has to come first).


    Please call me Frank :)

    Friday, January 31, 2014 2:15 PM
  • Ok I'll wait until you're done with it entirely. When you are, would you give me a synopsis of the changes made/additions please?

    I'm continuing to look into just how to get you as close as possible to what you want with Dev, and I'm at the point now of realizing that I need to write an entire program - the control alone is pointless without seeing it work in context.

    I might be a day or two doing that though (obviously 'real work' has to come first).


    Please call me Frank :)

    Yes that is fine, I will work on it over weekend and then send it to you - complete with synopsis of changes made

    No problem at all - I completely understand real work has to come first - I appreciate you finding the time to do this for me :)


    Darren Rose

    Friday, January 31, 2014 2:17 PM
  • Yes that is fine, I will work on it over weekend and then send it to you - complete with synopsis of changes made

    No problem at all - I completely understand real work has to come first - I appreciate you finding the time to do this for me :)

    Darren,

    I still have a long ways to go but I wanted to show you what I have to make sure we're on the same page with things.

    Here's what I have so far:

    Your thoughts?


    Please call me Frank :)

    Friday, January 31, 2014 4:17 PM
  • Frank

    One word - "Fantastic!!!"

    Looks really good and yes definitely along the lines I was thinking

    What "dev" control are you using for this?

    I am flying along adding the network bits (much to my surprise!!)


    Darren Rose

    Friday, January 31, 2014 4:33 PM
  • Frank

    One word - "Fantastic!!!"

    Looks really good and yes definitely along the lines I was thinking

    What "dev" control are you using for this?

    I am flying along adding the network bits (much to my surprise!!)


    Darren Rose

    I don't know why they didn't suggest it, but that's a VerticalGridControl which is inside a DockingPanel. Currently I have the "Docking" part disabled, but I'm thinking that I'll have to re-enable it. 

    I'm using it unbound mode (which you can't do with their normal DataView), but I'll be faced with an issue when I get to the hard drives - because that's a list (three lists actually).

    I think I'll rename this one and call it "Overview" or something else if you can think of?

    Then I'll create ... something ... for the hard drives' information.

    Any suggestions on how to deal with the hard drive information?


    Please call me Frank :)


    Friday, January 31, 2014 4:40 PM
  • I don't know why they didn't suggest it, but that's a VerticalGridControl which is inside a DockingPanel. Currently I have the "Docking" part disabled, but I'm thinking that I'll have to re-enable it. 

    I'm using it unbound mode (which you can't do with their normal DataView), but I'll be faced with an issue when I get to the hard drives - because that's a list (three lists actually).

    I think I'll rename this one and call it "Overview" or something else if you can think of?

    Then I'll create ... something ... for the hard drives' information.

    Any suggestions on how to deal with the hard drive information?


    Please call me Frank :)


    No idea why they didn't mention it - but looks perfect for the job

    I'll have a think about it - unfortunately I have got to pop out for couple of hours and do some paid work, but will give it some thought whilst I am driving


    Darren Rose

    Friday, January 31, 2014 4:59 PM
  • I'll have a think about it - unfortunately I have got to pop out for couple of hours and do some paid work, but will give it some thought whilst I am driving

    This is one way we could do it. The fact that I'm using dockable panels, I've set this up (but haven't and won't continue it until I hear back from you).

    When the diagnostics test is completed, they don't see the results but rather, they see this:

    As you can see there, there are four panels docked to the bottom as tabs. If they hover their mouse over any of them they'll see it slide up into view:

    As with Visual Studio, they can "pin" it in place if they want to or just move the mouse off of the panel and it slides back down as a tab, then they can look at the others if they want.

    It's not as ideal as I think you had in mind, but I don't see any practical way to show everything in any one control (and it would be too much information to feasibly show "all at once" anyway).

    Let me know what you think.


    Please call me Frank :)

    Friday, January 31, 2014 5:47 PM
  • That idea seems fine to me, as you say it is not so easy to show the disk information in such a simple way as the rest of the "overview" as it contains so much more information - so have no problem with that method

    In fact that might work well, as I wanted to add the rest of the performance information (i.e. like the CPU bit which you did, but also for network, disk, memory - I have working code for this..) and then show the results using "devs" gauges - so that might work well as could have another panel at the bottom titled performance to show it on - and I could modify the routine for cpu usage, so it tests all items in the same loop, so they all get an average result perhaps

    I have completed adding all the network bits - and when I am back home again (in an hour or so) I will upload it along with an overview of the changes I made

    Thoughts/queries re the network bits I have added:-

    1) Hosts file - perhaps needs changing to show it in a better way, but have left it as is for now as it is working, just not looking tidy! - can play more later if needed

    2) Network info section - retrieves lots of information here so have left in one section as does several checks to make sure correct card, is enabled, not a virtual or teredo tunnel adapter etc etc before it runs - works okay, but perhaps a better solution to this?

    3) Please comment on anything I have done that you would do differently - helps with my learning from a pro!! ;)

    Misc question:-

    1) For the progress steps (i.e. step 2 of 12 etc), I notice it uses several steps for the one task of CPU usage, could this be just one step, or is that an issue because it repeats the test several times to get a result? just a thought, not really an issue either way - in fact could always split this bit away into a separate file/class anyway so it is a separate test to do the performance bit and show it as mentioned above


    Darren Rose


    • Edited by wingers Friday, January 31, 2014 6:06 PM
    Friday, January 31, 2014 6:05 PM
  • That idea seems fine to me, as you say it is not so easy to show the disk information in such a simple way as the rest of the "overview" as it contains so much more information - so have no problem with that method

    In fact that might work well, as I wanted to add the rest of the performance information (i.e. like the CPU bit which you did, but also for network, disk, memory - I have working code for this..) and then show the results using "devs" gauges - so that might work well as could have another panel at the bottom titled performance to show it on - and I could modify the routine for cpu usage, so it tests all items in the same loop, so they all get an average result perhaps

    I have completed adding all the network bits - and when I am back home again (in an hour or so) I will upload it along with an overview of the changes I made

    Thoughts/queries re the network bits I have added:-

    1) Hosts file - perhaps needs changing to show it in a better way, but have left it as is for now as it is working, just not looking tidy! - can play more later if needed

    2) Network info section - retrieves lots of information here so have left in one section as does several checks to make sure correct card, is enabled, not a virtual or teredo tunnel adapter etc etc before it runs - works okay, but perhaps a better solution to this?

    3) Please comment on anything I have done that you would do differently - helps with my learning from a pro!! ;)

    Misc question:-

    1) For the progress steps (i.e. step 2 of 12 etc), I notice it uses several steps for the one task of CPU usage, could this be just one step, or is that an issue because it repeats the test several times to get a result? just a thought, not really an issue either way - in fact could always split this bit away into a separate file/class anyway so it is a separate test to do the performance bit and show it as mentioned above


    Darren Rose


    That's a lot to take in. ;-)

    *****

    I'm not a pro! I'm a mechanical engineer who likes doing programming, but ... I'm far from anything even closely resembling a pro!

    *****

    Networking, I can't help at all with as I've pretty much no idea about that and I'm not connected to a network (well, other than the internet).

    *****

    The additional steps shown getting the CPU Usage - that's optional of course and initially I had it as you say: Just one step. After I tested it then, it occurred to me that since there's no progress being shown during that time, it *appears* that the program locked up, so that's when I dropped back and added each loop as a step.

    *****

    I think that I'll not add your new stuff in, not yet at least. .

    I want to have a complete working program including printing and exporting to PDF and all that and my goal is that "before the end of the weekend" with no more specificity than that because I'm in an uncharted area that I've never used before, so who knows what issues might come up as I continue, but I'll use the four docking panels as I showed earlier and see where it all goes.

    :)


    Please call me Frank :)

    Friday, January 31, 2014 6:16 PM
  • yes sorry about that - just saying things as I thought of them, and I had lots of thoughts at once ;)

    Well compared to me you certainly are - I have learnt so much in the last few days!

    Most of the network is not that in depth - and is only to do with internet connection really anyway, just get IP. DNS etc etc - I am not on network either and neither are 95% of my clients, it is just "home networks" i.e. connections to routers for internet access

    Yes that make sense re the CPU progress - hadn't thought of it like that - again will re-think as may be worth pulling it out to a separate test as results will be shown differently

    Thanks, will upload code and changes anyway later as not much more I can do with it for now


    Darren Rose

    Friday, January 31, 2014 6:26 PM
  • Nix on the floating panels.

    Now I remember why I never did much more with these: It's just too difficult to work with during design time because they're not "docked" then. Oh I can muddle around with it and get what I want then go to the properties and reset everything, but ... what a serious pain that is.

    I'm going to use another way entirely if you're ok with that?

    My more typical approach is to use a NavigatorBar (a Dev control) docked the left and a container control on the right docked to fill the remaining area. The user clicks the link in the navigator and that "page" opens up on the right. I think you'll like the effect, but it's wholly different than what I've shown here.

    Are you ok with that?


    Please call me Frank :)

    Friday, January 31, 2014 6:28 PM
  • This gives you an idea of what I mean about the navigator.

    I like that better also because it lends well to being able to add many other sections/items.

    Your thoughts?


    Please call me Frank :)

    Friday, January 31, 2014 6:56 PM
  • Nix on the floating panels.

    Now I remember why I never did much more with these: It's just too difficult to work with during design time because they're not "docked" then. Oh I can muddle around with it and get what I want then go to the properties and reset everything, but ... what a serious pain that is.

    I'm going to use another way entirely if you're ok with that?

    My more typical approach is to use a NavigatorBar (a Dev control) docked the left and a container control on the right docked to fill the remaining area. The user clicks the link in the navigator and that "page" opens up on the right. I think you'll like the effect, but it's wholly different than what I've shown here.

    Are you ok with that?


    Please call me Frank :)

    Yes I am okay with that - if it that much of a pain using floating panels for you, then I definitely would struggle with them!!!

    Navigator bar sounds good - kind of an outlook style menu I presume?

    updated PC_Health.vb including notes on changes made here 


    Darren Rose

    Friday, January 31, 2014 6:58 PM
  • This gives you an idea of what I mean about the navigator.

    I like that better also because it lends well to being able to add many other sections/items.

    Your thoughts?


    Please call me Frank :)

    yes that's fine - looks good, and gives the ability to add more items later if needed - in fact "overview" could be split up so have separate section for operating system, network, security etc down the side

    Darren Rose


    • Edited by wingers Friday, January 31, 2014 7:01 PM
    Friday, January 31, 2014 7:00 PM
  • ... in fact "overview" could be split up so have separate section for operating system, network, security etc down the side

    I'll do that now as I've got to start all over (what's shown is a new project).

    Tell me what all of them should be and in what order (top to bottom) they should be in please?


    Please call me Frank :)

    Friday, January 31, 2014 7:05 PM
  • ... in fact "overview" could be split up so have separate section for operating system, network, security etc down the side

    I'll do that now as I've got to start all over (what's shown is a new project).

    Tell me what all of them should be and in what order (top to bottom) they should be in please?


    Please call me Frank :)

    Operating System

    Hardware

    Security

    Storage

    Network


    Darren Rose

    Friday, January 31, 2014 7:08 PM
  • ... in fact "overview" could be split up so have separate section for operating system, network, security etc down the side

    I'll do that now as I've got to start all over (what's shown is a new project).

    Tell me what all of them should be and in what order (top to bottom) they should be in please?


    Please call me Frank :)

    Operating System

    Hardware

    Security

    Storage

    Network


    Darren Rose

    Ok, I'll lay it out like that then.

    Do you have any sort of logo art or anything along those lines?


    Please call me Frank :)

    Friday, January 31, 2014 7:11 PM
  • Ok, I'll lay it out like that then.

    Do you have any sort of logo art or anything along those lines?


    Please call me Frank :)

    Haven't sorted images for rest of it - but got logo here

    Darren Rose

    Friday, January 31, 2014 7:15 PM
  • Haven't sorted images for rest of it - but got logo here

    That looks good - very ingenius really!

    I was thinking "PC Health" and though you can't use this one (it's copyrighted I feel sure), I thought this was inventive:

    At any rate I'll get going on this. I should have something back at least by Sunday. I still have the rest of the work day today, but tomorrow I should be able to devote to it.


    Please call me Frank :)

    Friday, January 31, 2014 7:19 PM
  • Haven't sorted images for rest of it - but got logo here

    That looks good - very ingenius really!

    I was thinking "PC Health" and though you can't use this one (it's copyrighted I feel sure), I thought this was inventive:

    At any rate I'll get going on this. I should have something back at least by Sunday. I still have the rest of the work day today, but tomorrow I should be able to devote to it.


    Please call me Frank :)

    The one I use on my paperwork for health checks is this one - pc health check logo

    Darren Rose

    Friday, January 31, 2014 7:35 PM
  • Operating System

    Hardware

    Security

    Storage

    Network

    How about have a look at this before I get started on the wrong foot.

    You're showing "Storage" as a single item where I had the three individually (they're unrelated).

    If you want, I can consolidate it into a single link on the navigator then a tab control on that page, or should I leave the as three in the navigator?


    Please call me Frank :)

    Friday, January 31, 2014 7:39 PM
  • How about have a look at this before I get started on the wrong foot.

    You're showing "Storage" as a single item where I had the three individually (they're unrelated).

    If you want, I can consolidate it into a single link on the navigator then a tab control on that page, or should I leave the as three in the navigator?


    Please call me Frank :)

    That looks fine

    Personally think it would look better to just have storage on the left and then it divided up into tabs on the right - but please whatever is easiest for you to do really, as appreciate the time you are spending on it


    Darren Rose

    Friday, January 31, 2014 8:03 PM
  • That looks fine

    Personally think it would look better to just have storage on the left and then it divided up into tabs on the right - but please whatever is easiest for you to do really, as appreciate the time you are spending on it

    Ok, I should have something back to you by Sunday sometime then.


    Please call me Frank :)

    Friday, January 31, 2014 8:06 PM
  • That looks fine

    Personally think it would look better to just have storage on the left and then it divided up into tabs on the right - but please whatever is easiest for you to do really, as appreciate the time you are spending on it

    Ok, I should have something back to you by Sunday sometime then.


    Please call me Frank :)

    Thanks

    Just one point - I notice under report you have print preview which is fine, but as well as printing I would need to "save" or "export" the report so I can edit it later before sending on to customer  - probably not an issue, but didn't want to not say it before you did that bit!


    Darren Rose

    Friday, January 31, 2014 8:10 PM
  • Just one point - I notice under report you have print preview which is fine, but as well as printing I would need to "save" or "export" the report so I can edit it later before sending on to customer  - probably not an issue, but didn't want to not say it before you did that bit!

    The print preview will allow you to print directly to the printer or export it to PDF, HTML, RTF, and a variety of other formats. It exports what [would be] sent to the printer.

    Tell me what you mean about saving though? Save what? Wouldn't they want to just re-run the diagnostics?

    *****

    While I'm on that, once it's been run should they have the ability to re-run it? I honestly can't think why they'd want to (nothing changed?), but I can do it either way.


    Please call me Frank :)

    Friday, January 31, 2014 8:17 PM
  • The print preview will allow you to print directly to the printer or export it to PDF, HTML, RTF, and a variety of other formats. It exports what [would be] sent to the printer.

    Tell me what you mean about saving though? Save what? Wouldn't they want to just re-run the diagnostics?

    *****

    While I'm on that, once it's been run should they have the ability to re-run it? I honestly can't think why they'd want to (nothing changed?), but I can do it either way.


    Please call me Frank :)

    that's fine then - as long as I can get a copy saved (exported) in RTF or PDF then not a problem

    When I do a PC Health Check for a customer I do all these tests, but also manually check some bits and update software etc etc - I then add this information to the report and a comment on general state of system etc etc before I then email it to the customer - so I tend to need to edit it before its sent - but that is fine as can do that with PDF or RTF easily enough :)

    No should be no reason to run it again once done, as you say nothing will have changed so no point


    Darren Rose

    Friday, January 31, 2014 8:31 PM