Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help] Differences between Constants and Variables [Solved]

[Help] Differences between Constants and Variables [Solved]

Posts 1–10 of 10 · Page 1 of 1
yair
yair
[Help] Differences between Constants and Variables [Solved]
so i have been taking a course of VB recently...and ive been doing fine but now its gotten a bit more difficult...heres a link to the project i have to make...
any help will be greatly appreciated

http://rion.ws/Mesa/Project2Assign.pdf

im a bit comfused about the dim and constant....i dont know which one im suppose to use
#1 · 15y ago
LY
Lyoto Machida
I dont understand your question...
Dim its to declare things like string, integer blabla...
#2 · 15y ago
yair
yair
what would i declare for this project???

Accessories (Stereo system = $425.76, Leather interior = $987.41, Computer navigation = $1,741.23), Detailing (Standard = 0, Pearlized = $345.72, Customized = $599.99), Tax rate = 8%

so out of all of this which would be my const and dim???
#3 · edited 15y ago · 15y ago
♪~ ᕕ(ᐛ)ᕗ
♪~ ᕕ(ᐛ)ᕗ
it's like a calculator dude.....
#4 · 15y ago
LY
Lyoto Machida
On the button Calculate you must do something like this:

Code:
TextboxTotal.Text = CInt(TextboxPrice.Text) + CInt(TextboxPrice2.Text) ' ETC...
And on the CheckBox Checked Change do this:

Code:
If YourCheckBox.Checked = True Then 

TextboxPrice.Text = "Your Price"

End if

if YourCheckbox2.Checked = True Then

TextboxPrice2.Text = "Your 2 Price"

End if
Its almost the same to the radio buttons...

Its something like that xD
Now just think about it!
#5 · edited 15y ago · 15y ago
Jason
Jason
Consts are "Constants" the value that they hold cannot be changed at runtime. Dim declares a variable which, like it sounds, holds a variable value. You can make it hold any value of the same type (String. Integer, Decimal). So if those prices are fixed within your program, declare them as constants.
#6 · 15y ago
Hassan
Hassan
In Visual Basic, Dim officially tells the compiler that we are going to declare a variable. A variable can change its value anywhere in the program.

Constants, on other hand are variable modifiers that represent a constant value, a value that can be computed at compile-time. Constants are fixed values and cannot change their value once initialized.

Having said that, use constants if you are not going to change the values. Else, simply use variables.
#7 · 15y ago
freedompeace
freedompeace
Quote Originally Posted by Hassan View Post
In Visual Basic, Dim officially tells the compiler that we are going to declare a variable. A variable can change its value anywhere in the program.

Constants, on other hand are variable modifiers that represent a constant value, a value that can be computed at compile-time. Constants are fixed values and cannot change their value once initialized.

Having said that, use constants if you are not going to change the values. Else, simply use variables.
For reference: Constants are pretty much semantics. In memory, they're all the same as normal integer values.
#8 · 15y ago
yair
yair
thank you everyone...i understand better...
#9 · 15y ago
Jason
Jason
Alrighty glad we could be of service. Thread marked solved, I doubt there is any need for anyone to post further.
#10 · 15y ago
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Tags for this Thread

None