Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 13th, 2006, 03:09 PM
Drigo2012 Drigo2012 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Location: South Florida, USA
Posts: 1 Drigo2012 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 17 sec
Reputation Power: 0
Need help with a VB program

Well, the program im writing looks like its got no errors, but when I run it doesnt work(When I want to Display the Final Costs, etc. It displays 0 ), maybe I got something wrong with it, plz help:

(Its not complete yet)

PHP Code:
 Option Strict On
Public Class frmHotelBillingApp
    
Const _decUStoMex As Decimal 18.852D
    

    
Private Sub frmHotelBillingApp_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        Threading
.Thread.Sleep(1000)
    
End Sub

    
Private Sub cboTypeofRoom_SelectedIndexChanged(ByVal sender As ObjectByVal e As System.EventArgsHandles cboTypeofRoom.SelectedIndexChanged
        
        Me
.cboCurrency.Visible True

    End Sub
    
Private Function KingStandard(ByVal decSubTotal As Decimal) As Decimal
        decSubTotal 
235D
        
Return decSubTotal
    End 
Function

    Private Function 
KingSuite(ByVal decSubTotal As Decimal) As Decimal
        decSubTotal 
280D
        
Return decSubTotal
    End 
Function

    Private Function 
QueenStandard(ByVal decSubTotal As Decimal) As Decimal
        decSubTotal 
255D
        
Return decSubTotal
    End 
Function

    Private Function 
QueenSuite(ByVal decSubTotal As Decimal) As Decimal
        decSubTotal 
310D
        
Return decSubTotal
    End 
Function


    Private 
Sub cboCurrency_SelectedIndexChanged(ByVal sender As System.ObjectByVal e As System.EventArgsHandles cboCurrency.SelectedIndexChanged
        Me
.cboNofNights.Visible True
    End Sub
    
Private Function US(ByVal decTax As Decimal) As Decimal
        decTax 
7D
        
Return decTax
    End 
Function

    Private Function 
Mex(ByVal decTax As Decimal) As Decimal
        decTax 
18.5D
        
Return decTax
    End 
Function


    Private 
Sub cboNofNights_SelectedIndexChanged(ByVal sender As System.ObjectByVal e As System.EventArgsHandles cboNofNights.SelectedIndexChanged
        Dim intNumberofNightsChoice 
As Integer
        Dim decFinalCost 
As Decimal
        Dim intRoomTypeChoice 
As Integer
        Dim intCurrencyChoice 
As Integer
        Dim decSubTtal 
As Decimal
        Dim decTax 
As Decimal


        intCurrencyChoice 
Me.cboCurrency.SelectedIndex
        intRoomTypeChoice 
Me.cboTypeofRoom.SelectedIndex
        intNumberofNightsChoice 
Me.cboNofNights.SelectedIndex

        Me
.lblFCost.Visible True
        Me
.lblSubotal.Visible True
        Me
.lblTaxes.Visible True

        Select 
Case intRoomTypeChoice
            
Case 0
                KingStandard
(decSubTtal)
            Case 
1
                KingSuite
(decSubTtal)
            Case 
2
                QueenStandard
(decSubTtal)
            Case 
3
                QueenSuite
(decSubTtal)
        
End Select

        Select 
Case intCurrencyChoice
            
Case 0
                US
(decTax)
            Case 
1
                Mex
(decTax)
        
End Select

        Select 
Case intNumberofNightsChoice
            
Case 0
                decFinalCost 
decSubTtal decTax
                Me
.lblTax.Visible True
                Me
.lblTax.Text decTax.ToString("P")
                
Me.lblSub.Visible True
                Me
.lblSub.Text decSubTtal.ToString("C")
                
Me.lblTot.Visible True
                Me
.lblTot.Text decFinalCost.ToString("C")
            Case 
1
                
'  Me.lblTax.Visible = True
                '  
Me.lblTax.Text "$"
                '  Me.lblSub.Visible = True
                '  
Me.lblSub.Text "$"
                '  Me.lblTot.Visible = True
                '  
Me.lblTot.Text "$"
            
Case 2
                
'  Me.lblTax.Visible = True
                '  
Me.lblTax.Text "$"
                '  Me.lblSub.Visible = True
                '  
Me.lblSub.Text "$"
                '  Me.lblTot.Visible = True
                '  
Me.lblTot.Text "$"
            
Case 3
                
'  Me.lblTax.Visible = True
                '  
Me.lblTax.Text "$"
                '  Me.lblSub.Visible = True
                '  
Me.lblSub.Text "$"
                '  Me.lblTot.Visible = True
                '  
Me.lblTot.Text "$"
            
Case 4
                
'  Me.lblTax.Visible = True
                '  
Me.lblTax.Text "$"
                '  Me.lblSub.Visible = True
                '  
Me.lblSub.Text "$"
                '  Me.lblTot.Visible = True
                '  
Me.lblTot.Text "$"
            
Case 5
                
'  Me.lblTax.Visible = True
                '  
Me.lblTax.Text "$"
                '  Me.lblSub.Visible = True
                '  
Me.lblSub.Text "$"
                '  Me.lblTot.Visible = True
                '  
Me.lblTot.Text "$"
            
Case 6
                
'  Me.lblTax.Visible = True
                '  
Me.lblTax.Text "$"
                '  Me.lblSub.Visible = True
                '  
Me.lblSub.Text "$"
                '  Me.lblTot.Visible = True
                '  
Me.lblTot.Text "$"
        
End Select
        
    End Sub

    
Private Sub btnExit_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles btnExit.Click
        Me
.Close()
    
End Sub
End 
Class 

Reply With Quote
  #2  
Old December 14th, 2006, 05:59 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,932 Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 15th Grade (Above 100000 Reputation Level)  Folding Points: 391471 Folding Title: Super Ultimate Folder - Level 1Folding Points: 391471 Folding Title: Super Ultimate Folder - Level 1Folding Points: 391471 Folding Title: Super Ultimate Folder - Level 1Folding Points: 391471 Folding Title: Super Ultimate Folder - Level 1Folding Points: 391471 Folding Title: Super Ultimate Folder - Level 1Folding Points: 391471 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 12 h 17 m 53 sec
Reputation Power: 2002
--moved to the Visual Basic forum, other thread has been removed.

please be more specific - what is the relevant code that does not work as expected?

Reply With Quote
  #3  
Old December 17th, 2006, 09:35 AM
LozWare's Avatar
LozWare LozWare is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jun 2005
Posts: 531 LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 10 h 56 m 31 sec
Reputation Power: 46
Send a message via MSN to LozWare
Are you getting any solid errors, or does the program just not function the way it should do? Like Shadow said - we need more info.
__________________
LozWare Website Directory

Whooo! Free submissions, no recip needed. I'm a nice guy

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Need help with a VB program


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT