.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
without borders   


If you have a table with some rows and columns, and set the background color on the <tr>´s like this:

table.mytable tr

Then you can see the lines that seperates the <tr>´s and <td>´s. Its like the borders that define the tablestructure still has its original color (or is transparent). And it looks quite ugly. How do you avoid this? Is there a way in CSS to make these borders 0 pixels wide?

I know that I can just put the background color on the table instead, but that is not a possible solution in my case.

Thanks alot :)

    background: #b6b7bc;
    font-size: .80em;
    font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
    margin: 0px;
    padding: 0px;
    color: #696969;

a:link, a:visited
    color: #034af3;

    color: #1d60ff;
    text-decoration: none;


Windows Form Resolution Setting

HI I created one application in my laptop its working correctly but when i m trying to use that one in Desktop some part of application got hide in right side of screen. I faced this problem today when i was giving the Demo on my application in college. I dont know how to make the application which will run in any system without any resolution problem.       Please help me. My project is windows based. please help me............ Thanku......... 

MSChart - color only part of background

I'm trying to make a risk chart in ASP.NET using an MSChart control, and I only want to color the background for some of the quadrants.  The chart is 5 by 5, with 25 quadrants, and let's say I just want to color the upper-right quadrant red.  Can anyone tell me if that is possible?Thanks!Dave

Form background images and memory usage

Hello everyone, please forgive me if this is the wrong forum for this post. I have written a Windows App in C#. It's a real small application (something like a widget) that stays on your desktop and shows pictures of a folder in a random sequence. Before showing another picture i use : this.BackgroundImage.Dispose(); so that i keep memory usage low. If i won't do that i can see memory rising (depends on the image size). Now the code i use to change the picture is : this.BackgroundImage = Image.FromFile(path, true); So my question is about this last line of code. Is this a good approach of changing the picture after a while? (this code runs in a loop) Should i care about memory usage? The form is a small one for this kind of app, so loading big and large pictures can have some issues i guess. I have been monitoring my app for some time , memory and cpu usage were really low but i would like to know another and better approach on this one if somoeone knows.  de_Stan

change TD background/foreground color problem.

I have some javascript that is suppose to change the color of a table TD. the CSS file has an entry like this .tdcommand {} HTML TD is like <td colspan="2" height="162" valign="top" class="tdcommand"> if i put a background-color:red or whatever in the CSS file, the color is shown correctly. If i change it via a script it doesnt seem to have any impact. using the alert() to post info, i've found its entering my function correctly and getting the correct info. the important part of the function is thisfor (var i = 0; i < document.styleSheets[0][CSSRules].length; i++) { if (document.styleSheets[0][CSSRules][i].selectorText == obj) { document.styleSheets[0][CSSRules][i].style[prop] = color document.getElementById("opt_" + option).innerHTML = "'" + color + "'" } }   as i said, using the alert() i can validate that its finding the class ok (obj = .tdcommand) and the property is correct (background-color) and the innerHTML update is working fine. I use this same function to set other things, such as text color and highlighting of span's without any problem. what am i missing?   Justin

How do I get the background color of a FrameworkElement passed into a method?

