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]Convert String to Color[Solved]

Question[help]Convert String to Color[Solved]

Posts 1–11 of 11 · Page 1 of 1
mnpeepno2
mnpeepno2
[help]Convert String to Color[Solved]
So as all of you know, I'm working on my web browser, but I need YOUR help.

How do you convert string to color????????


example of a string:

Color [A=255, R=211, G=69, B=112]


so here is part of my code:


[php]
dim d as string
d = reader.readline()
colordialog1.color = d <----- need to convert
[/php]
#1 · 16y ago
mnpeepno2
mnpeepno2
lol found a website that answered 1/2 my question

Convert string to Color | Corey Schuman

the problem is, a, r, g, b are READ-ONLY
#2 · edited 16y ago · 16y ago
NextGen1
NextGen1
MSDN:

Code:
Public Shared Function FromName( _
   ByVal name As String _
) As Color
name
A string that is the name of a pre-defined color. Valid names are the same as the names of the elements of the KnownColor enumeration.
Return Value

The Color structure that this method creates.

Remarks

A pre-defined color is also called a known color and is represented by an element of the KnownColor enumeration. If name is not the valid name of a pre-defined color, the FromName method creates a Color structure that has an ARGB value of zero (that is, all ARGB components are 0).

Nextgen1

So unless I am misunderstanding what you want you can use the above and

[php]
Dim d as color
d = Color.Aqua ' Or whatever color
[/php]



Or you can use color from ARGB

Dim "whatever" As Color = Color.FromArgb("'RGB Here' 0,0,0")


[php]
Dim d As Color = Color.FromArgb(255, 255, 255)
' d = white
[/php]


#3 · edited 16y ago · 16y ago
mnpeepno2
mnpeepno2
close this plz i found a solution


Dim colorz As New ColorConverter
ColorDialog1.Color = colorz.ConvertFromString(d)
#4 · 16y ago
MJLover
MJLover
Simple Man

[php] Dim red As String = "233"
Dim green As String = "133"
Dim blue As String = "44"
dim alpha as integer=255
Me.BackColor = Color.FromArgb(alpha, red, green, blue)
[/php]
#5 · 16y ago
NextGen1
NextGen1
Already answered with that MJ (kinda)


marked Solved, left open for the community, I will close if members dump in it or post after 6 days, you may not be the only one experiencing this problem

#6 · 16y ago
mnpeepno2
mnpeepno2
okay dokay
#7 · 16y ago
mnpeepno2
mnpeepno2
/sorry for double post

i get errors (opendialog1 dosent close)


[php]
Dim colorgod As New Color
Dim colorz As New ColorConverter
colorz.ConvertFromString(d)
colorgod = colorz.ConvertFromString(d)
Dim aa, bb, cc, dd As String
aa = colorgod.A
bb = colorgod.R
cc = colorgod.G
dd = colorgod.B
ColorDialog1.Color = Color.FromArgb(aa, bb, cc, dd)
[/php]
#8 · 16y ago
NextGen1
NextGen1
A. What is D declared as ?
#9 · 16y ago
mnpeepno2
mnpeepno2
d is declared as a string

teamviewer:

ID:
498 213 695
Pass:
asdfasdf
#10 · 16y ago
MJLover
MJLover
Quote Originally Posted by NextGen1 View Post
Already answered with that MJ (kinda)


marked Solved, left open for the community, I will close if members dump in it or post after 6 days, you may not be the only one experiencing this problem

LOL, we both posted this the same time.
#11 · 16y ago
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

  • [Help]Convert decimal to Hex[Solved]By ppl2pass in Visual Basic Programming
    3Last post 16y ago
  • [Help]Converting Char to Decimal[Solved]By Lolland in Visual Basic Programming
    2Last post 16y ago
  • [Help]Form Background Color[Solved]By Shark23 in Visual Basic Programming
    5Last post 16y ago
  • [Help]BG and FG Color Dialog[Solved]By Invidus in Visual Basic Programming
    7Last post 16y ago
  • [Help]String,Remove blanks[Solved]By ppl2pass in Visual Basic Programming
    3Last post 16y ago

Tags for this Thread

None