|
The Form design,
Biography.jsl
Create Visual J# .Net Forn - biography.jsl
Classes used in this
Form: Timer,
PictureBox, Label,
Button
- On the View menu ,
click Solution Explorer
- In Solution
Explorer, right click the App-VJSNet, select Add
on the shortcut menu to open other shortcut menu, click
Add New Item, the Add New Item - App-VJSNet dialog
box appears.
- In the Add New
Item -App-VJSNet dialog box:
- In the Categories
pane, select Local Project Items
- In the Templates
pane, select Windows form . A message appears -
(a form for Windows Applications).
- In the Name
box, type Biography.jsl
- Click Open
- In the windows
Forms Designer appears the empty window Form
design
|
1. |
Add picture file ...
|
|
- From the CD-Rom -
Teach_VNet, copy the bmp file
butterfly2.bmp
(\\App-VJNet\Pic\diam1.bmp) to the folder
c:\App-VJNet\Pic
- On the
Projet menu , click Add Existing Item
..., Add Existing Item - App-VJNet dialog box
appears, select the files butterfly2.bmp
of the folder c:\App-VJSNet\Pic, and
then click Open.
|
2. |
The Biography.jsl
design |
|
 |
The Properties of
the Form - Biography.jsl... |
Name: Icon: Maximize: Menu: Size: Start
Position: Text: Window
State: |
Biography Icon False (none) 488,216 CenterScreen Biography
... Normal | | | |
3. |
From the Toolbox/Windows Form add these
controls .... Tree PictureBox controls, eight
Label controls and one Button
control. |
|
- Add the PictureBox
control - PictureBox1,
PictureBox Properties:
Name: Image: Size
Mode: |
PictureBox1 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App-VJSNet\Pic\butterfly1.bmp
- Add the PictureBox
control - PictureBox2
Properties:
Name: Image: Size
Mode: |
PictureBox2 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App-VJSNet\Pic\butterfly1.bmp
- Add the PictureBox
control - PictureBox3, PictureBox
Properties:
Name: Image: Size
Mode: |
PictureBox3 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App-VJSNet\Pic\butterfly2.bmp
- Add the Label
control
- Label1, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label1 Microsoft Sans Serif,
8.25pt 344,16 Name: Chucri Simon
Zouein. TopLeft | |
- Add the Label
control
- Label2, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label2 Microsoft Sans Serif,
8.25pt 344,16 Address: Lebanon, Beirut,
Sed El Baouchrie,
... TopLeft | |
- Add the Label
control
- Label3, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label3 Microsoft Sans Serif,
8.25pt 344,16 Signification: Engineer on
Computing and
... TopLeft | |
- Add the Label
control
- Label4, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label4 Microsoft Sans Serif,
8.25pt 344,16 Tel: 961.
01.691436. TopLeft | |
- Add the Label
control
- Label5, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label5 Microsoft Sans Serif,
8.25pt 344,16 Web:
www.puresoftwarecode.com
TopLeft | |
- Add the Label
control
- Label6, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label6 Microsoft Sans Serif,
8.25pt 344,16 E-mail:
info@puresoftwarecode.com TopLeft | |
- Add the Label
control
- Label7, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label7 Microsoft Sans Serif,
8.25pt 344,16 All right reserved
TopLeft | |
- Add the Label
control
- Line1, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Line1 Microsoft Sans Serif,
8.25pt 344,16
TopLeft | |
- Add the Button
control - btnDone, Button
Properties:
Name: BackColor: Size: Text: |
btnDone Scrollbar 80,24 Done | | | | |
|
Biography.jsl file, the codes after modification
...
The text
Code
is red color & Bold, corresponding to Load data
in the Statusbar control The text Code is
navy color & Bold,
correspondig to public access on one or more
declared programming elements |
|
package
App_VJSNet; import
System.Drawing.*;
import System.Collections.*;
import System.ComponentModel.*;
import System.Windows.Forms.*;
import App_VJSNet.*;
/**
* Summary description for Biography.
*/
public
class
Biography extends
System.Windows.Forms.Form
{
System.Windows.Forms.Label Label7;
private
System.Windows.Forms.Timer timer1;
private
System.Windows.Forms.Button btnDone;
public
System.Windows.Forms.Label Line1;
System.Windows.Forms.Label label6;
System.Windows.Forms.Label Label3;
System.Windows.Forms.Label Label5;
System.Windows.Forms.Label Label4;
System.Windows.Forms.Label Label2;
System.Windows.Forms.Label Label1;
private
System.Windows.Forms.PictureBox pictureBox3;
private
System.Windows.Forms.PictureBox pictureBox2;
private
System.Windows.Forms.PictureBox pictureBox1;
private
System.ComponentModel.IContainer components;
MainForm fm =
new
MainForm();
int
IcoNmbr = 0;
public
Biography()
{
//
// Required for
Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any
constructor code after InitializeComponent call
//
}
/**
* Clean up any resources being used.
*/
protected
void
Dispose(boolean
disposing)
{
if
(disposing)
{
if
(components != null)
{
components.Dispose();
}
}
super.Dispose(disposing);
}
#region Windows Form Designer
generated code
/**
* Required method for Designer support - do not modify
* the contents of this method with the code editor.
*/
private
void
InitializeComponent()
{
this.components
= new
System.ComponentModel.Container();
System.Resources.ResourceManager resources =
new
System.Resources.ResourceManager(Biography.class.ToType());
this.Label7
= new
System.Windows.Forms.Label();
this.timer1
= new
System.Windows.Forms.Timer(this.components);
this.btnDone
= new
System.Windows.Forms.Button();
this.Line1
= new
System.Windows.Forms.Label();
this.label6
= new
System.Windows.Forms.Label();
this.Label3
= new
System.Windows.Forms.Label();
this.Label5
= new
System.Windows.Forms.Label();
this.Label4
= new
System.Windows.Forms.Label();
this.Label2
= new
System.Windows.Forms.Label();
this.Label1
= new
System.Windows.Forms.Label();
this.pictureBox3
= new
System.Windows.Forms.PictureBox();
this.pictureBox2
= new
System.Windows.Forms.PictureBox();
this.pictureBox1
= new
System.Windows.Forms.PictureBox();
this.SuspendLayout();
//
// Label7
//
this.Label7.set_Location(new
System.Drawing.Point(88, 160));
this.Label7.set_Name("Label7");
this.Label7.set_Size(new
System.Drawing.Size(160, 16));
this.Label7.set_TabIndex(8);
this.Label7.set_Text("All
right reserved ... ");
//
// timer1
//
this.timer1.set_Enabled(true);
this.timer1.add_Tick(
new
System.EventHandler(this.timer1_Tick)
);
//
// btnDone
//
this.btnDone.set_Font(new
System.Drawing.Font("Times New Roman", 9.75F,
System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((ubyte)(System.Byte)(((ubyte)0)))));
this.btnDone.set_Location(new
System.Drawing.Point(376, 160));
this.btnDone.set_Name("btnDone");
this.btnDone.set_TabIndex(0);
this.btnDone.set_Text("Done");
this.btnDone.add_Click(
new
System.EventHandler(this.btnDone_Click)
);
//
// Line1
//
this.Line1.set_BackColor(System.Drawing.SystemColors.get_WindowText());
this.Line1.set_Location(new
System.Drawing.Point(88, 152));
this.Line1.set_Name("Line1");
this.Line1.set_Size(new
System.Drawing.Size(368, 1));
this.Line1.set_TabIndex(7);
//
// label6
//
this.label6.set_Location(new
System.Drawing.Point(96, 128));
this.label6.set_Name("label6");
this.label6.set_Size(new
System.Drawing.Size(304, 16));
this.label6.set_TabIndex(6);
this.label6.set_Text("E-mail:
info@puresoftwarecode.com");
//
// Label3
//
this.Label3.set_Location(new
System.Drawing.Point(96, 56));
this.Label3.set_Name("Label3");
this.Label3.set_Size(new
System.Drawing.Size(360, 16));
this.Label3.set_TabIndex(3);
this.Label3.set_Text("Signification:
Engineer on Computing and Software Systems Science.");
//
// Label5
//
this.Label5.set_Location(new
System.Drawing.Point(96, 104));
this.Label5.set_Name("Label5");
this.Label5.set_Size(new
System.Drawing.Size(304, 16));
this.Label5.set_TabIndex(5);
this.Label5.set_Text("Web:
www.puresoftwarecode.com ");
//
// Label4
//
this.Label4.set_Location(new
System.Drawing.Point(96, 80));
this.Label4.set_Name("Label4");
this.Label4.set_Size(new
System.Drawing.Size(304, 16));
this.Label4.set_TabIndex(4);
this.Label4.set_Text("Tel:
961. 01.691436.");
//
// Label2
//
this.Label2.set_Location(new
System.Drawing.Point(96, 32));
this.Label2.set_Name("Label2");
this.Label2.set_Size(new
System.Drawing.Size(392, 16));
this.Label2.set_TabIndex(2);
this.Label2.set_Text("Address:
Lebanon, Beirut, Sed El Baouchrie, Ferdaous Str.,
Korlokian Bld. " +
"");
//
// Label1
//
this.Label1.set_Location(new
System.Drawing.Point(96, 8));
this.Label1.set_Name("Label1");
this.Label1.set_Size(new
System.Drawing.Size(304, 16));
this.Label1.set_TabIndex(1);
this.Label1.set_Text("Name:
Chucri Simon Zouein.");
//
// pictureBox3
//
this.pictureBox3.set_Image(((System.Drawing.Image)(resources.GetObject("pictureBox3.Image"))));
this.pictureBox3.set_Location(new
System.Drawing.Point(208, 192));
this.pictureBox3.set_Name("pictureBox3");
this.pictureBox3.set_Size(new
System.Drawing.Size(77, 77));
this.pictureBox3.set_SizeMode(System.Windows.Forms.PictureBoxSizeMode.AutoSize);
this.pictureBox3.set_TabIndex(28);
this.pictureBox3.set_TabStop(false);
//
// pictureBox2
//
this.pictureBox2.set_Image(((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))));
this.pictureBox2.set_Location(new
System.Drawing.Point(112, 192));
this.pictureBox2.set_Name("pictureBox2");
this.pictureBox2.set_Size(new
System.Drawing.Size(77, 77));
this.pictureBox2.set_SizeMode(System.Windows.Forms.PictureBoxSizeMode.AutoSize);
this.pictureBox2.set_TabIndex(27);
this.pictureBox2.set_TabStop(false);
//
// pictureBox1
//
this.pictureBox1.set_Image(((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))));
this.pictureBox1.set_Location(new
System.Drawing.Point(8, 32));
this.pictureBox1.set_Name("pictureBox1");
this.pictureBox1.set_Size(new
System.Drawing.Size(77, 77));
this.pictureBox1.set_SizeMode(System.Windows.Forms.PictureBoxSizeMode.AutoSize);
this.pictureBox1.set_TabIndex(26);
this.pictureBox1.set_TabStop(false);
//
// Biography
//
this.set_AutoScaleBaseSize(new
System.Drawing.Size(5, 13));
this.set_ClientSize(new
System.Drawing.Size(482, 274));
this.get_Controls().Add(this.btnDone);
this.get_Controls().Add(this.Line1);
this.get_Controls().Add(this.label6);
this.get_Controls().Add(this.Label3);
this.get_Controls().Add(this.Label5);
this.get_Controls().Add(this.Label4);
this.get_Controls().Add(this.Label2);
this.get_Controls().Add(this.Label1);
this.get_Controls().Add(this.pictureBox3);
this.get_Controls().Add(this.pictureBox2);
this.get_Controls().Add(this.pictureBox1);
this.get_Controls().Add(this.Label7);
this.set_FormBorderStyle(System.Windows.Forms.FormBorderStyle.FixedToolWindow);
this.set_Name("Biography");
this.set_StartPosition(System.Windows.Forms.FormStartPosition.CenterScreen);
this.set_Text("Created
by ...");
this.add_Load(
new
System.EventHandler(this.Biography_Load)
);
this.ResumeLayout(false);
}
#endregion .
private
void
Biography_Load (Object sender, System.EventArgs e)
{
// StatusBar
Panel N1 = Message
fm.Show();
fm.statusBarPanel1.set_Text("Ready... ");
fm.Refresh();
}
private
void
btnDone_Click (Object sender, System.EventArgs e)
{
this.Close();
}
private
void
timer1_Tick (Object sender, System.EventArgs e)
{
if
(IcoNmbr == 0)
{
this.pictureBox1.set_Image(this.pictureBox2.get_Image());
IcoNmbr = 1;
}
else
{
this.pictureBox1.set_Image(this.pictureBox3.get_Image());
IcoNmbr = 0;
}
}
} | | |
|
|