Click here to Skip to main content
15,881,173 members
Articles / Programming Languages / Visual Basic

VDialog (Vista TaskDialog for Windows XP)

Rate me:
Please Sign up or sign in to vote.
4.91/5 (71 votes)
27 Mar 2013LGPL34 min read 276.7K   2.6K   244   118
Vista-like TaskDialog control for .NET Framework 2.0, compatible with Windows XP

VDialog using LockSystem feature.

VDialog using LockSystem feature

Sample customized VDialog.

Sample customized VDialog

Sample security VDialog.

Sample security VDialog

Expandable VDialog with footer (RightToLeft property set to RightToLeft.Yes and RightToLeftLayout property set to True).

Expandable VDialog with footer

Introduction

Many programmers would like to use Windows Vista TaskDialog on earlier systems like Windows 2000/XP. Unfortunately this is not possible.

There are some TaskDialog implementations on the Internet, but none of them are written in VB.NET. I decided to write my own version of a TaskDialog-like form with all the functionality of Vista TaskDialog. It is almost fully compatible with the MessageBox class. And there are some features of Vista TaskDialog implemented (the rest of them will be implemented later). Some features, which are not implemented, can be emulated using custom controls (like radio buttons or progress bar — see the first screenshot above).

Using the Code

The VDialog class is compatible with the MessageBox class so it can be used in the same way, e.g.:

VB.NET
VDialog.Show(Me, "Text", "Caption", MessageBoxButtons.YesNo, MessageBoxIcon.Error)

To customize the appearance of VDialog, one must create a VDialog object, set its properties and then invoke the Show() method, e.g.:

VB.NET
Dim vd As New VDialog()
With vd
    .WindowTitle = "Windows Vista"
    .Owner = Me
    .MainInstruction = "You must click OK button to continue"
    .Buttons = New VDialogButton() _
              { New VDialogButton(VDialogResult.OK), _
                New VDialogButton(VDialogResult.Continue) }
    .MainIcon = VDialogIcon.SecurityShieldBlue
    .DefaultButton = VDialogDefaultButton.None
    .Content = "If you don't know what to do, click Cancel button."
    .LockSystem = True
    .CustomControl = New MyCustomControl()
    .Show()
End With

Features

Almost Full Compatibility with the MessageBox Class

Existing code can be easily changed to one which uses the VDialog class instead of the MessageBox class by changing the MessageBox.Show(…) invocation to the VDialog.Show(…) invocation.

Supported methods:

VB.NET
Show(String) As DialogResult
Show(String, String) As DialogResult
Show(String, String, MessageBoxButtons) As DialogResult
Show(String, String, MessageBoxButtons, MessageBoxIcon) As DialogResult
Show(String, String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton) _
	As DialogResult
Show(String, String, MessageBoxButtons, MessageBoxIcon, _
	MessageBoxDefaultButton, MessageBoxOptions) As DialogResult
Show(IWin32Window, String) As DialogResult
Show(IWin32Window, String, String) As DialogResult
Show(IWin32Window, String, String, MessageBoxButtons) As DialogResult
Show(IWin32Window, String, String, MessageBoxButtons, MessageBoxIcon) As DialogResult
Show(IWin32Window, String, String, MessageBoxButtons, _
	MessageBoxIcon, MessageBoxDefaultButton) As DialogResult

Advanced Usage

The VDialog class can also be used in another way. One can create a VDialog object and set its properties, such as:

  • Owner — Determines the parent of the VDialog message window.
  • Content, ContentLinks, WindowTitle and MainInstruction — Determines the content of the dialog window which will be displayed, the caption of the window, and the main instruction.
  • Buttons — Determines what buttons will be displayed on the VDialog message window. VDialogButton is a class containing UseCustomText, Text and VDialogResult properties, and also a Click event which is raised when the associated button is clicked (but before closing the window).
  • MainIcon, CustomMainIcon — The image shown at the left side of the window (or right side when right-to-left layout is used).
  • DefaultButton — Determines which button is initially focused.
  • RightToLeft and RightToLeftLayout — Determines whether the layout of the window should be "mirrored".
  • Result — Indicates the return value of the VDialog window.
  • LockSystem — Enables the UAC-like system locking behavior.
  • CustomControl — Provides an easy way to extend the VDialog window. It can be used to emulate the features of TaskDialog which are not supported yet.
  • VerificationText and VerificationFlagChecked — Manages the check box shown at the left side of the buttons. It can be used for "Don't show it again"-like check boxes.
  • Sound — Played when the dialog window is shown.
  • FooterText, FooterLinks, FooterIcon and CustomFooterIcon — Determines the text and the image of the footer.
  • ExpandedInformation, ExpandedInformationLinks, ExpandFooterArea, ExpandedByDefault, ExpandedControlText and CollapsedControlText — determines the look and behavior of the expand control and label with extra information.

