Results 1 to 5 of 5

Thread: suggestions and questions for my project

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    suggestions and questions for my project

    My project is for a water company that keeps track of all the customers and their bills. The user can edit the customer information (which is in a database), view/print the bill, view/print the company's state so far, and edit the rates of different water volumes. The bill is calculated according the the amount of water that the customer consumed so we have some limitation and rates for certain number of volumes.

    I had some problems with this project before, and thanks to Chris and Beachbum for the help on printing the bills and helping with the algorithm

    I am almost done the project except the main screen (which links to all the other sections of the program), and I'm also having some problems.

    First problem is this:
    ->Run the program (you will be presented with the main screen maximized)
    ->go to some other section by clicking on one of the buttons. The other form will also be maximized
    ->now, resize the other form so that it's not maximized
    ->go the main menu by clicking on "Go to Main Menu" button

    You'll get an error message saying that the form can't be resized while minimized or maximized because you try to resize the main screen when it's maximized.
    Here is the code I'm using:

    VB Code:
    1. 'we will now show the main screen and hide this one
    2.     '....
    3.     'if this form is maximized then we maximize the main screen
    4.     If Me.WindowState = vbMaximized Then
    5.         mainscreen.WindowState = vbMaximized
    6.     Else
    7.         'if not, then we just resize the main screen so it's is
    8.         'of the same size as this form is
    9.         mainscreen.Move Me.Left, Me.Top, Me.Width, _
    10.             Me.Height
    11.     End If
    12.     'hide this form
    13.     Me.Hide
    14.     'show the main screen
    15.     mainscreen.show

    What else should I put in there so it works fine?

    Second Problem:
    When you view the bill, it shows you the amount of bill in dollars. It should format it to 2 decimal places but it does not do that for the bill less than $10. Here is line of code I'm using:

    VB Code:
    1. txtBill.Text = Format(mybill, "$####.##")

    Also, if you get any "Subscripts Out of Range" error then please let me know.

    Please also give me some suggestions on how should I create the main screen. Also does the background look good? Should I change it, and change it to what kind of backgorund? How about the layout and different colours used?
    Baaaaaaaaah

  2. #2

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Baaaaaaaaah

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    no buddy?
    Baaaaaaaaah

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    I can't download your project.
    It seems like geocities doesn't allow you to link to a file like that from an other site.
    But what I see from the code you posted I would suggest the following changes:
    VB Code:
    1. 'if not, then we just resize the main screen so it's is
    2.         'of the same size as this form is
    3.         mainscreen.WindowStyle = vbNormal
    4.         mainscreen.Move Me.Left, Me.Top, Me.Width, _
    5.             Me.Height
    and to correctly format the currency
    VB Code:
    1. txtBill.Text = Format(mybill, "$###0.00")
    Best regards

  5. #5

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    You can try copying the link and then pasting it as the URL.

    1. I have already tried this and it still shows me that error message.
    2. Thanks, I shall try it.
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width