Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2006

Tip: Looking for answers? Try searching our database.

DateTimePicker in VS2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Smith - 13 Feb 2006 10:32 GMT
When I drop a standard DateTimePicker onto a form in VS2005 it displays
in a Flat XP-style, even though it does not appear to have any
properties relating to this. But when the application runs, it reverts
to the old 3D look. What do I have to do to retain the Flat look?

brian smith
Otis Mukinfus - 13 Feb 2006 12:47 GMT
>When I drop a standard DateTimePicker onto a form in VS2005 it displays
>in a Flat XP-style, even though it does not appear to have any
>properties relating to this. But when the application runs, it reverts
>to the old 3D look. What do I have to do to retain the Flat look?
>
>brian smith

Does Program.cs in your project look like the code below?

*****

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace TestWindow
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MdiMain());
        }
    }
}

*****

If not add the missing code to the Main() method.

Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
Brian Smith - 13 Feb 2006 15:47 GMT
Brilliant. Many thanks Otis.

brian smith

>> When I drop a standard DateTimePicker onto a form in VS2005 it displays
>> in a Flat XP-style, even though it does not appear to have any
[quoted text clipped - 35 lines]
> http://www.otismukinfus.com
> http://www.tomchilders.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.