Localization Support

The captions of the standard buttons (e.g. OK, Yes, Ignore, etc.) can be easily localized by translating the resources file. The English versions of these captions are contained in the Resources.resx file.

Images

The VDialogIcon class contains twelve read-only fields which provide access to Vista-like images, such as:

  • InformationInformation
  • QuestionQuestion
  • WarningWarning
  • ErrorError
  • SecurityShieldSecurityShield, SecurityShieldBlue, SecurityShieldGray
  • SecuritySuccessSecuritySuccess
  • SecurityQuestionSecurityQuestion
  • SecurityWarningSecurityWarning
  • SecurityErrorSecurityError
  • There is also the None field.

Assigning the VDialogIcon.Security* field (except the SecurityShield) to the MainIcon property of the VDialog class causes the appropriate gradient to be drawn beneath the icon and main instruction.

Sounds

The VDialogSound class provides access to six sounds (Default, Information, Question, Warning, Error, Security) that can be assigned to the Sound property of the VDialog class. Custom sound can be provided by an object which implements the ISound interface.

Command Links

There is an animated CommandLink control which can be used to build a custom control and then embed it in the VDialog.

Screenshot 5 - Command links

TODO

Although the VDialog class provides many useful properties, there are some features of TaskDialog that my VDialog does not implement yet, such as:

  • Full support for CommandLinks
  • RadioButtons
  • ProgressBar
  • Timer

These features can only be obtained by using custom controls.

History

  • 1.5 (15.10.2008) — Important! This is the last “standalone” version of the control. The next version is included in a new project hosted at CodePlex.
    • Parent window no longer loses focus in certain situations on Windows Vista
    • Added HotForeColor property to the CommandLink control
    • Added German localization (I would be grateful if someone checked it with German Windows Vista)
    • Fixed some bugs
  • 1.4 (02.01.2008)
    • Added support for Links
    • Fixed some bugs
  • 1.3 (12.12.2007)
    • Added partial support for CommandLinks
    • Added support for elevation (shield) icon
    • Fixed some bugs
  • 1.2 (05.12.2007)
    • Added XML documentation
    • Added Close method to the VDialog class
    • Added license
    • Minor bugs fixed
  • 1.1 (18.11.2007)
    • Renamed some properties so they are compliant with TaskDialog
    • Added sounds support
    • Added footer support
    • Added expandable information support
    • Added support for security dialogs
    • Minor bugs fixed
  • 1.0
    • 11.11.2007 — Added Vista-like images
    • 07.11.2007 — First version

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Software Developer
Poland Poland
I am a graduate of Wroclaw University of Science and Technology, Poland.

My interests: gardening, reading, programming, drawing, Japan, Spain.

Comments and Discussions

 
GeneralRe: C# version. Converted ! Pin
Xmen Real 15-May-11 14:43
professional Xmen Real 15-May-11 14:43 
GeneralRe: C# version. Converted ! Pin
Alucia8913-Jun-12 23:36
Alucia8913-Jun-12 23:36 
GeneralRe: C# version. Converted ! Pin
Xmen Real 14-Jun-12 0:00
professional Xmen Real 14-Jun-12 0:00 
GeneralRe: C# version. Converted ! Pin
Lukasz Sw.14-Jun-12 1:38
Lukasz Sw.14-Jun-12 1:38 
GeneralRightToLeftLayout in CustomControl Pin
PeaceTiger22-Apr-10 14:02
PeaceTiger22-Apr-10 14:02 
GeneralExcellent, and a question Pin
PeaceTiger22-Apr-10 13:19
PeaceTiger22-Apr-10 13:19 
GeneralRe: Excellent, and a question Pin
PeaceTiger22-Apr-10 13:23
PeaceTiger22-Apr-10 13:23 
RantNice work, C# VDialogTest attached Pin
c-w-m20-Aug-09 7:34
c-w-m20-Aug-09 7:34 
Yes, I'm still using .NET 2.0 - but want the UI of WPF/.NET 3.5, your work is helping me get there!

Thumbs Up | :thumbsup: Thanks

BTW: the code listing below is a C# version of the DialogTest, code conversion was done with the help of [^]

~~~~~~~~~~~~~~~~~~~~~~~
C# VDialogTest Implementation Steps
1. create new Windows Form project
2. add references
2.1 Microsoft.VisualBasic
2.2 VDialog
3. add MyCustomControl usercontrol
4. update files with the code listed below
4.1 Form1.cs
4.2 Form1.Designer.cs
4.3 MyCustomControl.Designer.cs
~~~~~~~~~~~~~~~~~~~~~~~

==============
4.1 File: Form1.cs
==============
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using LukeSw.Windows.Forms;
using Microsoft.VisualBasic; //Constants

namespace Csharp.VDialogTest {
public partial class Form1: Form {
public Form1() {
// This call is required by the Windows Form Designer.
InitializeComponent();

// Add any initialization after the InitializeComponent() call.
CheckForIllegalCrossThreadCalls=true;
}

private static void dddd1() {
VDialog.Show( null, "d1 This is a standard MessageBox-like window.", "Window Caption" );
}
private void dddd2() {
VDialog.Show( this, "d2 This is a standard MessageBox-like window.", "Window Caption" );
}
private void CommandLink1_Click( object sender, EventArgs e ) {
VDialog.Show(
this,
"This is a standard MessageBox-like window.",
"Window Caption" );
//SystemLocker.LockedInvoke(New System.Threading.ThreadStart(AddressOf dddd1))
//VDialog.Show(Me, "2his is a standard MessageBox-like window.", "Window Caption")
//SystemLocker.LockedInvoke(New System.Threading.ThreadStart(AddressOf dddd2))
//VDialog.Show(Me, "3his is a standard MessageBox-like window.", "Window Caption")
}

private void CommandLink2_Click( object sender, EventArgs e ) {
VDialog.Show(
this,
"Hello World!",
"Caption",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2 );
}

private void CommandLink3_Click( object sender, EventArgs e ) {
VDialog vd=new VDialog();
{
vd.Owner=this;
vd.WindowTitle="WindowTitle";
vd.MainInstruction="Main instruction";
vd.Content="Content";
vd.MainIcon=VDialogIcon.Warning;
vd.Buttons=new VDialogButton[] { new VDialogButton( VDialogResult.OK ) };
vd.Show();
}
}

private void CommandLink4_Click( object sender, EventArgs e ) {
{
VDialog vd=new VDialog();
{
vd.Owner=this;
vd.WindowTitle="Some window";
vd.MainInstruction="Please do something";
vd.CustomMainIcon=Icon.ToBitmap();
vd.Buttons=new VDialogButton[] {
new VDialogButton(VDialogResult.Ignore),
new VDialogButton(VDialogResult.Continue),
new VDialogButton(">> Click Me <<", Button_Click, true),
new VDialogButton(VDialogResult.Cancel) };
vd.DefaultButton=VDialogDefaultButton.None;
vd.Sound=VDialogSound.Security;
vd.VerificationText="Check me";
vd.Show();
}
}
}

private void CommandLink5_Click( object sender, EventArgs e ) {

VDialog vd=new VDialog(); {
vd.Owner=null;
vd.Buttons=new VDialogButton[] { new VDialogButton( VDialogResult.OK ) };
vd.Content="Please close this window.";
vd.MainIcon=VDialogIcon.SecuritySuccess;
vd.MainInstruction="SecuritySuccess";
vd.WindowTitle="Security Dialog (1/7)";
vd.Show();
vd.MainIcon=VDialogIcon.SecurityQuestion;
vd.MainInstruction="SecurityQuestion";
vd.WindowTitle="Security Dialog (2/7)";
vd.Show();
vd.MainIcon=VDialogIcon.SecurityWarning;
vd.MainInstruction="SecurityWarning";
vd.WindowTitle="Security Dialog (3/7)";
vd.Show();
vd.MainIcon=VDialogIcon.SecurityError;
vd.MainInstruction="SecurityError";
vd.WindowTitle="Security Dialog (4/7)";
vd.Show();
vd.MainIcon=VDialogIcon.SecurityShield;
vd.MainInstruction="SecurityShield";
vd.WindowTitle="Security Dialog (5/7)";
vd.Show();
vd.MainIcon=VDialogIcon.SecurityShieldBlue;
vd.MainInstruction="SecurityShieldBlue";
vd.WindowTitle="Security Dialog (6/7)";
vd.Show();
vd.MainIcon=VDialogIcon.SecurityShieldGray;
vd.MainInstruction="SecurityShieldGray";
vd.WindowTitle="Security Dialog (7/7)";
vd.Show();
}

}

private void CommandLink6_Click( object sender, EventArgs e ) {

VDialog vd=new VDialog(); {
vd.LinkClicked+=linkClicked;
vd.Owner=this;
vd.Buttons=new VDialogButton[] { new VDialogButton( VDialogResult.OK ) };
vd.WindowTitle="Another Example";
vd.MainInstruction="Expandable Dialog";
vd.MainIcon=VDialogIcon.Information;
vd.Content=
"In this example you can see that there is an additional"
+Constants.vbCrLf
+"footer and some expandable extra information.";
vd.ContentLinks.Add( vd.Content.IndexOf( "footer" ), 6 );
vd.ContentLinks[0].Name="Content";
vd.FooterIcon=VDialogIcon.Information;
vd.FooterText="This is the footer. You can click here.";
vd.FooterLinks.Add( vd.FooterText.IndexOf( "here" ), 4 );
vd.FooterLinks[0].Name="Footer";
vd.ExpandedControlText="Hide Extra Info";
vd.CollapsedControlText="Show Extra Info";
vd.ExpandedInformation="Extra Information";
vd.ExpandedInformationLinks.Add( vd.ExpandedInformation.IndexOf( "Information" ), 11 );
vd.ExpandedInformationLinks[0].Name="ExpandedInformation";
vd.ExpandFooterArea=true;
vd.ExpandedByDefault=true;
vd.Show();
vd.RightToLeft=System.Windows.Forms.RightToLeft.Yes;
vd.RightToLeftLayout=true;
vd.ExpandedByDefault=false;
vd.ExpandFooterArea=false;
vd.Show();
}
}

private void CommandLink7_Click( object sender, EventArgs e ) {

VDialog vd=new VDialog(); {
vd.Owner=this;
vd.WindowTitle="UAC-like window";
vd.MainInstruction="You must click OK button to continue";
vd.Buttons=new VDialogButton[] { new VDialogButton( VDialogResult.OK ), new VDialogButton( VDialogResult.Cancel ) };
vd.MainIcon=VDialogIcon.SecurityShieldBlue;
vd.DefaultButton=VDialogDefaultButton.None;
vd.Content="If you don't know what to do, click Cancel button.";
vd.LockSystem=true;
vd.CustomControl=new MyCustomControl();
vd.Show();
}

}

private void linkClicked(
object sender,
System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) {
VDialog.Show(
(IWin32Window)sender,
"You've clicked the link from the "
+e.Link.Name
+" label." );
}

private void Button_Click(
System.Object sender,
System.EventArgs e ) {
{
((Button)sender).Text="Thank you!";
((Button)sender).Image=null;
((Button)sender).Enabled=false;
}
}

private void ButtonClose_Click(
System.Object sender,
System.EventArgs e) {
Close();
}

}

}


