Jump to content
Sign in to follow this  

Help with my programme on mothly expense... :((

Recommended Posts

Hi guys,

I'm currently working on a project on my monthly expense. The idea of the project is that everyday, I'll tell the programme the amount of money that I spend during the day (spend to do what, and how much to spend). Then, the programme will put all that information to the database, and show me the report about: how much money I spend over the past few days, or over the past month, blah blah blah... Because I need some kind of a report, so I think ListView would suit my purpose. However, when working on the project, I run into some minor problems, and I'll be very thankful if anyone can give me a little push. :x

  • Firstly, because I can have income, as well as expense in one month. So, I just wonder if there is anyway to change the color of each line in the ListView so that I can easily observe and inspect it. What I mean is:

    • The income lines will be shown in green.
    • And, the expense lines will be shown in red.
    • And, the Total amount of money will be in bold.
  • And I don't really know if I can highlight some of the rows that need attention. Is that possible in ListView?
  • Secondly, my currency is Vietnamese Dong (VND), and I can spend up to 1 million VND per day. So I want to put a comma after 3 number of digits (mainly for easy-reading). What I mean is, 1000000 will be shown as 1,000,000 in the report. I've also written a short function to do that, but I don't think it's efficient enough. My function is:

    Func PutCommas($Expression)
        $s = StringInStr($Expression, ",")
        If $s = 0 Then
            $s = StringInStr($Expression, ".")
            If $s = 0 Then
                $s = StringLen($Expression)
                $s -= 1
            $s -= 3
            While $s > 0
                $Expression = StringLeft($Expression, $s) & "," & StringRight($Expression, StringLen($Expression) - $s)
                $s -= 3
        Return $Expression

    Is there's any premade function, or UDF that can do the same task but takes less time? My function seems to be very time-consuming when working with lots of numbers.

  • Thirdly, I don't really know if there's any way that a user can edit directly in a ListView control? I can create an Edit Button, such that, whenever the user click on it, an Input Box appear (containing the data of the selected Row in the ListView) so that the user edit the information stored in that row. But, well is there anyway that I can do the edit right in the ListView, directly?
  • And last but not least, Assembly Language is well-known for its lightning speed. So, I think I can put some time-consuming part to Assembly to make my programme faster. However, I'm completely naive in Assembly, I haven't studied it before... :nuke: So... Can anyone please recommend me some good tutorial so that I can self-study it? :P

Thanks guys a lot in advance,

And have a great day, :shifty:

Edited by eEniquEe

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...