VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Hi this if from Hiten Patel here i will provide u one code through that code u can easily known con

by Hiten Patel (3 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 5th January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Hi this if from Hiten Patel here i will provide u one code through that code u can easily known controls like timer radiobutton groupbox

Rate Hi this if from Hiten Patel here i will provide u one code through that code u can easily known con



using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;

namespace Demoto7a47
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.LinkLabel LLB1;
private System.Windows.Forms.CheckBox CB1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RadioButton RB1;
private System.Windows.Forms.RadioButton RB2;
private System.Windows.Forms.Button BtnStart;
private System.Windows.Forms.Button BtnLeft;
private System.Windows.Forms.Button BtnRight;
private System.Windows.Forms.Button BtnStop;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Timer timer1;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.TrackBar TB1;
private System.Windows.Forms.Label label2;
string lftrt;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (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.components = new System.ComponentModel.Container();
this.BtnStart = new System.Windows.Forms.Button();
this.BtnStop = new System.Windows.Forms.Button();
this.RB2 = new System.Windows.Forms.RadioButton();
this.panel1 = new System.Windows.Forms.Panel();
this.CB1 = new System.Windows.Forms.CheckBox();
this.LLB1 = new System.Windows.Forms.LinkLabel();
this.label1 = new System.Windows.Forms.Label();
this.BtnLeft = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.BtnRight = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.RB1 = new System.Windows.Forms.RadioButton();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.TB1 = new System.Windows.Forms.TrackBar();
this.label2 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.TB1)).BeginInit();
this.SuspendLayout();
// 
// BtnStart
// 
this.BtnStart.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.BtnStart.Location = new System.Drawing.Point(8, 32);
this.BtnStart.Name = "BtnStart";
this.BtnStart.Size = new System.Drawing.Size(56, 23);
this.BtnStart.TabIndex = 0;
this.BtnStart.Text = "Start";
this.BtnStart.Click += new System.EventHandler(this.BtnStart_Click);
// 
// BtnStop
// 
this.BtnStop.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.BtnStop.Location = new System.Drawing.Point(184, 32);
this.BtnStop.Name = "BtnStop";
this.BtnStop.Size = new System.Drawing.Size(56, 23);
this.BtnStop.TabIndex = 0;
this.BtnStop.Text = "Stop";
this.BtnStop.Click += new System.EventHandler(this.BtnStop_Click);
// 
// RB2
// 
this.RB2.Location = new System.Drawing.Point(128, 24);
this.RB2.Name = "RB2";
this.RB2.TabIndex = 0;
this.RB2.Text = "Show Panel";
this.RB2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.RB2.CheckedChanged += new System.EventHandler(this.RB2_CheckedChanged);
// 
// panel1
// 
this.panel1.Controls.AddRange(new System.Windows.Forms.Control[] {
 this.CB1,
 this.LLB1});