==============
4.2 File:Form1.Designer.cs
==============
namespace Csharp.VDialogTest {
partial class Form1 {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components=null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose( bool disposing ) {
if(disposing&&(components!=null)) {
components.Dispose();
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.LabelTitle=new System.Windows.Forms.Label();
this.Panel1=new System.Windows.Forms.Panel();
this.ButtonClose=new System.Windows.Forms.Button();
this.LabelBevel=new System.Windows.Forms.Label();
this.CommandLink7=new LukeSw.Windows.Forms.CommandLink();
this.CommandLink6=new LukeSw.Windows.Forms.CommandLink();
this.CommandLink5=new LukeSw.Windows.Forms.CommandLink();
this.CommandLink4=new LukeSw.Windows.Forms.CommandLink();
this.CommandLink3=new LukeSw.Windows.Forms.CommandLink();
this.CommandLink2=new LukeSw.Windows.Forms.CommandLink();
this.CommandLink1=new LukeSw.Windows.Forms.CommandLink();
this.Panel1.SuspendLayout();
this.SuspendLayout();
//
// LabelTitle
//
this.LabelTitle.Anchor=((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top|System.Windows.Forms.AnchorStyles.Bottom)
|System.Windows.Forms.AnchorStyles.Left)));
this.LabelTitle.AutoSize=true;
this.LabelTitle.BackColor=System.Drawing.Color.Transparent;
this.LabelTitle.Font=new System.Drawing.Font( "Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)) );
this.LabelTitle.ForeColor=System.Drawing.SystemColors.HotTrack;
this.LabelTitle.Location=new System.Drawing.Point( 11, 13 );
this.LabelTitle.Margin=new System.Windows.Forms.Padding( 9, 16, 16, 16 );
this.LabelTitle.Name="LabelTitle";
this.LabelTitle.Size=new System.Drawing.Size( 292, 19 );
this.LabelTitle.TabIndex=10;
this.LabelTitle.Text="Choose a modal dialog window to show";
//
// Panel1
//
this.Panel1.BackColor=System.Drawing.SystemColors.Control;
this.Panel1.Controls.Add( this.ButtonClose );
this.Panel1.Dock=System.Windows.Forms.DockStyle.Bottom;
this.Panel1.Location=new System.Drawing.Point( 0, 360 );
this.Panel1.Name="Panel1";
this.Panel1.Size=new System.Drawing.Size( 390, 48 );
this.Panel1.TabIndex=18;
//
// ButtonClose
//
this.ButtonClose.Anchor=((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top|System.Windows.Forms.AnchorStyles.Right)));
this.ButtonClose.DialogResult=System.Windows.Forms.DialogResult.Cancel;
this.ButtonClose.Location=new System.Drawing.Point( 303, 12 );
this.ButtonClose.Margin=new System.Windows.Forms.Padding( 12 );
this.ButtonClose.Name="ButtonClose";
this.ButtonClose.Size=new System.Drawing.Size( 75, 23 );
this.ButtonClose.TabIndex=0;
this.ButtonClose.Text="Close";
this.ButtonClose.UseVisualStyleBackColor=true;
this.ButtonClose.Click+=new System.EventHandler( this.ButtonClose_Click );
//
// LabelBevel
//
this.LabelBevel.BorderStyle=System.Windows.Forms.BorderStyle.Fixed3D;
this.LabelBevel.Dock=System.Windows.Forms.DockStyle.Bottom;
this.LabelBevel.Location=new System.Drawing.Point( 0, 358 );
this.LabelBevel.Name="LabelBevel";
this.LabelBevel.Size=new System.Drawing.Size( 390, 2 );
this.LabelBevel.TabIndex=19;
//
// CommandLink7
//
this.CommandLink7.Location=new System.Drawing.Point( 40, 297 );
this.CommandLink7.Margin=new System.Windows.Forms.Padding( 3, 0, 3, 0 );
this.CommandLink7.Name="CommandLink7";
this.CommandLink7.ShowElevationIcon=true;
this.CommandLink7.Size=new System.Drawing.Size( 341, 41 );
this.CommandLink7.TabIndex=17;
this.CommandLink7.Text="Show system-locking TaskDialog-like window";
this.CommandLink7.Click+=new System.EventHandler( this.CommandLink7_Click );
//
// CommandLink6
//
this.CommandLink6.Location=new System.Drawing.Point( 40, 256 );
this.CommandLink6.Margin=new System.Windows.Forms.Padding( 3, 0, 3, 0 );
this.CommandLink6.Name="CommandLink6";
this.CommandLink6.Size=new System.Drawing.Size( 341, 41 );
this.CommandLink6.TabIndex=16;
this.CommandLink6.Text="Show expandable TaskDialog-like window";
this.CommandLink6.Click+=new System.EventHandler( this.CommandLink6_Click );
//
// CommandLink5
//
this.CommandLink5.Location=new System.Drawing.Point( 40, 215 );
this.CommandLink5.Margin=new System.Windows.Forms.Padding( 3, 0, 3, 0 );
this.CommandLink5.Name="CommandLink5";
this.CommandLink5.Size=new System.Drawing.Size( 341, 41 );
this.CommandLink5.TabIndex=15;
this.CommandLink5.Text="Show security TaskDialog-like windows";
this.CommandLink5.Click+=new System.EventHandler( this.CommandLink5_Click );
//
// CommandLink4
//
this.CommandLink4.Location=new System.Drawing.Point( 40, 174 );
this.CommandLink4.Margin=new System.Windows.Forms.Padding( 3, 0, 3, 0 );
this.CommandLink4.Name="CommandLink4";
this.CommandLink4.Size=new System.Drawing.Size( 341, 41 );
this.CommandLink4.TabIndex=14;
this.CommandLink4.Text="Show customized TaskDialog-like window";
this.CommandLink4.Click+=new System.EventHandler( this.CommandLink4_Click );
//
// CommandLink3
//
this.CommandLink3.Location=new System.Drawing.Point( 40, 133 );
this.CommandLink3.Margin=new System.Windows.Forms.Padding( 3, 0, 3, 0 );
this.CommandLink3.Name="CommandLink3";
this.CommandLink3.Size=new System.Drawing.Size( 341, 41 );
this.CommandLink3.TabIndex=13;
this.CommandLink3.Text="Show standard TaskDialog-like window";
this.CommandLink3.Click+=new System.EventHandler( this.CommandLink3_Click );
//
// CommandLink2
//
this.CommandLink2.Location=new System.Drawing.Point( 40, 92 );
this.CommandLink2.Margin=new System.Windows.Forms.Padding( 3, 0, 3, 0 );
this.CommandLink2.Name="CommandLink2";
this.CommandLink2.Size=new System.Drawing.Size( 341, 41 );
this.CommandLink2.TabIndex=12;
this.CommandLink2.Text="Show customized MessageBox-like window";
this.CommandLink2.Click+=new System.EventHandler( this.CommandLink2_Click );
//
// CommandLink1
//
this.CommandLink1.Location=new System.Drawing.Point( 40, 51 );
this.CommandLink1.Margin=new System.Windows.Forms.Padding( 3, 3, 3, 0 );
this.CommandLink1.Name="CommandLink1";
this.CommandLink1.Size=new System.Drawing.Size( 341, 41 );
this.CommandLink1.TabIndex=11;
this.CommandLink1.Text="Show standard MessageBox-like window";
this.CommandLink1.Click+=new System.EventHandler( this.CommandLink1_Click );
//
// Form1
//
this.AutoScaleDimensions=new System.Drawing.SizeF( 6F, 13F );
this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font;
this.BackColor=System.Drawing.Color.White;
this.ClientSize=new System.Drawing.Size( 390, 408 );
this.Controls.Add( this.LabelBevel );
this.Controls.Add( this.Panel1 );
this.Controls.Add( this.LabelTitle );
this.Controls.Add( this.CommandLink7 );
this.Controls.Add( this.CommandLink6 );
this.Controls.Add( this.CommandLink5 );
this.Controls.Add( this.CommandLink4 );
this.Controls.Add( this.CommandLink3 );
this.Controls.Add( this.CommandLink2 );
this.Controls.Add( this.CommandLink1 );
this.Name="Form1";
this.Text="VDialog Samples";
this.Panel1.ResumeLayout( false );
this.ResumeLayout( false );
this.PerformLayout();

}

#endregion

internal System.Windows.Forms.Label LabelTitle;
internal System.Windows.Forms.Panel Panel1;
internal System.Windows.Forms.Button ButtonClose;
internal System.Windows.Forms.Label LabelBevel;
internal LukeSw.Windows.Forms.CommandLink CommandLink7;
internal LukeSw.Windows.Forms.CommandLink CommandLink6;
internal LukeSw.Windows.Forms.CommandLink CommandLink5;
internal LukeSw.Windows.Forms.CommandLink CommandLink4;
internal LukeSw.Windows.Forms.CommandLink CommandLink3;
internal LukeSw.Windows.Forms.CommandLink CommandLink2;
internal LukeSw.Windows.Forms.CommandLink CommandLink1;
}
}