Hello, How do I get the background color of a FrameworkElement passed into a method? Here is the code: public static void SetEditability(FrameworkElement Control, bool IsEditable) { switch (System.Text.RegularExpressions.Regex.Match(Control.GetType().ToString(), @"\.(\w{1,})$").Groups[1].ToString()) { case "TextBox": SolidColorBrush scb = new SolidColorBrush(); scb.Color = Colors.White; // scb.Color = ((SolidColorBrush)((TextBox)Control).Background).Color; if (IsEditable) { ((TextBox)Control).IsReadOnly = false; scb.Opacity = 1; } else { ((TextBox)Control).IsReadOnly = true; scb.Opacity = 0.25; } ((TextBox)Control).Background = scb; break;   The code above works as seen.  But, I can't retain the background color because I can't get the background color from the passed in control (the commented out code above).  The color and opacity do change, just cannot get the color from the control.  How do I get it?  I've already tried several different ways, but I always get the following error: "NullReferenceException was unhandled Object reference not set to an instance of an object." I cannot test for null in this way "if (((SolidColorB

Inside Div text and background color not changing in HTML Tabs

there is below a I have Written a JAVAScript for TABS in HTML of div format and on anchor click the tab changes<script type="text/javascript"> function DisplayDiv(tabno){ var divnum; divnum=tabno; if(divnum == 1){ document.getElementById("div1").style.backgroundcolor="#D0DBF9"; document.getElementById("div2").style.backgroundcolor="#EFF3FE"; document.getElementById("div3").style.backgroundcolor="#EFF3FE"; document.getElementById("thisaudio").style.disply='block'; document.getElementById("comment").style.display='none'; document.getElementById("related").style.display='none'; } if(divnum == 2){ document.getElementById("div1").style.backgroundcolor="#EFF3FE"; document.getElementById("div2").style.backgroundcolor="#D0DBF9"; document.getElementById("div3").style.backgroundcolor="#EFF3FE"; document.getElementById("thisaudio").style.display='none'; document.getElementById("comment").style.display='block'; document.getElementById("related").style.display='none'; } if(divnum == 3){ document.getElementById("div1").style.backgroundcolor="#EFF3FE"; document.getElementById("div2").style.backgroundcolor="#EFF3F

Alternative coloring and Image background color

Hi        I wanted to simple create a report with alternative background colors. Which I could achieve easily. Now I have a column in this report which is supposed to display image. Based on value from the data field a red or green or blue icon is displayed in this column based on expression. Which is also working fine. Now the problem is after I place an image in this details column (with or without expression).  the alternative row coloring stopped working. its always white. I even tried creating a colored background image and still its not helping. Can some one help me out please? If the question is still not clear, please let me know.... for Screenshot please refer http://binabdu-fayaz.blogspot.com/2010/09/alternative-coloring-and-image.html Thanks a lot. Fayaz  

How to change background or border brush color of an element while it has template in xaml?

Dear all, I want to change some style property of one element in code behind while that element already had a data template in xaml. as an example this is a code for my window: <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"> <Window.Resources> <Style x:Key="ButtonStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <ControlTemplate.Resources> <Storyboard x:Key="OnMouseEnter1"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/> <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Story
Post New Web Links

Form Background Color not setting

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :Windows Application


I am developing Addin for outlook and I have Windows form for which I set background color it is not setting to the color whatever I set. you help me to figure this out to reflect the required color.


Malik Z.

View Complete Post

More Related Resource Links

Form Background Color not setting



I am developing Addin for outlook and I have Windows form for which I set background color it is not setting to the color whatever I set. you help me to figure this out to reflect the required color.


Malik Z.

Setting textbox background-color changes the default border



I've got a textbox that I'm temporarily applying a class to to give it white text on a white background.  For some reason when I apply that class, the border style changes from the default single, gray, flat border to an inset, 2px, gray border. I messed around with different combinations of styles and colors and it seems as though setting any background-color on the textbox causes the border to change. Where does the default border style come from and why is it changing?

Table rendering Bug: Setting Background color for SSRS report (RDLC)



I am facing the issue while trying to create a Report Definition Language Client-side (RDLC) report. I want to set background color to the textbox (used in table) depending on the value. I have used conditional formatting to achieve this. But i am facing issue in setting background color for Some of  the fields like

  1. EnduranceYoYo
  2. Endurance5MinRun

The General Format of the Conditional format is

=iif(<Varchar Field>.value="NA",Gray.iif(<Integer Field> < 600,"Red",iif(<Integer Field> >=800,"Green","Gold")))

I have used this conditional formatting in Textbox (Properties) --> Background (Expressions)

 I have tried the following options to rectify the issue

Option 1 :

This is the format i have used in Conditional formatting in Expression (In Textbox properties -- background -- Expressio

how to generate toolstrip like color for form's background color

can anyone help me to set the background color of from like toolstrip. i know that is gradient but i need code to generate that color. plzz someone help me with sample code to achieve that color.

Q: How to print out background color in InfoPath 2007 browser form under MOSS form service?


Hi InfoPath experts,

I am trying to print out a custom InfoPath 2007 browser form using "Print View" function offered by MOSS Form Service. It seems like the all background color formats has been stripped out when printed out. Interestingly, only font colors are remain the same in printed-out.
Is there a way to fix this issue? I know you can change the settings: http://office.microsoft.com/en-gb/infopath-help/print-background-colors-and-pictures-HP001095710.aspx , but it only applies for InfoPath Client Form, not browser-based Form!

Any help are appreciated!

Setting Transparency color of Form disrupts video rendering


I have created irregular shaped media player application. I use WMP ActiveX control to play videos. To make form irregular shaped, I have put a background image on form and have set tranparency color to some color(color of edges of background image).

This works fine in Vista and Win7. But on XP Video screen flickers initially and then there is audio but no video. However if I move my form or minimize it, video screen will appear on monitor at the same location where it should have before moving or minimizing the form. The video appears but not on my form but on whatever was behind of my form.

Also if I disable the hardware acceleration or remove the transparency color change, the video problem will sort but edges of form will no longer be transparent. I understand this has something to do with hardware overlay(VMR7 used by WMP) in XP, but I am not getting whole picture.

Can anyone give some light on this?

Is there any other way to make irregular shaped windows form?

himanshu rawat

Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

Setting webpage/masterpage background...image?


I want to have the background of my masterpage (the master page for all of my .aspx pages) have a sort of gradient.  I imagine the only way I can do that is with an image.  Or maybe even some other design, but I want to move away from the "solid color" background.

Is the easiest way to do this just to make an image and set that as the background?  What image size should I make it, because some users could possibly have the normal aspect ratio, or maybe a widescreen?  What should I make it like so that it looks good on all computers?

Thanks in advance. :) 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend