Q1. A. Discuss the various types of variables.
B. How to control the file?

Q2. A. How the image application?
B. Write short notes on trees structures work.

Q3. A. How to load and unload child forms.
B. When should we use recursive programming

Q4. A. Write short notes on "The ole control's shortcut
menu"
B. How to test the AX stat class

Q5. A. How to use advanced data-bound controls.
B. Write notes on manipulating the recordset object

Q6. A. What is script control?
B. How to down load image properties.
C. What is meant by building a recordset.


Answer Posted / pankaj

1 a. Local Variables,Static Variables,Module Levele
Variables,and Public variables.

1.b.Three of the controls on the ToolBox let you access the
computer's file system. They are DriveListBox, DirListBox
and FileListBox controls (see below figure) , which are the
basic blocks for building dialog boxes that display the host
computer's file system. Using these controls, user can
traverse the host computer's file system, locate any folder
or files on any hard disk, even on network drives. The files
are controls are independent of one another, and each can
exist on it's own, but they are rarely used separately. The
files controls are described next.
In a nutshell, the DriveListBox control is a combobox-like
control that's automatically filled with your drive's
letters and volume labels. The DirListBox is a special list
box that displays a directory tree. The FileListBox control
is a special-purpose ListBox control that displays all the
files in a given directory, optionally filtering them based
on their names, extensions, and attributes.
These controls often work together on the same form; when
the user selects a drive in a DriveListBox, the DirListBox
control is updated to show the directory tree on that drive.
When the user selects a path in the DirListBox control, the
FileListBox control is filled with the list of files in that
directory. These actions don't happen automatically, however
—you must write code to get the job done.
After you place a DriveListBox and a DirListBox control on a
form's surface, you usually don't have to set any of their
properties; in fact, these controls don't expose any special
property, not in the Properties window at least. The
FileListBox control, on the other hand, exposes one property
that you can set at design time—the Pattern property. This
property indicates which files are to be shown in the list
area: Its default value is *.* (all files), but you can
enter whatever specification you need, and you can also
enter multiple specifications using the semicolon as a
separator. You can also set this property at run time, as in
the following line of code:
• DriveListBox : Displays the names of the drives
within and connected to the PC. The basic property of this
control is the drive property, which set the drive to be
initially selected in the control or returns the user's
selection.
• DirListBox : Displays the folders of current Drive.
The basic property of this control is the Path property,
which is the name of the folder whose sub folders are
displayed in the control.
• FileListBox : Displays the files of the current
folder. The basic property of this control is also called
Path, and it's the path name of the folder whose files are
displayed.
The three File controls are not tied to one another. If you
place all three of them on a Form, you will see the names of
all the folders under the current folder, and so on. Each
time you select a folder in the DirlistBox by double
clicking its name, its sub folders are displayed. Similarly
, the FileListBox control will display the names of all
files in the current folder. Selecting a drive in the
DriveListBox control, however this doesn't affect the
contents of the DirListBox.
To connect to the File controls, you must assign the
appropriate values to the properties. To compel the
DirListBox to display the folders of the selected drive in
the DriveListBox, you must make sure that each time the user
selects another drive, the Path property of the DirListBox
control matches the Drive property of the DriveListBox.
After these preliminary steps, you're ready to set in motion
the chain of events. When the user selects a new drive in
the DriveListBox control, it fires a Change event and
returns the drive letter (and volume label) in its Drive
property. You trap this event and set the DirListBox
control's Path property to point to the root directory of
the selected drive:
Private Sub Drive1_Change()
' The Drive property also returns the volume label, so trim
it.
Dir1.Path = Left$(Drive1.Drive, 1) & ":\"
End Sub
When the user double-clicks on a directory name, the
DirListBox control raises a Change event; you trap this
event to set the FileListBox's Path property accordingly:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Finally, when the user clicks on a file in the FileListBox
control, a Click event is fired (as if it were a regular
ListBox control), and you can query its Filename property to
learn which file has been selected. Note how you build the
complete path:
Filename = File1.Path
If Right$(Filename, 1) <> "\" Then Filename = Filename & "\"
Filename = Filename & File1.Filename

2.a.Once you place a PictureBox on a form, you might want to
load an image in it, which you do by setting the Picture
property in the Properties window. You can load images in
many different graphic formats, including bitmaps (BMP),
device independent bitmaps (DIB), metafiles (WMF), enhanced
metafiles (EMF), GIF and JPEG compressed files, and icons
(ICO and CUR). You can decide whether a control should
display a border, resetting the BorderStyle to 0-None if
necessary. Another property that comes handy in this phase
is AutoSize: Set it to True and let the control
automatically resize itself to fit the assigned image.
You might want to set the Align property of a PictureBox
control to something other than the 0-None value. By doing
that, you attach the control to one of the four form borders
and have Visual Basic automatically move and resize the
PictureBox control when the form is resized. PictureBox
controls expose a Resize event, so you can trap it if you
need to move and resize its child controls too.
You can do more interesting things at run time. To begin
with, you can programmatically load any image in the control
using the LoadPicture function:
Picture1.Picture = LoadPicture("c:\windows\setup.bmp")
and you can clear the current image using either one of the
following statements:
' These are equivalent.
Picture1.Picture = LoadPicture("")
Set Picture1.Picture = Nothing

2.b.A Work Breakown Structure (WBS) is used for breaking
down a project into easily manageable components, or bites.
Here we'll break down the process for you, making it easy to
use these structures in your project planning.
• Company owners and project managers use the Work
Breakdown Structure (WBS) to make complex projects more
manageable. The WBS is designed to help break down a project
into manageable chunks that can be effectively estimated and
supervised.
Some widely used reasons for creating a WBS include:
• Assists with accurate project organization
• Helps with assigning responsibilities
• Shows the control points and project milestones
• Allows for more accurate estimation of cost, risk
and time
• Helps explain the project scope to stakeholders
A work breakdown structure is just one of many project
management forms

3.a.: Forms in VB.net 2008 are loaded and unloaded using two
different statements.To load a form the Load statement is
used and to unload a form Unload statement is used.

Load Method:
This method is used to load a form into the memory, but will
not display the form.
Syntax:
Load FormName
UnLoad Method:
This statement is used to unload a form from the memory.
Syntax:
UnLoad FormName

3.b. The power of recursion evidently lies in the
possibility of defining an infinite set of objects by a
finite statement. In the same manner, an infinite number of
computations can be described by a finite recursive program,
even if this program contains no explicit repetitions." [3]
Most computer programming languages support recursion by
allowing a function to call itself within the program text.
Some functional programming languages do not define any
looping constructs but rely solely on recursion to
repeatedly call code. Computability theory has
proven[attribution needed] that these recursive-only
languages are Turing complete; they are as computationally
powerful as Turing complete imperative languages, meaning
they can solve the same kinds of problems as imperative
languages even without iterative control structures such as
“while” and “for”.
We can use the this programming in various types of programs
Like GCD, Loop programe Pyramid and tree structures etc.



Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you convert a form into document?

1364


What is the use of Visual Basic Document file?

1902


How many ways you can access file using VB?

571


Explain the working of templates?

566


How many ways we can access file using VB?

1612






what are the types of LockEdits in DAO?

1506


Difference between Dynaset and Snapshot?

1670


Is it possible to Manipulate data through flexgrid? Explain.

2060


Explain the "cursortype" and "Locktype" in VB?

3771


How many objects resides in ADO ?

1446


How would you attach pictures in Treeview Control?

1544


What is ado data control in vb?

527


What are the uses of List View Control?

1439


What is the latest version of visual basic?

453


What are the rules which should be followed while naming a variable in VB?

540