==============
4.3 File:MyCustomControl.Designer.cs
==============
namespace Csharp.VDialogTest {
partial class MyCustomControl {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components=null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose( bool disposing ) {
if(disposing&&(components!=null)) {
components.Dispose();
}
base.Dispose( disposing );
}

#region Component Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
components=new System.ComponentModel.Container();
this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font;

this.RadioButton1=new System.Windows.Forms.RadioButton();
this.RadioButton2=new System.Windows.Forms.RadioButton();
this.RadioButton3=new System.Windows.Forms.RadioButton();
this.ProgressBar1=new System.Windows.Forms.ProgressBar();
this.CommandLink1=new LukeSw.Windows.Forms.CommandLink();
this.CommandLink2=new LukeSw.Windows.Forms.CommandLink();
this.SuspendLayout();
//
//RadioButton1
//
this.RadioButton1.Dock=System.Windows.Forms.DockStyle.Top;
this.RadioButton1.Location=new System.Drawing.Point( 0, 0 );
this.RadioButton1.Name="RadioButton1";
this.RadioButton1.Size=new System.Drawing.Size( 154, 20 );
this.RadioButton1.TabIndex=0;
this.RadioButton1.TabStop=true;
this.RadioButton1.Text="RadioButton1";
this.RadioButton1.UseVisualStyleBackColor=true;
//
//RadioButton2
//
this.RadioButton2.Dock=System.Windows.Forms.DockStyle.Top;
this.RadioButton2.Location=new System.Drawing.Point( 0, 20 );
this.RadioButton2.Name="RadioButton2";
this.RadioButton2.Size=new System.Drawing.Size( 154, 20 );
this.RadioButton2.TabIndex=1;
this.RadioButton2.TabStop=true;
this.RadioButton2.Text="RadioButton2";
this.RadioButton2.UseVisualStyleBackColor=true;
//
//RadioButton3
//
this.RadioButton3.CheckAlign=System.Drawing.ContentAlignment.TopLeft;
this.RadioButton3.Dock=System.Windows.Forms.DockStyle.Top;
this.RadioButton3.Location=new System.Drawing.Point( 0, 40 );
this.RadioButton3.Name="RadioButton3";
this.RadioButton3.Size=new System.Drawing.Size( 154, 27 );
this.RadioButton3.TabIndex=2;
this.RadioButton3.TabStop=true;
this.RadioButton3.Text="RadioButton3";
this.RadioButton3.TextAlign=System.Drawing.ContentAlignment.TopLeft;
this.RadioButton3.UseVisualStyleBackColor=true;
//
//ProgressBar1
//
this.ProgressBar1.Dock=System.Windows.Forms.DockStyle.Top;
this.ProgressBar1.Location=new System.Drawing.Point( 0, 67 );
this.ProgressBar1.Name="ProgressBar1";
this.ProgressBar1.Size=new System.Drawing.Size( 154, 15 );
this.ProgressBar1.Style=System.Windows.Forms.ProgressBarStyle.Marquee;
this.ProgressBar1.TabIndex=3;
this.ProgressBar1.Value=50;
//
//CommandLink1
//
this.CommandLink1.Dock=System.Windows.Forms.DockStyle.Bottom;
this.CommandLink1.Location=new System.Drawing.Point( 0, 84 );
this.CommandLink1.Margin=new System.Windows.Forms.Padding( 3, 3, 3, 0 );
this.CommandLink1.Name="CommandLink1";
this.CommandLink1.Size=new System.Drawing.Size( 154, 41 );
this.CommandLink1.TabIndex=5;
this.CommandLink1.Text="CommandLink1";
//
//CommandLink2
//
this.CommandLink2.Dock=System.Windows.Forms.DockStyle.Bottom;
this.CommandLink2.Location=new System.Drawing.Point( 0, 125 );
this.CommandLink2.Margin=new System.Windows.Forms.Padding( 3, 0, 3, 3 );
this.CommandLink2.Name="CommandLink2";
this.CommandLink2.ShowElevationIcon=true;
this.CommandLink2.Size=new System.Drawing.Size( 154, 41 );
this.CommandLink2.TabIndex=5;
this.CommandLink2.Text="CommandLink2";
//
//MyCustomControl
//
this.AutoScaleDimensions=new System.Drawing.SizeF( 6f, 13f );
this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize=true;
this.Controls.Add( this.ProgressBar1 );
this.Controls.Add( this.CommandLink1 );
this.Controls.Add( this.RadioButton3 );
this.Controls.Add( this.RadioButton2 );
this.Controls.Add( this.RadioButton1 );
this.Controls.Add( this.CommandLink2 );
this.Name="MyCustomControl";
this.Size=new System.Drawing.Size( 154, 166 );

this.ResumeLayout( false );

}

#endregion

internal System.Windows.Forms.RadioButton RadioButton1;
internal System.Windows.Forms.RadioButton RadioButton2;
internal System.Windows.Forms.RadioButton RadioButton3;
internal System.Windows.Forms.ProgressBar ProgressBar1;
internal LukeSw.Windows.Forms.CommandLink CommandLink1;
internal LukeSw.Windows.Forms.CommandLink CommandLink2;

}
}
Generalgood work Pin
Donsw26-Jan-09 14:25
Donsw26-Jan-09 14:25 
QuestionSystem-Locking feature Pin
bobert_smallgeek29-Dec-08 11:46
bobert_smallgeek29-Dec-08 11:46 
GeneralC# Version PinPopular
melnac25-Dec-08 6:04
melnac25-Dec-08 6:04 
AnswerRe: C# Version Pin
DanMcX29-Mar-10 18:59
DanMcX29-Mar-10 18:59 
GeneralRe: C# Version Pin
melnac31-Mar-10 2:02
melnac31-Mar-10 2:02 
QuestionFallback on native API in Vista? Pin
Serge Wautier6-Oct-08 23:48
Serge Wautier6-Oct-08 23:48 
AnswerRe: Fallback on native API in Vista? Pin
Lukasz Sw.7-Oct-08 7:58
Lukasz Sw.7-Oct-08 7:58 
GeneralBug Pin
Julian-w19-May-08 8:17
Julian-w19-May-08 8:17 
Generalvdialog usage Pin
David de Leeuw16-Apr-08 1:26
David de Leeuw16-Apr-08 1:26 
GeneralRe: vdialog usage Pin
Lukasz Sw.17-Apr-08 10:48
Lukasz Sw.17-Apr-08 10:48 
GeneralRe: vdialog usage Pin
David de Leeuw4-May-08 1:13
David de Leeuw4-May-08 1:13 
GeneralRe: vdialog usage Pin
Lukasz Sw.4-May-08 6:49
Lukasz Sw.4-May-08 6:49 
QuestionCan't run the sample button 'Show system-locking TaskDialog-like window' Pin
Harbring15-Apr-08 1:10
Harbring15-Apr-08 1:10 
GeneralRe: Can't run the sample button 'Show system-locking TaskDialog-like window' Pin
Lukasz Sw.17-Apr-08 10:44
Lukasz Sw.17-Apr-08 10:44 
GeneralRe: Can't run the sample button 'Show system-locking TaskDialog-like window' [modified] Pin
Harbring18-Apr-08 0:23
Harbring18-Apr-08 0:23 
GeneralRe: Can't run the sample button 'Show system-locking TaskDialog-like window' Pin
Lukasz Sw.18-Apr-08 5:38
Lukasz Sw.18-Apr-08 5:38 
GeneralScreen center Pin
Pndm11-Apr-08 0:20
Pndm11-Apr-08 0:20 

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.