Question:
Help with Programming in Visual Basic 6.0? I am not able to interpret the meaning of a line....Plz help!!!!!?
Varsha
2008-05-13 06:52:04 UTC
The Question is as follows:

Lynette Rifle owns an image consulting shop.Her clients can select from the foll. services at the specified regular prices:Makeover $125, HairStyling $60, Manicure $35 and Permanent Makeup $200.She has distributed discount coupons of 10 % & 20% off the regular price.Create a project that will allow the receptionist to select a discount rate of 10%,20% or none and then select a service.Display the price for the inidividual service in a label and have another label to display the total due after each visit is entered.Include Command buttons for Calculate,Clear,Print Form, and Exit

I have been able to design the form, but cant interpret the meaning of the line "Display the price for the individual service.......".What actually has to be calculated?
Three answers:
Silverback
2008-05-13 07:06:37 UTC
Example:



Makeover=125.00

Discount=10%



WorkFld=Makeover*Discount

(125.00X .10 = 12.50)



TotCost=Totcost-Workfld

(125.00 - 12.50 = 112.50)



IndService=IndService+TotCost



do this for each service the customer had and add the result to IndService



also add code to reset work fields and check if customer had a discount coupon.



Hope this helped, it's a short version of what to do basiclly.
AnalProgrammer
2008-05-13 07:04:06 UTC
Your form will have a dropdown of discounts, 10%, 20% or none.

You will also have a selectable list of services.



Then you will have a display area for the price.



So if a discount of 10% is selected

And a service of HairStyling is selected.

What price should be shown?
INDIP
2008-05-13 07:00:23 UTC
Visual Basic (VB) is a third-generation event driven programming language and associated development environment from Microsoft for its COM programming model.[1] Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using DAO, RDO, or ADO, and creation of ActiveX controls and objects. Scripting languages such as VBA and VBScript are syntactically similar to Visual Basic, but perform differently.



A programmer can put together an application using the components provided with Visual Basic itself. Programs written in Visual Basic can also use the Windows API, but doing so requires external function declarations.



The final release was version 6 in 1998. Microsoft's extended support ended in February 2008 and the designated successor was Visual Basic .NET.



Visual Basic was designed to be easy to learn and use. The language not only allows programmers to create simple GUI applications, but can also develop complex applications as well. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality.Although programs can be compiled into native code executables from version 5 onwards, they still require the presence of runtime libraries of approximately 2 MB in size. This runtime is included by default in Windows 2000 and later, but for earlier versions of Windows or Windows Vista, it must be distributed together with the executable.



Logical and bitwise operators are unified. This is unlike all the C-derived languages (such as Java or Perl), which have separate logical and bitwise operators. This again is a traditional feature of BASIC.



The Ruby interface generator provided the "visual" part of Visual Basic and this was combined with the "EB" Embedded BASIC engine designed for Microsoft's abandoned "Omega" database system. The ability to load dynamic link libraries containing additional controls (then called "gizmos") which later became the VBX interface were added to the product at the request of Bill Gates



Visual Basic 6.0 (Mid 1998) improved in a number of areas [6] including the ability to create web-based applications. VB6 has entered Microsoft's "non-supported phase" as of March 2008.



Earlier counterparts of Visual Basic (prior to version 5) compiled the code to P-Code or Pseudo code only. Visual Basic 5 and 6 are able to compile the code to either native or P-Code as the programmer chooses. The P-Code is interpreted by the language runtime, also known as virtual machine, implemented for benefits such as portability and small code. However, it usually slows down the execution by adding an additional layer of interpretation of code by the runtime although small amounts of code and algorithms can be constructed to run faster than the compiled native code. Visual Basic applications require Microsoft Visual Basic runtime MSVBVMxx.DLL, where xx is the relevant version number, either 50 or 60. MSVBVM60.dll comes as standard with Windows in all editions after Windows 98 while MSVBVM50.dll comes with all editions after Windows 95. A Windows 95 machine would however require that which ever dll was needed by the program was included with the installer.



Private Sub Form_Load()

MsgBox "Hello World"

End Sub



Sub Main()

Dim a As String

a = InputBox("Enter your name:")

MsgBox a

End Sub



Private Sub Run_Notepad()

Shell "notepad.exe", vbMinimizedFocus

'This would open Notepad, as Notepad is in the system folder.

'%SystemRoot% is an environment variable containing the path to the system folder.

'which is not needed as it is already in the system folder

End Sub


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...