I know this is a really noob question but in my program when my button is enabled true/false I change the colour so i was thinking if there is an easier way to do this? or is the following the best way?
im trying to make an ovalshape change colour when i click a button?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "hello" Then OvalShape1.FillColor = Color.Red
I am making a diary Form in VB.NET to do this I am using a listview with two columns. Column 1 consists of a list of time and column 2 is the description Can I change the colour of certain cells in column 2 only. So when I read in the data from the database it reads in the description and then puts the data in the relevant time slot but I want the recent cells of the description column to be a different colour.
My VB2010 programme changes the background colour of a button (butExtra.BackColor = Color.Red). But how do I restore the colour to the default "Control" colour?
if i have ten textbox. in each with different a b c d e f g h i.. i want to retype it and the colour wil change. lets say i backspace a and when i retype it will change to green.
my puzzle have random characters. and i want the colour of the character to change when i retype it. Lets say R... i backspace and retype r but there's coulour. can i know how?
that is my code.. my problem is in my richtextbox1, there are many line that contain "Not Found". So how can i change colour for all of that text to red colour? my code only work only with a single line that contain "Not Found".
i am creating an rtf editor and i am trying to Change the colour of selected text. at the moment my code changes the colour of the whole text, but i want to be able to highlight my text and have 2 seperate colours, below is my code. Have tried to add .selectedText in but it says it 'SelectedText' is not a member of 'System.Windows.Forms.ColorDialog'.
ColorDialog1.Color = Editor.ForeColor If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then Editor.ForeColor = ColorDialog1.Color End If
First I am using 'Microsoft Visual Studio 2010' and am making a 'windoms forms application'. I am wishing to implement a way of changing the text colour through out the whole application. I have managed to put on a customisable background using
Quote:
CODE:
I know I'll have to change the 'BackColor' bit but I don't know what to. Is there something that turns all text on the form one colour or do I have to do it label by label?
Also I am can't figure out how to rotate labels to display text at a 60 degree angle (to display along the edge of an equilateral triangle) And for the triangle I have drawn it using lines which move independently from each other, is there anyway to 'group' these lines together so they are fixed.
Is there any way to change the default colour to the highlight when a listview row is selected? Apparently the default blue colour causes some problems for some users who have some visual eyesight problems. They didn't tell me what colour they wanted but they did indicated the blue is annoying.
I have a button (btnAdd) that adds the content of a textbox (txtName) to a textblock (lblName). I want to add a date to the textblock when btnAdd is pressed but I want it to be a different font size and colour. So far my code looks like lblName.Text = txtName.Text " " + DateTime.Now
I only want DateTime.Now to be a different size and colour. Is this possible? Instead of a label I need to display it in a listBox. My new code: listBox1.Items.Add(txtName.Text " " + DateTime.Now)
I'm looking for a way to change the font colour on alternate rows within a datagrid. e.g. normal row would be green and the alternate row would be blue. I can change either by using me.datagrid.Styles.Row.Forcolour me.datagrid.Styles.AlternatingRow.Forcolour
The problem is that I am having trouble using both of them together as I need to manipulate both colours. I have created a HtmlRowPrepared event and have been setting them there, however, If I set the Row.Forcolour first, it will over ride the AlternatingRow.Forcolour and vice versa. This needs to be done via SEVER SIDE code only as the colour choices are held in the database.
I am currently working on a VB.NET project and the hardest thing that I am having trouble with is that everything is black and blue. Having worked a lot with C#, I really like the way that types are colored differently.
I have tried going in and having a look at the "Tools > Options > Fonts and Colors" and the various "User Types" under "Display Items" is set to a different colour but its not reflecting that colour in the text editor.
I made a bowling program, it adds 5 scores from 1 player and then calculates the average. Problem is with my reset button, when i click reset it doesn't change "Enter Bowling score for game #1" to 1, how do I change it to 1?
<code> Public Class frmLab2 'This is a program calculates the average scores of 5 bowling games using array. Dim scoreCount As Integer = 1 Dim intcount, total As Double Dim i As Integer = 0 Dim arrscores(4) As Double [Code] .....
Ok so i'm trying to set up my program so that when I choose WinRar it opens a new window asking which architecture to use. I have a combobox set up with both architectures in it. I have the accept button disabled so that you have to choose an architecture and I figured out how to make it so that when you select one architecture it will enable the accept button but if you choose the other architecture it disables the button.
Private Sub cmbx_rar_wdw_arch_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbx_rar_wdw_arch.SelectedIndexChanged If cmbx_rar_wdw_arch.SelectedItem = ("32-Bit (x86)") Then
i'm making a "guitar pro" with vb. when i click a note on the piano, for example, the same note turns red on the guitar. so, i want to know how to reset the colors, because when i click on other note, the first one stays red...
To .NET after getting tired of using VB6 due to the lack of functionality. I'm trying to create a log on method for a system which will involve users selecting a colour from a paint panel and then placing/drawing the colour in 1 or more tiles of a grid, basically a 3x3 grid in which for example they selected the blue colour and drew in the top left tile and the bottom left tile. The logon is selecting the correct colour and placing the colour in the appropriate tile. What i want them to be able to do is place even a single pixel of colour so it has a high accuracy. So far i have a timer which loops from the width of the grid to the height of the grid.
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick Dim BMP As New Drawing.Bitmap(1, 1) Dim GFX As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(BMP) GFX.CopyFromScreen(New Drawing.Point(MousePosition.X, MousePosition.Y), _
[CODE]...
To start with i have just hard coded the colour i want it to detect. At present it produces an error. Parameter must be positive and < Width the error is on System.Drawing.Point(i,j). If i place the mouse over the colour then run the program it will say it has been found, but otherwise it wont find the colour. I believe i am not updating the location of the pixel or something to that effect.
I've got a combobox which loads the system colour list, the selected colour is stored in the registry (i've tried storing the index number value aswell as the colour name - how can i get the combobox to display the stored colour as the default colour when the form loads? It always defaults to the first item in the colour list I've tried
So I have got a program with a timer on, a few labels displaying coordinates, and two buttons. Here is my
[code]...
It displays the color of the pixel at the coordinate typed into the text boxes.I have a video of a tennis ball which is bouncing on the spot, and the background in brown, so when the tennis ball comes into view there is a significant color change and i want it to start and stop a timer each time the colour changes significantly.So my question is, how do i get it to check whether the colour chas changed significantly?
i know how to toggle a button background color when i click on another button? That means i have two buttons on a window form and when i click on button A, button B will toggle its own background color based on the click event in button A.
this is my very first posting and I must say I am desperate. I have a VB assignment due in 2 days and I am so lost. I have written a code to draw some graphic, just a basic house, tree, sun etc. I have also written a code to magnify said graphics which were all the specifications of my Assignment 1 part A. Now for Part B I am being asked to extend my program so that: A - My graphic can be drawn using different colour schemes designed by me but chosen by the user B - My graphic or an appropriate part of it can be animated around the picture box if the user chooses to do so. C - Error checking is included.
i am looking to change the windows colour and colour intensity. These settings are accessable through Control PanelAppearance and PersonalizationPersonalizationWindow Color and Appearance But is there a way that i can remotely change these two settings through functions in my windows form application? Also is there any way of removing the slight blur on the window bars/taskbar when using an aero theme?
I'd like to replace all the white pixels in a bitmap image with pixels of the colour "Color.FromKnownColor(KnownColor.MenuHighlight)". Is there some method in the Image, Bitmap or Graphics classes I can use, or will I simply have to inspect each pixel in the image with GetPixel, check whether it is a white pixel, and then set it with SetPixel?Here is the code I am using now:
Private Shared Sub highlight(ByVal b As Bitmap) Dim highlightColour As Color = Color.FromKnownColor(KnownColor.MenuHighlight) Dim whiteARGB As Long = Color.White.ToArgb
I am looking for some information on getting the colour of each pixel in a picture. The ide is to get the colour and then have my program draw a line along that colour itself. For example. If i have a black square on a white background, I want the software to be able the draw lines on the four edges of the black square, Is this possible?