Change Blue Color To Some?
Mar 11, 2010I need the change some controls colors. I have a preview;
How to change the blue color to some color?
I need the change some controls colors. I have a preview;
How to change the blue color to some color?
I have a alpha mask (grayscale)... and want to specify a color (eg color.blue) and then be able to paint the blue version of the new image(using the solid color with the alpha mask) to the screen using graphics...
How is it best to do this?
Provided the following
vb.net Private Function isBlue(ByVal aRGB As Color) As Integer
If aRGB.R < 30 And aRGB.G < 30 And aRGB.B > 170 Then
[CODE]....
I use it with the following:
vb.net Dim count As Integer = 0
Dim img3 As New Bitmap(DirectCast(CameraTable.Controls("camera" & z.ToString), PictureBox).Image)
For x As Integer = 10 To 16
Works great. Takes a small square and tests for the blue color indicated by the aRGB value.
What I am trying to do now is test for all Black (as opposed to blue). I want to copy that isBlue Sub to a "isBlack" Sub and perform a like test, but I do not know what to use for this part:
If aRGB.R < 30 And aRGB.G < 30 And aRGB.B > 170 Then explain those values and what changes to each one does?
I've edited the code some:
vb.net Dim bluepixels As Integer = 0
Dim blackpixels As Integer = 0
Dim img3 As New Bitmap(DirectCast(CameraTable.Controls("camera" & z.ToString), PictureBox).Image)
[CODE]...
And in the sub I am testing for an R, G, and B value less than 3 (black should be all 0's) I'm still interested in how to manipulate those RGB values to test for other colors, or very specific hex colors.
I have a question for a combobox in Visual Studio 2008 (VB)If illed a combobox from a table and the use the following statement: Me.cmbProduct.SelectedValue = 1 (or another number)The problem is now that in the form the value is selected but with a blue color. I have on my form several comboboxes but i don't want that blue color.
View 13 RepliesI have a form with a lot of LineShapes on it, and basically what I'm trying to do is make certain lines a blue colour and others a black colour, depending what it's in an array of integers. Each line is called line1, line2 etc. So if one of the values in the array is 3, then line3 would be coloured blue.
I have the following code to handle all the lines more easier:
MeterArray = New PowerPacks.LineShape() {line1, line2, line3, line4, line5}
However, since I'm going to have about 50 seperate lines, this is going to look quite messy when I reach line50. So my question is, is there a tidyier way of handling these lineshapes.
I have a multiline RichTextBox and a ListBox filled with keywords. When I type in the letter t, or any other first letter of a keyword I would like the ListBox to show, just like it does in VB. How can I make my selection the color Blue?
View 4 RepliesI am trying to create stored procedure that gone return varchar value, and that value I need to display in textbox.This is the code for stored procedure:
Create PROCEDURE Status @id_doc int, @Name varchar(50) OUTPUT
AS
select @Name =items.name
from Doc,Items where @id_doc=IDN and doc.IDN=Items.ID
return @Name
This is the code in vb.net where i need to display returned value from procedure in textbox:
Public Sub Current()
Dim dtc As New Data.DataTable
Dim dr As SqlClient.SqlDataReader
[code]....
When I try to execute this code I get this message in exception:
"Conversion failed when converting the varchar value 'Blue color' to data type int."
I have lines like this in my text file [code] I want to change the value of column red and blue. Column red=X Column Blue=Y. The user will input the first value of X and Y. Let say user input is X=100 Y=100. The column should be divide half. The value will be like this.. [code]
View 19 RepliesHow to change a forms background system color schemes to windows default color schemes in vb.net?
View 2 RepliesI have a question of VB event handler and color picker. Now I have a label, and I want when user click it, it pops up a color picker dialog and let user to change the background color of the label. Not sure how to implement this, can anyone give me a direction?
View 2 RepliesAlright inside of a combo box I have a list of colors and I want to change the background color of the combo box to the selected color...basically this... but im not sure what the problem is here anyone have some advice or is this not possible?
CBLinerColor.BackColor() = CBLinerColor.Items.Item(0)
Basically i want dynamic code that will change the color depending on the items in the box.
How to change the Data Gridview Button Back Color and Fore Color Based on Condition in Vb.net2005. i'm Attaching the gif toooo
View 5 RepliesI am using .NET 1.1, so I don't have the access to listitem object. I would like to change the text color or the background color of certain items in a listbox. can it do it in .NET 1.1?
View 5 Repliesa set of color add into combobox
bttnclick
Dim mypen As New Pen(, 2)
base
cbocolor.items.add("Red")
cbocolor.items.add("Green")
how to make the color apply in the pen?? what to put before the coma??
I would like to use a full range of possibilities for a color, such as 255,255,255 instead of predefined colors, like red. How can I do this in code. Me.backcolor=?
View 2 RepliesHow can i change the color or put a gradient color of their top of Form?
I'll try to change it a Formstyle to None and put a image on it....
But i want to know what the other ways to change the color of Top Form....?
How to change Progressbar background color and for color.
View 1 RepliesIm developing a web browser and i got an idea of changing the background color of the form 1 so i made a form 2. created 1 combobox and 1 button. The idea was to change color of background and then when i start the program after closing it it will remember what color and start up same color as before? Here is what i did but it doesnt work:
[Code]...
how do i change the color of the progress bar to a different color?
View 10 RepliesI have a TextBox that displays a color as its background color and the background color code in its text. I have set the text color as Black.The problem is that if the user sets the color as Black then the color code will be unreadable. How do I set the text color programmatically so that it becomes readable when the user selects any color?
View 1 Repliesi am developing cash counter programe. when an item make return i need to come that row in another color to highlight that row.
View 4 RepliesI have three columns in my datagridview. item_no, qty, price. I need to change the color of row while qty less than 0.
View 1 RepliesI have Datagridview on my form. One of the cell in this grid is ataGridViewCheckBoxColumn.I need to change the color of the row which has checked value .There might be more than one row with the checked value.
View 1 RepliesI need a code that when i click on a button a colordialog will apper and i select a color and it changes a pen to that color like this[code]...
View 2 RepliesI'm working on WinForms project. I need to change color of my form from white to black.
VB Code:
Dim g As Graphics, Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
g= Me.CreateGraphics
End Sub
how can I do this with help of g instance's methods?
Dim a As String = " objects scanned, "
Dim b As String = "threats detected."
[code].....
I am create a isMDIformcontainer=true form, Design time have backgroud color. But runtime no color. Can you change the backgroud of MDI parent form..?
View 3 RepliesI have a RichTextbox set to Border style FixedSingle.. I want to have a blue boarder around my richtextbox, but it is always gray.. How do you go about changing the border color of a RichTextBox?
Obviously this doesn't work:
RichTextBox1.bordercolor = Color.Blue
I have been googling for a while and haven't found anything useful yet...
i have to do a system that will trigger an alert. i need to change the color of the box in datagrid view to certain color, according to it's condition.
as example, the first alert will be trigger if there is any values that are below 5. so all box in the datagridview that contains value less than 5 will change to red color.
i want my program change the backgound color of the form even it is restarted or the computer is off when i open it again and run the program i want the color that i selected is previous would be the background color that will appear when i run it again... how could i do it?I'm done change the background with Color Dialog but when Quit the program and run again it will turn back to the original background color
View 2 Replies