473,320 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to set background color window to RGB color

I'm making a WPF application in VS2010. I'm trying to set the background color of the form to a specific color expressed in RGB. However, when I debug, i get a black form. The copypasted code:

Public Class Window1

Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded

Dim clrColor As New System.Windows.Media.Color

clrColor.R = 20
clrColor.G = 50
clrColor.B = 100

Dim s As New SolidColorBrush

s.Color = clrColor

Me.Background = s
End Sub
End Class
Apr 6 '12 #1
0 1528

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: notageek | last post by:
I'm trying to make text invisible on a web page. Right now I'm setting <font color=#ffffff>. This works good when the window color is white, which is the default for most windows installations. But...
4
by: Sami | last post by:
Hello, I just started out with Windows.Forms and was going through the MS tutorials. In the tutorial where you can create a non-rectangular shaped window by using your own window painted with...
1
by: UJ | last post by:
I've got my default background color for the page. I then want to have a section within it have a different background color. I've been doing it using tables but wanted to know if there is an...
0
by: | last post by:
I have created an app to enum windows ( including childs) of another application and obation each window handle. How can I simply change the background color of one of these windows. in the other...
2
by: John Devlon | last post by:
Hi, Can anyone please help me ? I would like to highlight a selected row in a listview ? Can I chooce a custom color?
1
by: Zach | last post by:
Adding a custom color in color dialog box: How do you do this? I did look through MSDN but could not find the answer. Zach.
13
by: plsHelpMe | last post by:
Hello Frens, I am supposed to show a fading effect on the options of a multiselect tag. To achieve this i used something like this: document.getElementById(toTargetId).style.backgroundColor =...
6
by: Trevor2007 | last post by:
I am trying to call the color palette in access, but the only thing I keep coming accross is xldialog.paintpalette for excel but nothing for access. I would like to do this to allow the end user...
6
by: alag20 | last post by:
Hi, I want to change toolbar color as shown in this image.... Can someone please advice using c# winforms how to do this?http://img375.imageshack.us/img375/9609/62309300ux0.th.png
3
by: Sopheap Panha | last post by:
Could you give me the color and color name in System.Drawing.Color of .NET Framework? thank for helping.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.