What's new

Visual Basic Patulong po paano icompute

Alexander911

Forum Veteran
Joined
May 13, 2017
Posts
1,687
Solutions
2
Reaction
1,020
Points
595
Age
29
Sino marunong mag visual basic 6.0, patulong po anong code po yung para macapture yung nasa textbox with checkbox po. Then icompute ng lahat in cmdComputetotal yung mga nacheck po paano po. Begineer palang po kasi tas wala masyado akomg alam dito xd
 
Di ko magets question mo.
Ibig mo bang sabihin, didisplay yung total sa textbox ng mga nakachecked?
or count ang mga nakacheck? and sabihin mo rin kung anong computation (e.g. Addition or just compute the total check items)

Wala talagang sasagot sa question mo kasi di maintindihan
 
IMG_20201209_175708.jpg

Ganito paps o, dapat pag iclick ko yung checkbox na nasa menu, icalculate nya yung nasa text then itototal nya dyan pag iciclick ko yung compute total kung magkano yung pinindot ko, di ko kasi alam anong source code gagamitin neto
 

Attachments

Code:
dim a as integer = 0
if checkEgg.value = true then
    a = a + int(txtEgg.text)
end if
if checkHamburger.value  = true then
    a = a + int(txtHam.text)
end if

sa cmd po
 
View attachment 1088371
Ganito paps o, dapat pag iclick ko yung checkbox na nasa menu, icalculate nya yung nasa text then itototal nya dyan pag iciclick ko yung compute total kung magkano yung pinindot ko, di ko kasi alam anong source code gagamitin neto
Dim egg = Val(txtEggQuantity.Text) * Int(txtEggPrice.Text)
Dim hamburger = Val(txtHamburgerQuantiy.Text) * Int(txtHamburgerPrice.Text)
Dim ham = Val(txtHamQuantity.Text) * Int(txtHamPrice.Text)
Dim bacon = Val(txtBaconQuantity.Text) * Int(txtBaconPrice.Text)
Dim updateTotal = egg + hamburger + ham + bacon
txtTotal.Text = updateTotal
updateTotal = Val(txtTotal.Text)


try mo to ts feeling ko eto gusto mo mangyare. ang kinaiba lang saken e pwedeng mag input ng quantity ng bawat ingredients
 

Attachments

Back
Top