473,396 Members | 2,115 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,396 software developers and data experts.

DateTimePicker BackColor DesignMode

I have used the code I found on your site by Herr Wagner. It works perfectly except for one minor problem. The color does not change in design mode, only run mode.

Any suggestions
Jan 4 '08 #1
5 2038
daniel aristidou
491 256MB
The color does not change in design mode, only run mode.
Which version of vb do you use?....
im not sure about vb6 but in later editions .....you can view the designcode......(This is the code the program uses to display and design your form.)
(not event code)..
I believe the code you placed was in the event area

you need to enter the code in the design area.
Jan 5 '08 #2
I'm using VB.Net 2005. I'm not sure what you mean by the "design area" and "event area".
Jan 6 '08 #3
Killer42
8,435 Expert 8TB
I'm only VB6, but it seems unlikely that anything in your code would affect what the control looks like at design time.
Jan 7 '08 #4
.Net allows you to inherit from the Microsoft supplied controls. You can then add properties and methods to enhance the control. Unfortunately, in their infiinte wisdom, Microsoft decided to make the BackColor and ForeColor properties of the DateTimePicker control visible, but did not implement the properties. They also did not provided a user accessible Pain event. Setting the BackColor and ForeColor properties has no effect. If you want to change the BackColor of the DateTimePicker you need to implement your own BackColor property and and override the WndProc subroutine to have the property take effect (see http://dotnet.mvps.org/dotnet/faqs/?...color&lang=en). The code provided at the previously mentioned web site works fine and changes the color run mode but does not change the color in design mode, hence my original question.
Jan 7 '08 #5
Killer42
8,435 Expert 8TB
Oops! :)
Jan 8 '08 #6

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

Similar topics

2
by: Lecture Snoddddgrass | last post by:
Hi, When I create a UserControl-derived object, I often expose various public properties. One of the things that I hate about the WinForms designer is that if I decide to embed one of these...
2
by: Kyle | last post by:
Can someone tell me how to change the backgroud color of the drop down box for a DateTimePicker control. There is no "BackColor" property that I can change in property editor. There is an option...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
1
by: aaaa | last post by:
After this code: DateTimePicker1.Enable = false; The back color of the datetimepicker back color stay gray. I want it stay white. How can i do this??? Visual Studio 2003
29
by: Charles Law | last post by:
Further to my issue about user controls, I have a problem with DesignMode. Here is the project hierarchy: MainApp |_ Project1 |_ SubProject (UserControl) SubProject has a default constructor...
1
by: Paul W | last post by:
I'm having trouble detecting whether my Control is in DesignMode. I'm deriving a class from TreeView; Public Class ExplorerView Inherits TreeView ... End Class
1
by: Alper OZGUR | last post by:
Hi; In a webform i have 2 dropdown and 2 textbox and 1 Calendar. If the selecteditem includes the "Date" string than the Calendar.visible must set true. if another item selected than the calendar...
0
by: tschroeder250 | last post by:
Hi Everyone, There are so many Nullable DateTimePickers out there that this post may not even be found among all the others, but I wanted to try. First, I want to thank all the authors of the...
4
by: fts2012 | last post by:
' if the textbox is empty show an error message 1001 Private Sub TextBox1_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.