Archive for December, 2006

On Error GoTo (Church web hosting) label|0|-1 label Use: Either label,

Friday, December 29th, 2006

On Error GoTo label|0|-1 label Use: Either label, 0, or -1 is required A valid label within the subroutine Syntax 2 On Error Resume Next Description Enables or disables error handling within a procedure. If you don’t use an OnError statement or a Try…Catch block in your procedure, or if you have explicitly switched off error handling, the Visual Basic runtime engine will automatically handle the error. First, it will display a dialog box containing the standard text of the error message, something that many users are likely to find incomprehensible. Second, it will terminate the application. So any error that occurs in the procedure will produce a fatal runtime error. Rules at a Glance Syntax 1 The 0 argument disables error handling within the procedure until the next OnError statement is executed. The -1 argument disables an enabled exception in the current procedure. (It resets the exception to Nothing). The label argument specifies the label that defines an error-handling routine within the current procedure. Should an error occur, the procedure will be branched to this error-handling routine. A subroutine label must be suffixed with a colon. In addition, you cannot use a VB reserved word for a subroutine label name. For example: someroutine: label must be in the same procedure as the OnError statement. Syntax 2 When a runtime error occurs, program execution continues with the program line following the line that generated the error. Programming Tips and Gotchas If you have no error handling in your procedure or if error handling is disabled, the VB runtime engine will trace back through the call stack until a procedure is reached where error handling is enabled. In that case, the error will be handled by that procedure. However, if no error handler can be found in the call stack, a runtime error occurs, and program execution is halted. OnErrorResumeNext is useful in situations either where you are certain that errors will occur or where the errors that could occur are minor. The following example shows how you can quickly cycle through the controls on a form and set the Text property to an empty string without checking what type of control you’re dealing with. Of course, you are aware that many of the controls don’t have a text property, so that the attempt to access their Text property will

Hint: If you are looking for very good and affordable webspace to host and run your tomcat hosting application check Sandzak.com tomcat web hosting provider

Class Microsoft.VisualBasic.Conversion Syntax Oct(number) number Use: Required Data

Friday, December 29th, 2006

Class Microsoft.VisualBasic.Conversion Syntax Oct(number) number Use: Required Data Type: Numeric or string capable of conversion to a number A valid numeric or string expression Return Value String Description Returns the octal value of a given number Rules at a Glance If number is not already a whole number, it is rounded to the nearest whole number before being evaluated. If number is Nothing, an error occurs. Oct returns up to 11 octal characters. Programming Tips and Gotchas You can also use literals in your code to represent octal numbers by appending &O to the relevant octal value. For example, 100 decimal has the octal representation &O144. The following two statements assign an octal value to a variable: lngOctValue1 = &H200 ‘ Assigns 128 lngOctValue2 = “&O” & Len(dblNumber) ‘ Assigns 8 See Also Hex Function On Error Statement Syntax 1

Hint: If you are looking for very good and affordable webspace to host and run your java hosting application check Sandzak.com java web hosting provider

Data Type: Double The discount (Web hosting ssh) rate over the

Friday, December 29th, 2006

Data Type: Double The discount rate over the period, expressed as a decimal valuearray( ) Use: Required Data Type: Double An array of cash flow values Return Value A Double specifying the net present value Description Calculates the net present value of an investment based on a series of periodic variable cash flows (payments and receipts) and a discount rate. The net present value is the value today of a series of future cash flows discounted at some rate back to the first day of the investment period. Rules at a Glance rate must be a percentage expressed as a decimal. For example, 10% is expressed as 0.10. values is a one-dimensional array that must contain at least one negative value (a payment) and one positive value (a receipt). The NPV investment begins one period before the date of the first cash flow value and ends with the last cash flow value in the array. NPV requires future cash flows. If the first cash flow occurs at the beginning of the first period, the first value must be added to the value returned by NPV and must not be included in values. Programming Tips and Gotchas rate and the individual elements of values must reflect the same time period. For example, if values reflects annual cash flows, rate must be the annual discount rate. Individual members of values are interpreted sequentially. That is, values(0) is the first cash flow, values(1) is the second, etc. NPV is like the PV function, except that PV allows cash flows to begin either at the beginning or the end of a period and requires that cash flows be fixed throughout the investment. See Also FV Function, IPmt Function, NPer Function, Pmt Function, PPmt Function, PV Function, Rate Function Oct Function
Quick Hint: If you are looking for cheap and reliable provider to host and run your servlet application check Vision servlet hosting plans

Comcast web hosting - Try Dim dblRate, dblPV, dblPmt As Double Dim

Thursday, December 28th, 2006

Try Dim dblRate, dblPV, dblPmt As Double Dim lngNPer As Long dblPV = InputBox(”Enter the Credit Card balance: “) dblPmt = InputBox(”Enter the monthly payment: “) dblRate = InputBox(”Enter the monthly interest rate (.xxxx): “) lngNPer = NPer(dblRate, -dblPmt, dblPV, 0, 1) MsgBox(”Your credit card balance will be paid in ” & _ lngNPer & ” months.” & vbCrLf & “That’s ” & _ Int(lngNPer / 12) & ” years and ” & _ Math.Round(lngNPer Mod 12, 2) & ” months.”) Catch e As System.Exception MsgBox(”Unable to compute period because of error ” & e.Message) End Try End Sub Programming Tips and Gotchas Both rate and pmt must be expressed in the same time unit. That is, if pmt reflects the monthly payment amount, rate must be the monthly interest rate. NPer is useful in calculating the number of payment periods required to repay a loan when the monthly loan payment is fixed or when an approximate amount of a monthly payment is known. In this case, pv reflects the amount of the loan, and fv is usually 0, reflecting the fact that the loan is to be entirely repaid. NPer is useful in determining the length of time required to meet some future financial goal. In this case, pv represents the current level of savings, and fv represents the desired level of savings. See Also FV Function, IPmt Function, NPV Function, Pmt Function, PPmt Function, PV Function, Rate Function NPV Function Class Microsoft.VisualBasic.Financial Syntax NPV(rate, valuearray( ) ) rate Use: Required

Hint: This post is supported by Gama web hosting php mysql provider

Use: Required Data Type: Double The (Mac web hosting) payment to

Thursday, December 28th, 2006

Use: Required Data Type: Double The payment to be made each period. pv Use: Required Data Type: Double The present value of the series of future payments or receipts. fv Use: Optional Data Type: Double The future value of the series of payments or receipts. If omitted, the default value is 0. due Use: Optional Data Type: DueDate enumeration A value indicating when payments are due. DueDate.EndOfPeriod (0) indicates that payments are due at the end of the payment period; DueDate.BegOfPeriod (1) that payments are due at the beginning of the period. If omitted, the default value is 0. Return Value A Double indicating the number of payments Description Determines the number of payment periods for an annuity based on fixed periodic payments and a fixed interest rate Rules at a Glance rate is a percentage expressed as a decimal. For example, a monthly interest rate of 1% is expressed as 0.01. For pv and fv, cash paid out is represented by negative numbers; cash received is represented by positive numbers. Example Typically, the amount of time required to repay credit-card debt is never explicitly stated. The following program uses the NPer function to determine how much time is required to repay credit-card debt. Private Sub HowLongToPay( )

Hint: If you are looking for high quality and reliable webspace provider to host and run your jsp hosting application check Sandzak jsp web hosting provider

The date returned by Now takes the (Web hosting forums)

Thursday, December 28th, 2006

The date returned by Now takes the Windows General Date format based on the locale settings of the local computer. The U.S. setting for General Date is mm/dd/yy hh:mm:ss. The Now property is read-only. Example The following example returns the date 10 days from today: MsgBox(DateAdd(DateInterval.Day, 10, Now( ))) Programming Tips and Gotchas It is often overlooked that workstations in a modern Windows environment are at the mercy of the user! If your application relies on an accurate date and time setting, you should consider including a line in the workstation’s logon script to synchronize the time with one of the servers. Many so-called bugs have been traced to a workstation that has had its date or time incorrectly altered by the user. The following line of code, when added to the logon script of an Windows NT 4.0 machine, will synchronize the machine’s clock with that of a server called NTSERV1: net time \NTSERV1 /set The Now property is often used to generate timestamps. However, for short-term timing and intra-day timestamps, the Timer function, which returns the number of milliseconds elapsed since midnight, affords greater accuracy. The Now property wraps the BCL’s System.DateTime.Now shared property. As a result, calls to the System.DateTime.Now property offer a slight performance improvement (about 20%) over calls to the VB .NET Now property. See Also Today Property NPer Function Class Microsoft.VisualBasic.Financial Syntax NPer(rate, pmt, pv [, fv [, due]]) rate Use: Required Data Type: Double The interest rate per period. pmt
Hint: If you are looking for high quality webhost to host and run your jsp application check Vision web hosting jsp services

Namespace name component (Oscommerce hosting) types End Namespace name Use:

Wednesday, December 27th, 2006

Namespace name component types End Namespace name Use: Required Data Type: String literal The name of the namespace componenttypes Use: Required The elements that are being declared as part of the namespace, including Enums, Structures, Interfaces, Classes, and Delegates Description Declares a namespace and specifies the items in the namespace Rules at a Glance Namespaces are used in the .NET Framework as an organized method of exposing program components to other programs and applications. Namespaces are always Public. However, the elements within a namespace can be Public, Friend, or Private. Private members are available only within the namespace declaration. name, the namespace name, must be unique. Now Property Class Microsoft.VisualBasic.DateAndTime Syntax Now( ) Return Value A Date containing the current system date and time Description Returns the current date and time based on the system setting Rules at a Glance

Note: If you are looking for good and affordable webspace to host and run your servlet application check Sandzak servlet hosting services

Public Class Class1Derived Inherits Class1 Public Overrides Function (Google webspace)

Wednesday, December 27th, 2006

Public Class Class1Derived Inherits Class1 Public Overrides Function IncSalary(ByVal sSalary As Single) As Single IncSalary = sSalary * CSng(1.2) End Function End Class Now consider the following code, placed in a form module: Dim c1 As New Class1( ) Dim c2 As New Class1Derived( ) Dim c1var As Class1 c1var = c1 c1var.ShowIncSalary(10000) ‘ Shows 11000, 11000 c1var = c2 c1var.ShowIncSalary(10000) ‘ Shows 12000, 11000 The first call to ShowIncSalary is made using a variable of type Class1 that refers to an object of type Class1. In this case, both calls: Me.ShowIncSalary MyClass.ShowIncSalary return the same value, because they both call IncSalary in the base class Class1. However, in the second case, the variable of type Class1 holds a reference to an object of the derived class Class1Derived. In this case, Me refers to an object of type Class1Derived, whereas MyClass still refers to the base class Class1 wherein the keyword MyClass appears. Thus: Me.ShowIncSalary returns 12000, whereas: MyClass.ShowIncSalary returns 10000. VB .NET/VB 6 Differences The MyBase keyword is new to VB .NET. See Also Me Operator Namespace Statement Syntax

Hint: If you are looking for high quality and reliable webspace provider to host and run your jsp hosting application check Sandzak jsp web hosting provider

Web hosting isp - MyBase is commonly used to call back

Wednesday, December 27th, 2006

MyBase is commonly used to call back into the overridden member from the member that overrides it in the derived class. The MyBase keyword can be used to call the constructor of the base class to instantiate a member of that class, as in: MyBase.New(…) VB .NET/VB 6 Differences The MyBase keyword is new to VB .NET. MyClass Keyword Syntax MyClass Description MyClass is a reference to the class in which the keyword is used. Rules at a Glance When using MyClass (as opposed to Me) to qualify a method invocation, as in: MyClass.IncSalary( ) the method is treated as if it was declared using the NotOverridable keyword. Thus, regardless of the type of the object at runtime, the method called is the one declared in the class containing this statement (and not in any derived classes). The upcoming example illustrates this difference between MyClass and Me. MyClass cannot be used with shared members. Example The following code defines a class, Class1, and a derived class, Class1Derived, each of which has an IncSalary method. Public Class Class1 Public Overridable Function IncSalary(ByVal sSalary As Single) _ As Single IncSalary = sSalary * CSng(1.1) End Function Public Sub ShowIncSalary(ByVal sSalary As Single) MsgBox(Me.IncSalary(sSalary)) MsgBox(MyClass.IncSalary(sSalary)) End Sub End Class
Note: If you are looking for cheap and quality provider to host and run your java application check Astra java hosting services

VB .NET/VB 6 Differences In (Flash web hosting) VB 6, the

Wednesday, December 27th, 2006

VB .NET/VB 6 Differences In VB 6, the MsgBox function has five parameters. The last two, helpfile (which specified the path to a help file containing information about the error message) and context (which specified the help context ID within helpfile), are optional. In VB .NET, these two parameters are not supported. See Also InputBox Function MyBase Keyword Syntax MyBase Description Provides a reference to the base class from within a derived class. If you want to call a member of the base class from within a derived class, you can use the syntax: MyBase.MemberName where MemberName is the name of the member. This will resolve any ambiguity if the derived class also has a member of the same name. Rules at a Glance MyBase will call through the chain of inherited classes until it finds a callable implementation. For example, in the code: Public Class CTestClass … End Class Public Class CTestClass2 Inherits CTestClass Public Function ShowType( ) As Type Return Mybase.GetType End Function End Class the call to ShowType is eventually resolved as a call to Object.GetType, since all classes are ultimately derived from the Object class. MyBase cannot be used to call Private class members. MyBase cannot be used to call base class members marked as MustOverride. Programming Tips and Gotchas
Note: If you are looking for cheapest and affordable webspace to host and run your servlet application check Astra j2ee hosting services