In one of the previous posting there is a Wizard implementation which used console application and multiple forms. But sometimes requirements are so that implementation needed to some sort of Wizard type but not with all pomp and show, even time constraint makes it hard to achieve an evolving application.
Creating Wizard using tab control is the other to do that, it is simple way to do that. It is a single form implementation with Wizard flavor. This implementation has following basic tweaks to achieve, rest of the implementations and functionality are user specific:
Implementation:
Following changes in Form.Designer.cs is the only thing needed. Add Following code at the end to inherit the TabControl class.
Changes in Form class, replace the TabControl reference with WizardTabControl
Creating Wizard using tab control is the other to do that, it is simple way to do that. It is a single form implementation with Wizard flavor. This implementation has following basic tweaks to achieve, rest of the implementations and functionality are user specific:
- Inherit TabControl and hide tabs by supressing TCM_ADJUSTRECT
- Then replace the instance of TabControl Class object initialisation with your class (in my case I names WizardTabControl). Do this replacement once you have completed the screen design and feature is complete.
- Set the dock property to Fill for TabPage
Implementation:
Following changes in Form.Designer.cs is the only thing needed. Add Following code at the end to inherit the TabControl class.
namespace System.Windows.Forms { public class WizardTabControl : TabControl { protected override void WndProc(ref Message m) { if (m.Msg == 0x1328 && !DesignMode) // Hide tabs by trapping the TCM_ADJUSTRECT message m.Result = IntPtr.Zero; else base.WndProc(ref m); } } }
Changes in Form class, replace the TabControl reference with WizardTabControl
private System.Windows.Forms.WizardTabControl tabControl1; private void InitializeComponent() { this.tabControl1 = new System.Windows.Forms.WizardTabControl(); }
Thanks!! very usefull !
ReplyDeleteThanks for very precise information.
ReplyDeleteI appretiate the effort you took for this blog !!
Rak
Very Helpful! Thanks.
ReplyDeletewhat effort!? this is copy & paste from the web
ReplyDeleteCall girls in Guwahati
ReplyDeleteCall girls in Ranchi
Call girls in Gurgaon
Call girls in Chandigarh
Call girls in Mumbai
Call girls in Pune
Very nice post I really enjoyed it...You can also visit my website for
ReplyDeleteEscorts in Bangalore
Escorts in Kolkata
Escorts in Lucknow
Escorts in Jammu
Escorts in Chandigarh
Escorts in Guwahati
ReplyDeleteEscorts in Ranchi
Escorts in Gurgaon
Escorts in Chandigarh
Escorts in Pune
=
👉Escorts in Jaipur
ReplyDelete👉Escorts in Jaipur
👉Escorts in Jaipur
👉Escorts in Delhi
👉Escorts in Guwahati
👉Escorts in Guwahati
👉Escorts in Guwahati
👉Escorts in Guwahati