|
I need the code to: choose a color, and get the "Hex" code for it, the 6 figure code used in css. So basically A ColorDialog and when they choose the color it prints out the 6 digit HTML hex code name of the color, for use in the css of web pages.
Please help me with coding that, this is what I have so far:
If TextBox1.Text = "" Then
Button1.Text = "Choose Color"
TextBox1.Text = ColorDialog1.Color.ToArgb
TextBox1.BackColor = ColorDialog1.Color
ElseIf TextBox2.Text = "" Then
Button1.Text = "Choose Another"
TextBox2.Text = ColorDialog1.Color.ToArgb.ToString
TextBox2.BackColor = ColorDialog1.Color
ElseIf TextBox3.Text = "" Then
TextBox3.Text = ColorDialog1.Color.ToArgb.ToString
TextBox3.BackColor = ColorDialog1.Color
ElseIf TextBox4.Text = "" Then
TextBox4.Text = ColorDialog1.Color.ToArgb.ToString
TextBox4.BackColor = ColorDialog1.Color
ElseIf TextBox5.Text = "" Then
TextBox5.Text = ColorDialog1.Color.ToArgb.ToString
TextBox5.BackColor = ColorDialog1.Color
ElseIf TextBox6.Text = "" Then
TextBox6.Text = ColorDialog1.Color.ToArgb.ToString
TextBox6.BackColor = ColorDialog1.Color
ElseIf TextBox7.Text = "" Then
TextBox7.Text = ColorDialog1.Color.ToArgb.ToString
TextBox7.BackColor = ColorDialog1.Color
ElseIf TextBox8.Text = "" Then
TextBox8.Text = ColorDialog1.Color.ToArgb.ToString
TextBox8.BackColor = ColorDialog1.Color
ElseIf TextBox9.Text = "" Then
TextBox9.Text = ColorDialog1.Color.ToArgb.ToString
TextBox9.BackColor = ColorDialog1.Color
ElseIf TextBox10.Text = "" Then
TextBox10.Text = ColorDialog1.Color.ToArgb.ToString
TextBox10.BackColor = ColorDialog1.Color
Else
TextBox1.Text = ""
TextBox1.BackColor = Color.White
TextBox2.Text = ""
TextBox2.BackColor = Color.White
TextBox3.Text = ""
TextBox3.BackColor = Color.White
TextBox4.Text = ""
TextBox4.BackColor = Color.White
TextBox5.Text = ""
TextBox5.BackColor = Color.White
TextBox6.Text = ""
TextBox6.BackColor = Color.White
TextBox7.Text = ""
TextBox7.BackColor = Color.White
TextBox8.Text = ""
TextBox8.BackColor = Color.White
TextBox9.Text = ""
TextBox9.BackColor = Color.White
TextBox10.Text = ""
TextBox10.BackColor = Color.White
TextBox1.Text = ColorDialog1.Color.ToArgb.ToString
TextBox1.BackColor = ColorDialog1.Color
End If
I have 10 textboxes to choose 10 colors, and once the click Choose another after all the textboxes had already been filled, it will reset the form, and paste the new color in the first textbox. Please Help, Thank-You!!!
|
|
|
|
|
Your hex value is RGB in hex, so just use the ToString overload with a format string to make it show in hex ( I think it's just X, or perhaps H )
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello. One program code Gsm_Modem to send or receive has to face. hardware that me with the USB port. Anyone who can help me.
Tanks!
|
|
|
|
|
I'm sorry. I know English is not your first language, and I don't want to criticise for that, but the truth is that this post makes no sense at all. I have read it five times and have only the vaguest idea what you're trying to say. You might try babelfish.yahoo.com if you need help translating your question into English. Or just try to reword it with a bit more detail. You're writing a VB app for a phone ? You want to use a USB modem ? I'm not sure.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello.
How open the OCX code in VB6.0 (Reach Full Source).
Is There nothing like "reflector".
thank you.
|
|
|
|
|
VB6 is rubbish, and totally obsolete. You should not use it. No, there is nothing like that, the ocx is probably written in C++, because that's how VB6 was useful, C++ did all the hard work in OCX components.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello.
How open the OCX code in VB6.0 (Reach Full Source).
Is There nothing like "reflector".
thank you.
|
|
|
|
|
Don't ask twice, that's rude.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi All,
Using Visual studio 2008, I have an application that its data can save to a binary file, using *.SDB extension, Moreover users can open this file from my application. I have 2 questions about this.
1- How can I assign an icon to this saved file with SDB extension when my application has been installed in other computer?
2- Similar to *.sln file (for Visual Studio project), How can I assign tow icon to single extension? For example when a solution is saved with visual studio 2005 its icon different from that one saved from visual studio 2008. In first, the solution’s icon contains “5” but in 08 solution’s icon contains “8”.
Thanks Again.
|
|
|
|
|
A.Najafi wrote: How can I assign an icon to this saved file with SDB extension when my application has been installed in other computer?
It's a registry entry. You can write it within your program, just google to get the details, or just open regedit and look at the masses of extensions there and how they are formatted.
A.Najafi wrote: How can I assign tow icon to single extension?
I don't know exactly how it does that, but again, it's all done in the registry.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello
RegSaveKey() : how to use this function in vb.net?
any simple example?
|
|
|
|
|
There is no need to import API functions to work with the registry, just use the ones built in to VB.NET.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
how?
please Write an example
|
|
|
|
|
What is it with you people.
Go google, have a go yourself first.....then when you get stuck come back with a specific question and show us what you have tried.
Yes, i 1 voted you.
|
|
|
|
|
Hello
How can I get a export in the Registry
And what import it
In Vb.net
Any method
|
|
|
|
|
hi
to check
IfMy.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software", "TRIRMRER", Nothing) IsNothingThen
end if
to set
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\XYZ", "TRIRMRER", Format(Now, "yyyy/MM/dd HH:mm:ss"))
and to create a key
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\XYZ", "TRIRMRER", Format(Now, "yyyy/MM/dd HH:mm:ss"))
|
|
|
|
|
I m desinging webbot which Logins on faceBook site select Friends List and Have to delete contacts
I m having problem while delete List cause DeleteList is not a button in webpage and i dont know how to access and capture its even using webbrowser control plz help
|
|
|
|
|
Maybe you should be looking first at any FB API's to see if they have the suitable messages you can use directly.
|
|
|
|
|
I am currently trying to create a Web Design program, freeware, for use to help with the aid of web design. I want it to be sorta like... "Web-Design-Toy" by ACME, only with more features. I have practically everything that I want to be in the application ready. I just need to know how to get it so when the user types into the textbox, it prints out the website view in the web browser control, as to be a "Live View". I currently have no idea how to do that, other than the textbox saving as a certain ".html" document every single time something is typed in, and then the web browser refreshes that document when it is done saving, and right now I don't think that's possible to code using just Visual Basic 2008 Express Edition. Anybody have any ideas of how to code that with Visual Basic 2008 Express Edition!?! Please and Thank-You!!! If you know of the exact coding I am looking for, please post it, or send it to me somehow. Thank-You!
|
|
|
|
|
How about myWebBrowser.DocumentText=myTextBox.Text ?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Hey thanks for the help, but I tried the code and the tool tip said, what I believed to be exactly the right code I was looking for, but, nothing from the textbox was printing out in the webbrowser... I need some help please. I was also thinking about trying to figure out how to get rid of the "ContextMenu" of IE when u right click in the webbrowser control. Any ideas on the code to complete my project?!? All help is appreciated, thanks!!
|
|
|
|
|
Hi,
for myWebBrowser.DocumentText=someString; to work properly, the someString must contain a valid HTML page, e.g. it must begin with a HTML tag, contain a HEAD section and a BODY section, etc.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
This is what is what I'm gonna have the textbox start with every single time the program is run, a basic and simple webpage that can easilly be edited.
<html><br />
<head><br />
<title>YOURTITLEGOESHERE</title><br />
<style type="text/css"><br />
a {color:red};<br />
<br />
a.hover {color:blue};<br />
<br />
a.visit {color:purple};<br />
<br />
body {background-color:white};<br />
<br />
font {color:black};<br />
<br />
</style><br />
</head><br />
<body><br />
THIS IS WHERE YOUR CONTENT GOES!<br />
</body><br />
</html>
|
|
|
|
|
OK, now if all of that is inside someString then the assignment to DocumentText should cause the WB to render it.
Doesn't it work for you? If so, my wildest guess is you have instantiated your form more than once, and are looking at one of them, and changing the other one (a typical beginners mistake).
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Okay here is the code that I am using for the main form... The one we're talking about.
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim SecondFrom As New Form2
SecondFrom.Show()
WebBrowser1.DocumentText = TextBox1.Text
End Sub
End Class
|
|
|
|