this.panel1.Location = new System.Drawing.Point(8, 8);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(248, 48);
this.panel1.TabIndex = 0;
// 
// CB1
// 
this.CB1.Location = new System.Drawing.Point(144, 12);
this.CB1.Name = "CB1";
this.CB1.TabIndex = 1;
this.CB1.Text = "Click to Enable";
this.CB1.CheckedChanged += new System.EventHandler(this.CB1_CheckedChanged);
// 
// LLB1
// 
this.LLB1.AutoSize = true;
this.LLB1.Enabled = false;
this.LLB1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.LLB1.Location = new System.Drawing.Point(8, 16);
this.LLB1.Name = "LLB1";
this.LLB1.Size = new System.Drawing.Size(129, 13);
this.LLB1.TabIndex = 0;
this.LLB1.TabStop = true;
this.LLB1.Text = "Click to go MSDN Online";
this.LLB1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LLB1_LinkClicked);
// 
// label1
// 
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.ForeColor = System.Drawing.SystemColors.Desktop;
this.label1.Location = new System.Drawing.Point(272, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(316, 24);
this.label1.TabIndex = 2;
this.label1.Text = "Go Msdn Online through Panel";
// 
// BtnLeft
// 
this.BtnLeft.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.BtnLeft.Location = new System.Drawing.Point(80, 32);
this.BtnLeft.Name = "BtnLeft";
this.BtnLeft.Size = new System.Drawing.Size(40, 23);
this.BtnLeft.TabIndex = 0;
this.BtnLeft.Text = "<";
this.BtnLeft.Click += new System.EventHandler(this.BtnLeft_Click);
// 
// groupBox1
// 
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.BtnStop,
this.BtnRight,
this.BtnLeft,
this.BtnStart});
this.groupBox1.Location = new System.Drawing.Point(8, 120);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(248, 72);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Navigation Bar";
// 
// BtnRight
// 
this.BtnRight.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.BtnRight.Location = new System.Drawing.Point(128, 32);
this.BtnRight.Name = "BtnRight";
this.BtnRight.Size = new System.Drawing.Size(40, 23);
this.BtnRight.TabIndex = 0;
this.BtnRight.Text = ">";
this.BtnRight.Click += new System.EventHandler(this.BtnRight_Click);
// 
// groupBox2
// 
this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
this.RB2,
this.RB1});
this.groupBox2.Location = new System.Drawing.Point(8, 208);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(248, 56);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Show/Hide Panel1";
// 
// RB1
// 
this.RB1.Appearance = System.Windows.Forms.Appearance.Button;
this.RB1.Location = new System.Drawing.Point(16, 24);
this.RB1.Name = "RB1";
this.RB1.TabIndex = 0;
this.RB1.Text = "Hide Panel";
this.RB1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.RB1.CheckedChanged += new System.EventHandler(this.RB1_CheckedChanged);
// 
// timer1
// 
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// 
// TB1
// 
this.TB1.Location = new System.Drawing.Point(0, 64);
this.TB1.Maximum = 500;
this.TB1.Minimum = 1;
this.TB1.Name = "TB1";
this.TB1.Size = new System.Drawing.Size(232, 42);
this.TB1.TabIndex = 3;
this.TB1.Value = 1;
this.TB1.Scroll += new System.EventHandler(this.TB1_Scroll);
// 
// label2
// 
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(232, 72);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(0, 13);
this.label2.TabIndex = 4;
// 
// Form1
// 
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(264, 273);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
  this.label2,
  this.TB1,
  this.label1,
  this.groupBox2,
  this.groupBox1,
  this.panel1});
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.panel1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.TB1)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() 
{
Application.Run(new Form1());
}

private void CB1_CheckedChanged(object sender, System.EventArgs e)
{
if(CB1.Checked==true)
{
CB1.Text="Click to Disable";
LLB1.Enabled=true;
}
else
{
CB1.Text="Click to Enable";
LLB1.Enabled=false;
}
}

private void Form1_Load(object sender, System.EventArgs e)
{
RB2.Checked=true;
TB1.Value = 200;

}

private void LLB1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("IExplore","http://www.geocities.com/hpatel4u");
}

private void RB1_CheckedChanged(object sender, System.EventArgs e)
{
panel1.Visible=false;
}

private void RB2_CheckedChanged(object sender, System.EventArgs e)
{
panel1.Visible=true;
}

private void BtnStart_Click(object sender, System.EventArgs e)
{
timer1.Start();
}

private void BtnStop_Click(object sender, System.EventArgs e)
{
timer1.Stop();
}

private void BtnLeft_Click(object sender, System.EventArgs e)
{
lftrt=BtnLeft.Text;
MessageBox.Show(lftrt);
}

private void timer1_Tick(object sender, System.EventArgs e)
{
if(lftrt=="<")
{
label1.Left = label1.Left - 5;
//this.Left = this.Left - 10;
if(label1.Left==-328)
label1.Left=272;
this.Text=label1.Left.ToString();
}
else
{
label1.Left = label1.Left + 5;
//this.Left = this.Left + 10;
if(label1.Left==272)
label1.Left=-328;
this.Text=label1.Left.ToString();
}
}

private void BtnRight_Click(object sender, System.EventArgs e)
{
lftrt=BtnRight.Text;
MessageBox.Show(lftrt);
}

private void TB1_Scroll(object sender, System.EventArgs e)
{
timer1.Interval=TB1.Value;
label2.Text=TB1.Value.ToString();
}


}
}


Download this snippet    Add to My Saved Code

Hi this if from Hiten Patel here i will provide u one code through that code u can easily known con Comments

No comments have been posted about Hi this if from Hiten Patel here i will provide u one code through that code u can easily known con. Why not be the first to post a comment about Hi this if from Hiten Patel here i will provide u one code through that code u can easily known con.

Post your comment

Subject:
Message:
0/1000 characters