Click here to Skip to main content
15,900,258 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionIE show up on Top of parentForm Pin
sri_009919-Apr-10 20:48
sri_009919-Apr-10 20:48 
AnswerRe: IE show up on Top of parentForm Pin
Eddy Vluggen24-Apr-10 23:28
professionalEddy Vluggen24-Apr-10 23:28 
GeneralRe: IE show up on Top of parentForm Pin
sri_009925-Apr-10 19:29
sri_009925-Apr-10 19:29 
GeneralRe: IE show up on Top of parentForm Pin
Eddy Vluggen25-Apr-10 23:28
professionalEddy Vluggen25-Apr-10 23:28 
QuestionUnable to change the properties of the Month Calendar Control on my forms app. Pin
Squire Dude18-Apr-10 11:36
Squire Dude18-Apr-10 11:36 
AnswerRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Som Shekhar18-Apr-10 17:32
Som Shekhar18-Apr-10 17:32 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Squire Dude19-Apr-10 4:19
Squire Dude19-Apr-10 4:19 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Som Shekhar19-Apr-10 4:25
Som Shekhar19-Apr-10 4:25 
Squire Dude wrote:
Okay call me dumb!!!! dahhh....


Its ok buddy... it just brought a good smile on both our faces. So fine.

There are two things that you can do.

1. As mentioned above, you can extend the class. Here is a class that does the job:
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace EZ
{
    public class EZMonthCalendarControl : MonthCalendar
    {
        [DllImportAttribute("uxtheme.dll")]
        private static extern int SetWindowTheme(IntPtr hWnd, string appname, string idlist);

        protected override void OnHandleCreated(EventArgs e)
        {
            SetWindowTheme(this.Handle, "", "");
            base.OnHandleCreated(e);
        }

        private void InitializeComponent()
        {
            this.SuspendLayout();
            this.ResumeLayout(false);
        }
    }
}


2. You can disable the theme in the Main funtion in Program.cs. Just remove the line EnableVisualStyles(). But this will cause the visual style to be disabled for the whole of the application.

Cheers.
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Squire Dude19-Apr-10 5:31
Squire Dude19-Apr-10 5:31 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Som Shekhar19-Apr-10 5:43
Som Shekhar19-Apr-10 5:43 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Squire Dude19-Apr-10 6:28
Squire Dude19-Apr-10 6:28 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Som Shekhar19-Apr-10 6:31
Som Shekhar19-Apr-10 6:31 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Squire Dude19-Apr-10 10:34
Squire Dude19-Apr-10 10:34 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Som Shekhar19-Apr-10 18:21
Som Shekhar19-Apr-10 18:21 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Squire Dude20-Apr-10 5:12
Squire Dude20-Apr-10 5:12 
GeneralRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Som Shekhar20-Apr-10 6:46
Som Shekhar20-Apr-10 6:46 
AnswerRe: Unable to change the properties of the Month Calendar Control on my forms app. Pin
Henry Minute27-Apr-10 11:40
Henry Minute27-Apr-10 11:40 
QuestionAdd item to a listbox that is bind to a DataSource Pin
imak16-Apr-10 6:19
imak16-Apr-10 6:19 
AnswerRe: Add item to a listbox that is bind to a DataSource Pin
Dan Mos16-Apr-10 6:44
Dan Mos16-Apr-10 6:44 
GeneralRe: Add item to a listbox that is bind to a DataSource Pin
imak16-Apr-10 6:53
imak16-Apr-10 6:53 
GeneralRe: Add item to a listbox that is bind to a DataSource Pin
Dan Mos16-Apr-10 7:01
Dan Mos16-Apr-10 7:01 
GeneralRe: Add item to a listbox that is bind to a DataSource Pin
imak16-Apr-10 7:06
imak16-Apr-10 7:06 
GeneralRe: Add item to a listbox that is bind to a DataSource Pin
Dan Mos16-Apr-10 7:12
Dan Mos16-Apr-10 7:12 
QuestionGet Access 2007 window dimensions Pin
john john mackey16-Apr-10 5:49
john john mackey16-Apr-10 5:49 
AnswerRe: Get Access 2007 window dimensions Pin
john john mackey16-Apr-10 6:18
john john mackey16-Apr-10 6:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.