What are the parts of Visual basic.net?
Visual basic is a programming language from Microsoft. Some of its parts include data access objects, ActiveX data objects, and remote data objects. Their function is to provide access to databases.
What are the VB built in data types?
Visual Basic.net 2008 Datatypes
Data Type in Visual Basic.net 2008 defines the type of data a programming element should be assigned, how it should be stored and the number of bytes occupied by it.
In VB.net 2008 all the variables by default are of Variant datatype was used for numeric, date, time and string data, but in VB.net 2008 Variant and Currencydatatypes are no longer available. Following are the common data types used in Visual Basic.Net 2008.
Data TypeValue RangeByte0 to 255BooleanTrue or FalseChar0 to 65535DateJanuary 1, 0001 to December 31,9999Decimal+/-79,228,162,514,264,337,593,543,950,335 with no decimal point; +/-7.9228162514264337593543950335 with 28 place to right of decimal.Double-1.79769313486231E+308 to -4.94065645841247E-324 for negative values to 4.94065645842247E-324 to 1.79769313486231E+308 for positive values.Integer-2,147,483,648 to 2,147,483,647Long-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807ObjectAny type can be stored in a variable of type ObjectShort-32,768 to 32,767Single-3.402823 * 103 to -1.401298 * 10 45 for negative values 1.401298 * 10 -45 to 3.402823 * 10 38for positive valuesString0 to approximately 2 billion characters
What is the history of Visual Basic 6.0?
Visual Basic was first released in 1992 Visual Basic was first released in 1998. This version included the ability to create web-based applications. Support for this version ended in 2005.
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int count =0;
int sum = 0;
int positivecount = 0;
int negativecount = 0;
double average;
cout <<"Enter any integer or enter 0 to exit ::";
cin >> count;
while(count != 0)
{
sum += count;
average = sum / static_cast<double>(count);
count++;
if(count < 0)
{
negativecount++;
}
if (count > 0)
{
positivecount++;
}
cout <<"Enter any integer or enter 0 to exit ::";
cin >> count;
}
cout <<"the average of the numbers is " << average <<"\n";
cout <<"There are " << negativecount <<" negative numbers\n";
cout <<"There are " << positivecount<<" positive numbers\n";
system("pause");
return 0;
}
by rijaalu
Two pre-defined functions in visual basic?
A string is a line of text.
For example:
Dim example As String = "whatever text you want"
Would make a string that says "whatever text you want"
Later, you can use this for a msgbox or textbox
Example:
TextBox1.Text = example '(that is the string we made)
or
MsgBox(example, MsgBoxStyle.Information, "Note!") '(would display a msgbox containing the text in the string)
What are the objectives of visual basic 6?
It is not just a language to program in but a whole graphicaldevelopment environment. This aids your programming skills allowingyou to concentrate on developing novel ideas instead of going over oldground.
How do you write an assignment statement in visual basic?
You declare it by this:
Dim var as integer
or
Public var as integer
You can use other types instead of integer like long, double, string, byte etc.
Using Public is for making a variable accessible from everywhere and using Dim is for making it accessible only from where you declared it from.
For using the variable you just type:
var = 1
var = "something"
var = 5 + 10 * (2 - 3)
var = var & "abc"
var &= "abc"
In each case the variable will have these values:
1
something
-15
Whatever var had before plus abc
Again whatever var had before plus abc
These are the basics of using a variable
Write a program to print sum of the digits in the given number?
The following function will sum the digits in any positive number.
unsigned int sum_digits(unsigned int num, unsigned int base=10)
{
sum=0;
if(base>1) // base must be 2 or higher
{
while(num)
{
sum+=num%base; // add least significant digit to sum
num/=base; // shift right by base
}
}
return(sum);
}
Difference between event driven programming and traditional programming?
In traditional programming, code was run from start to finish and sometimes asked for input along the way. Event driven programming, on the other hand, does nothing until it gets an event, such as a mouse moving or a key being pressed.
What is a code window in visual basic?
The Project Explorer tree view consists of the following node types:
How do you register ActiveX control in vb 6.0?
On Windows Run prompt, type regsvr32 "<complete path of control>" and press Enter.
How do you open visual basic 6.0?
i preassume that you have correctly installed Microsoft Visual Studio 6 on ur PC if not then please install it. During installation u get a nmber of options to select ,u select all so that all the components are added to ur computer successfully. Now its that simple to open as opening any application.. The Microsoft visual studio will be added in start menu list and from there u can select Microsoft visual basic 6 easily and have fun running ur application..
What is a design mode in visual basic?
The design mode in Visual Basic allows the programmer to design and modify the form, and all objects it contains. It's a much quicker and user friendly way to program visible form objects and set up their properties.
How does a visual sensation become a visual perception?
In order for sensation to become perception, it must be received by the somatosensory cortex.
How do you create a string and reverse a string in visual basic?
Dim x As String
x = "HELLO"
Dim tmpString As String
tmpString = Nothing
For j = 0 To x.Length - 1
Dim int
int=x.Length - 1
int=int-j
tmpString=x(j)
Next
Why is BASIC considered to be a user friendly language?
It's English-like syntax is much easier to learn than many other languages.
How do you re size the label in visual studio?
If you mean font, then you can use the font property of the label. Otherwise, you can't because there is no point to.
How do you connect Visual Basic with SQL server database?
It depends on what version of VB you are using, and what version of SQL Server you're attempting to connect to. Also, there are several ways to connect from each version of VB to each version of SQL Server (ODBC, ADODB, DSN-less, etc.). Since your question does not provide enough specifics to answer adequately, I refer you to the "Connection Strings" link at the bottom of this page (or you may just type in www.connectionstrings.com in your browser).
How do you use string in visual basic?
A string is a data set in the form of alphanumeric characters and symbols. For example, if you wanted to use a string to concatenate and display a welcome message displaying a user's name, your code would look something like this:
Dim WelcomeMessageString as String = "Welcome to the string demonstration "
Dim FormResponseString as String = form1.text
Message(WelcomeMessageString + FormResponseString)
Here is a simple Hello World application I whipped up using Visual Basic 6:
Private Sub cmdButton_Click()
MsgBox "Hello world!", vbInformation, "Notice"
'displays a message box with an information icon, _
the message that says "hello world", and _
a title that says "notice".
End Sub
The preceding code is for a command button that when clicked, evokes the
button's subroutine.
All comments start with an apostrophe.
They are basically words or simbles written out to make a program. Here is a simple one if you want to make one open a website
1 open notepad by doing Start>all programs>accessories>notepad
2 paste this in
@echo off
cls
title Website opener
color 4b
Set /p website= Type The website you would like to goto
echo Opening %website%
start www.%website%.com
exit
3 goto file save as whatever.bat
4 bellow that select All files instead of txt document.
5 open and enjoy
You will need an internet connection