The About, The Codes .
Return


The About, The Codes ...

- The text Code created by the wizard is black.
-
The new text Code to be add is red.
-
The text Code to be remove is navy and Strikethrough effects.

// About.java
import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import com.ms.wfc.html.*;
import com.ms.wfc.io.*;
import com.ms.wfc.data.*;
import com.ms.wfc.data.ui.*;


/**
* This class can take a variable number of parameters on the command
* line. Program execution begins with the main() method. The class
* constructor is not invoked unless an object of type 'About'
* created in the main() method.
*/
public class About extends Form
{
// Variables
Recordset m_rs_About;
Connection m_con_About;
File fil;

Image imag;
String CurrentDirectory;

// Procedure
protected void finalize()
{
try
{
m_rs_About.close();
m_con_About.close();
}
catch (Exception e)
{
handleADOException( e );
}
}

public About()
{
super();

// Required for Visual J++ Form Designer support
initForm();
this.show();
this.update();

CurrentDirectory = fil.getCurrentDirectory();

//TODO: Add any constructor code after initForm call
try
{
// Displays First record of KJV.mdb file
openDataConnection_About();
m_rs_About.moveFirst();
edinfo.setText(m_rs_About.getField("TextData").getString());
// PictureBox control
this.pictureBox1.setImage(imag.loadImage(fil.open(String.valueOf(CurrentDirectory.toString() + "\\Pic\\diam1.bmp"))));
}
catch (Exception e)
{
handleADOException( e );
}

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

/**
* About overrides dispose so it can clean up the
* component list.
*/
public void dispose()
{
super.dispose();
components.dispose();
}
public void formClose(Event e)
{
this.close();
}
// Button control
private void btnClose_click(Object source, Event e)
{
this.close();
}

// Procedure, DataBase
void openDataConnection_About()
{
m_con_About = new Connection();
m_rs_About = new Recordset();
m_con_About.setConnectionString ("PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" + CurrentDirectory.toString() + "\\Pic\\KJV.mdb");
m_con_About.setCursorLocation (AdoEnums.CursorLocation.CLIENT);
m_con_About.open();
m_rs_About.setActiveConnection(m_con_About);
m_rs_About.setSource("select Book, TextData from BibleTable where BibleTable.Book = '00a'");
m_rs_About.setCursorType(AdoEnums.CursorType.STATIC);
m_rs_About.setCursorLocation(AdoEnums.CursorLocation.CLIENT);
m_rs_About.setLockType(AdoEnums.LockType.OPTIMISTIC);
m_rs_About.open();
}

void handleADOException(Exception e)
{
e.printStackTrace();
MessageBox.show( e.toString(), "About" );
}
// Button control
private void btncreated_click(Object source, Event e)
{
Biography myBiography = new Biography();
myBiography.show();
}


/**
* NOTE: The following code is required by the Visual J++ form
* designer. It can be modified using the form editor. Do not
* modify it using the code editor.
*/
Container components = new Container();



PictureBox pictureBox1 = new PictureBox();
Edit edinfo = new Edit();
Button btnClose = new Button();
Label lbKJVinfo = new Label();
Button btncteated = new Button();

private void initForm()
{
this.setText("About...");

this.setClientSize (new Point(300,300));
this.setAutoScaleBaseSize(13);

this.setClientSize(new Point(342, 154));
this.setMaximizeBox(false);
this.setStartPosition(FormStartPosition.CENTER_SCREEN);

pictureBox1.setLocation(new Point(8, 8));
pictureBox1.setSize(new Point(64, 144));
pictureBox1.setTabIndex(0);
pictureBox1.setTabStop(false);
pictureBox1.setText("pictureBox1");

edinfo.setBackColor(Color.INACTIVECAPTIONTEXT);
edinfo.setLocation(new Point(88, 32));
edinfo.setSize(new Point(248, 88));
edinfo.setTabIndex(1);
edinfo.setText("");
edinfo.setHideSelection(false);
edinfo.setMultiline(true);
edinfo.setReadOnly(true);

btnClose.setLocation(new Point(248, 128));
btnClose.setSize(new Point(84, 23));
btnClose.setTabIndex(2);
btnClose.setText("Close");

lbKJVinfo.setFont(new Font("Times New Roman", 10.0f, FontSize.POINTS, FontWeight.BOLD, true, false, false, CharacterSet.DEFAULT, 0));
lbKJVinfo.setLocation(new Point(88, 8));
lbKJVinfo.setSize(new Point(144, 16));
lbKJVinfo.setTabIndex(3);
lbKJVinfo.setTabStop(false);
lbKJVinfo.setText("KJV database info.");

btncteated.setLocation(new Point(152, 128));
btncteated.setSize(new Point(84, 23));
btncteated.setTabIndex(4);
btncteated.setText("Created");

this.setNewControls(new Control[] {
btncteated,
lbKJVinfo,
btnClose,
edinfo,
pictureBox1});
}


/**
* The main entry point for the application.
*
* @param args Array of parameters passed to the application
* via the command line.
*/
public static void main(String args[])
{
Application.run(new About());
}
}