Feb
28
Event Source: From where event generate like click
Event Listener: Which will listen the event
Event Handler: The code which will handle the event
Event Handling Process Diagram
Event Handling Process through VB Example
Feb
28
Event Source: From where event generate like click
Event Listener: Which will listen the event
Event Handler: The code which will handle the event
Feb
27
Variables are named storage locations whose values can be manipulated during the execution of program i.e., during the program-run.
Data types are means to identify the type of data and associated operations with it.
Categories of Data Types
In VB, we can divide the data types in two major categories:
1. Numeric Data Types:
Numeric data are the data that consists of numbers, which can be used in calculations. In VB, the numeric data can be represented in seven ways through following seven data types.
Type | Storage |
Byte | 1 byte |
Integer | 2 bytes |
Long | 4 bytes |
Single | 4 bytes |
Double | 8 bytes |
Currency | 8 bytes |
Decimal | 12 bytes |
2. Non-Numeric Data Types:
Non-numeric data values are those that cannot participate in calculations e.g., a string or a true value or a stored form etc. There are basically five (5) non-numeric data types in VB but two of these data types can further divided into two subtypes. Thus, the following table lists these seven non-numeric data types
Type | Storage |
String (fixed length) | Length of string |
String (variable length) | Length + 10 bytes |
Date | 8 bytes |
Boolean | 2 bytes |
Object | 4 bytes |
Variant (numeric) | 16 bytes |
Variant (text) | Length + 22 bytes |
The size of a fixed length string remains the same as declared, regardless of the information stored in it. However, variable length strings take the size equals to the number of characters assigned to it plus 10 bytes.
Feb
19
Feb
18
Unit 1:
Introduction of Visual Basic: Variable Names, Data Types, Assignment, If-then, If-then-else, expression, print statement, arrays, variable declaration, Built-in & User Defined types, Subroutine and functions, Boolean Operators, Arithmetic Operator, For-next, do-loop, while-wend, procedure/Public, Private and Static & Dim Statement.
Unit 2:
Structure of VB Program: Forms & Built in Controls, Properties and events, Code Module, Scale Modes, Printer Object (Printing text, setting font, graphics), Common dialog Boxes, picture controls, image-controls, send keys, MS-Common controls, Error Handling, Classes, Control Arrays, MDI, SDI.
Unit 3:
Database Interface: Review of ANSI SQL, ODBC, Pass through ODBC, DAO, MS-Jet Engine, Workspaces, Databases, recordsets, Data bound controls, ActiveX controls, ADO, ActiveX Data controls, RDO.
Unit 4:
Reports: Data view Window, Data Environment Designer, Crystal Report and Data Report Utility.
Unit 5:
COM/DCOM: Overview of COM/DCOM, using Windows API Functions, MAPI interface, Microsoft Transaction Server, Visual source safe.
Feb
13
Congratulations MCA 2012-15 batch School of Management Sciences, Varanasi for their 1st semester results. You did well in MCA-113 : COMPUTER CONCEPTS AND PROGRAMMING IN C, keep it up and try to improve more and more your programming skills.
All the best.
Feb
07
The last date to apply for the position is 11-February-2013. If you have already applied in last six month, do not apply again. Only apply in the prescribed format below, otherwise your application will be rejected.
JK Technosoft is looking for passing batch of 2013 for MCA and 2012 for B.E./B.Tech for software trainee position.
For More Details Click the Below Link:
Jan
31
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class HtmlDemo1 extends JPanel
implements ActionListener {
JLabel theLabel;
JTextArea htmlTextArea;
public HtmlDemo1() {
setLayout(null);
this.setSize(400,400);
String initialText = “<html>\n” +
“Color and font test:\n” +
“<ul>\n” +
“<li><font color=red>red</font>\n” +
“<li><font color=blue>blue</font>\n” +
“<li><font color=green>green</font>\n” +
“<li><font size=-2>small</font>\n” +
“<li><font size=+2>large</font>\n” +
“<li><i>italic</i>\n” +
“<li><b>bold</b>\n” +
“</ul>\n”;
htmlTextArea = new JTextArea(10, 20);
htmlTextArea.setText(initialText);
theLabel=new JLabel();
theLabel.setText(initialText);
theLabel.setBounds(20,20,200,200);
htmlTextArea.setBounds(250,20,200,200);
add(theLabel);
add(htmlTextArea);
JButton b=new JButton(“Change”);
b.setBounds(20,300,100,30);
add(b);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent e) {
theLabel.setText(htmlTextArea.getText());
}
public static void main(String[] args) {
HtmlDemo1 hd=new HtmlDemo1();
Frame f=new Frame();
f.add(hd);
f.setSize(400,400);
f.setVisible(true);
}
}
Jan
31
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class HtmlDemo extends JPanel
implements ActionListener {
JLabel theLabel;
JTextArea htmlTextArea;
public HtmlDemo() {
setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
String initialText = “<html>\n” +
“Color and font test:\n” +
“<ul>\n” +
“<li><font color=red>red</font>\n” +
“<li><font color=blue>blue</font>\n” +
“<li><font color=green>green</font>\n” +
“<li><font size=-2>small</font>\n” +
“<li><font size=+2>large</font>\n” +
“<li><i>italic</i>\n” +
“<li><b>bold</b>\n” +
“</ul>\n”;
htmlTextArea = new JTextArea(10, 20);
htmlTextArea.setText(initialText);
JScrollPane scrollPane = new JScrollPane
(htmlTextArea);
JButton changeTheLabel = new JButton(“Change the
label”);
changeTheLabel.setMnemonic(KeyEvent.VK_C);
changeTheLabel.setAlignmentX
(Component.CENTER_ALIGNMENT);
changeTheLabel.addActionListener(this);
theLabel = new JLabel(initialText) {
public Dimension getPreferredSize() {
return new Dimension(200, 200);
}
public Dimension getMinimumSize() {
return new Dimension(200, 200);
}
public Dimension getMaximumSize() {
return new Dimension(200, 200);
}
};
theLabel.setVerticalAlignment(SwingConstants.CENTER);
theLabel.setHorizontalAlignment
(SwingConstants.CENTER);
JPanel leftPanel = new JPanel();
leftPanel.setLayout(new BoxLayout(leftPanel,
BoxLayout.PAGE_AXIS));
leftPanel.setBorder
(BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder(
“Edit the HTML, then click the button”),
BorderFactory.createEmptyBorder
(10,10,10,10)));
leftPanel.add(scrollPane);
leftPanel.add(Box.createRigidArea(new Dimension
(0,10)));
leftPanel.add(changeTheLabel);
JPanel rightPanel = new JPanel();
rightPanel.setLayout(new BoxLayout(rightPanel,
BoxLayout.PAGE_AXIS));
rightPanel.setBorder
(BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder(“A
label with HTML”),
BorderFactory.createEmptyBorder
(10,10,10,10)));
rightPanel.add(theLabel);
setBorder(BorderFactory.createEmptyBorder
(10,10,10,10));
add(leftPanel);
add(Box.createRigidArea(new Dimension(10,0)));
add(rightPanel);
}
//React to the user pushing the Change button.
public void actionPerformed(ActionEvent e) {
theLabel.setText(htmlTextArea.getText());
}
/**
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event dispatch thread.
*/
private static void createAndShowGUI() {
//Create and set up the window.
JFrame frame = new JFrame(“HtmlDemo”);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Add content to the window.
frame.add(new HtmlDemo());
//Display the window.
frame.pack();
frame.setVisible(true);
}
public static void main(String[] args) {
//Schedule a job for the event dispatch thread:
//creating and showing this application’s GUI.
SwingUtilities.invokeLater(new Runnable() {
public void run() {
//Turn off metal’s use of bold fonts
UIManager.put(“swing.boldMetal”,
Boolean.FALSE);
createAndShowGUI();
}
});
}
}
For more details see this page: http://docs.oracle.com/javase/tutorial/uiswing/components/html.html
Jan
24
#include<stdio.h>
#include<conio.h>
void main(){
int i,k,n;
char name[50][30],temp[30];
clrscr();
printf(“Enter number of persons: “);
scanf(“%d”,&n);
printf(“\n”);
fflush(stdin);
for(i=0;i<n;i++){
printf(“Enter name of person %d: “,i+1);
gets(name[i]);
}
for(k=0;k<n-1;k++){
for(i=0;i<n-k-1;i++){
if(strcmp(name[i],name[i+1])>0){
strcpy(temp,name[i]);
strcpy(name[i],name[i+1]);
strcpy(name[i+1],temp);
}
}
}
printf(“\nSorted list…\n\n”);
for(i=0;i<n;i++)
puts(name[i]);
getch();
}
Jan
24
#include<stdio.h>
#include<conio.h>
#define MAX 3
void main(){
int m,n,i,j;
//int const num=10;
int arr1[MAX][MAX],arr2[MAX][MAX],arr3[MAX][MAX];
printf(“Enter size of matrics as m,n: “);
scanf(“%d%d”,&m,&n);
if (m>MAX || n>MAX){
printf(“\nMatrix sizes are more than”);
printf(“declared sizes\n”);
exit(1);
}
printf(“Enter%d elements of matrix A row-wise as \n”,m*n);
for(i=0;i<m;i++){
for(j=0;j<n;j++){
scanf(“%d”,&arr1[i][j]);
}
}
for(i=0;i<m;i++){
for(j=0;j<n;j++){
scanf(“%d”,&arr2[i][j]);
}
}
for(i=0;i<m;i++){
for(j=0;j<n;j++){
arr3[i][j]=arr1[i][j]+arr2[i][j];
}
}
for(i=0;i<m;i++){
for(j=0;j<n;j++){
printf(“%d “,arr3[i][j]);
//arr2[j][i]=arr1[i][j];
}
printf(“\n”);
}
getch();
}
Jan
24
#include<stdio.h>
#include<conio.h>
#define MAX 3
void main(){
int i,j,k;
int arr1[MAX][MAX],arr2[MAX][MAX],arr3[MAX][MAX];
printf(“Enter%d elements of matrix A row-wise\n”,MAX*MAX);
for(i=0;i<2;i++){
for(j=0;j<2;j++){
scanf(“%d”,&arr1[i][j]);
}
}
for(i=0;i<2;i++){
for(j=0;j<2;j++){
scanf(“%d”,&arr2[i][j]);
}
}
for(i=0;i<2;i++){
for(j=0;j<2;j++){
arr3[i][j]=0;
for(k=0;k<2;k++){
arr3[i][j]+=arr1[i][k] * arr2[k][j];
}
}
}
for(i=0;i<2;i++){
for(j=0;j<2;j++){
printf(“%d “,arr3[i][j]);
//arr2[j][i]=arr1[i][j];
}
printf(“\n”);
}
getch();
}