Friday, October 10, 2008

.NET Framework and Languages

As mentioned on the .NET Framework page, .NET Framework is designed for cross-language compatibility. Cross-language compatibility means .NET components can interact with each other irrespective of the languages they are written in. An application written in VB .NET can reference a DLL file written in C# or a C# application can refer to a resource written in VC++, etc. This language interoperability extends to Object-Oriented inheritance.
This cross-language compatibility is possible due to common language runtime. As you read on the .NET Framework page, when the .NET program is compiled, the output of the compiler is not an executable file but a file that contains a special type of code called the Microsoft Intermediate Language (MSIL). This MSIL is a low-level language which is designed to be read and understood by the common language runtime. Because all .NET executables exist as IL, they can freely operate. The Common Language Specification defines the minimum standards that .NET language compliers must confirm to. Thus, any code compiled by a .NET complier can interoperate with the .NET Framework.
The Common Type System (CTS) defines the rules concerning data types and ensures that code is executed in a safe environment. Since all .NET applications are converted to IL before execution all primitive data types are represented as .NET types. This means that, a VB Integer and a C# int are both represented in IL code as System.Int32. Because both the languages use a common and interconvertible type system, it is possible to transfer data between components and avoid time-consuming conversions.
Languages supported by .NET Framework
The table below lists all the languages supported by the .NET Framework and describes those languages. The languages listed below are supported by the .NET Framework upto the year 2003. In future there may be other languages that the .NET Framework might support.

APL-> APL is one of the most powerful, consistent and concise computer programming languages ever devised. It is a language for describing procedures in the processing of information. It can be used to describe mathematical procedures having nothing to do with computers or to describe the way a computer works.

C++ -> C++ is a true OOP. It is one of the early Object-Oriented programming languages. C++ derives from the C language.

VC++ ->Visual C++ is the name of a C++ compiler with an integrated environment from Microsoft. This includes special tools that simplify the development of great applications, as well as specific libraries. Its use is known as visual programming.

C# -> C# called as C Sharp is a full fledged Object-Oriented programming language from Microsoft built into the .NET Framework. First created in the late 1990’s was part of Microsoft’s whole .NET strategy.

Cobol -> COBOL (Common Business Oriented Language) was the first widely-used high-level programming language for business applications. It is considered as a programming language to have more lines of code than any other language. Component Pascal Component Pascal is a Pascal derived programming language that is specifically designed for programming software components. Curriculum No information.

Eiffel -> Eiffel is an Object-Oriented (OO) programming language which emphasizes the production of robust software. Eiffel is strongly statically typed mature Object-Oriented language with automatic memory management.

Forth -> Forth is a programming language and programming environment. It features both interactive execution of commands (making it suitable as a shell for systems that lack a more formal operating system), as well as the ability to compile sequences of commands into threaded code for later execution.

Fortran -> Acronym for Formula Translator, Fortran is one of the oldest high-level programming languages that is still widely used in scientific computing because of its compact notation for equations, ease in handling large arrays, and huge selection of library routines for solving mathematical problems efficiently.

Haskell -> Haskell is a computer programming language that is a polymorphicly typed, lazy, purely functional language, quite different from most other programming languages. It is a wide-spectrum language, suitable for a variety of applications. It is particularly suitable for programs which need to be highly modifiable and maintainable.

Java Language -> The Java language is one of the most powerful Object-Oriented programming languages developed till date. It's platform independence (not depending on a particular OS) feature makes it a very popular programming language.

Microsoft JScript -> Microsoft JScript is the Microsoft implementation of the ECMA 262 language specification. JScript is an interpreted, object-based scripting language. It has fewer capabilities than full-fledged Object-Oriented languages like C++ but is more than sufficiently powerful for its intended purposes.

Mercury -> Mercury is a new logic/functional programming language, which combines the clarity and expressiveness of declarative programming with advanced static analysis and error detection features. Its highly optimized execution algorithm delivers efficiency far in excess of existing logic programming systems, and close to conventional programming systems. Mercury addresses the problems of large-scale program development, allowing modularity, separate compilation, and numerous optimization/time trade-offs.

Mondrian->Mondrian is a simple functional scripting language for Internet applications. It is a functional language specifically designed to inter-operate with other languages in an OO environment. Current versions of Mondrian run on .NET. Mondrian also supports ASP.NET, allowing you to embed functional language code in web pages along with C# code.

Oberon -> Oberon is a programming language very much like Modula-2 in syntax but with several interesting features. It's based on OOP concepts and provides a Windows-based graphical user interface.

Oz -> Oz is a high-level programming language that combines constraint inference with concurrency. Oz is dynamically typed and has first-class procedures, classes, objects, exceptions and sequential threads synchronizing over a constraint store. It supports finite domain and feature constraints and has powerful primitives for programming constraint inference engines at a high level.

Pascal -> Principle objectives for Pascal were for the language to be efficent to implement and run, allow for the development of well structured and well organized programs, and to serve as a vehicle for the teaching of the important concepts of computer programming. The Prime area of application that Pascal entails is the learning environment. This language was not really developed to be used for anything other than teaching students the basics of programming as it was originally developed for this purpose.

Perl -> Practical Extraction and Report Language, Perl, is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks.

Python -> Python is an interpreted, interactive, Object-Oriented programming language. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing.

RPG -> Report Program Generator, RPG, is used for generation of reports from data files, including matching record and sub-total reports. RPG is one of the few languages created for punch card machines that is still in common use today. RPG or RPG IV is a native programming language for IBM's iSeries minicomputer system.

Scheme -> Scheme is a statically scoped programming language. It was designed to have an exceptionally clear and simple semantics and few different ways to form expressions. A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme.

Small Talk -> SmallTalk is an expressive language that uses a simple sub set of human languages, nouns and verbs. Smalltalk was the first, and remains one of the few, pure object systems, which simply means that everything in a Smalltalk program is an object. Smalltalk is generally recognized as the second Object Programming Language (OPL).

Standard ML-> Standard ML is a safe, modular, strict, functional, polymorphic programming language with compile-time type checking and type inference, garbage collection, exception handling, immutable data types and updatable references, abstract data types, and parametric modules. It has efficient implementations and a formal definition with a proof of soundness.

Microsoft Visual Basic-> Visual Basic is a "visual programming" environment for developing Windows applications. Visual Basic makes it possible to develop complicated applications very quickly. This site is all about Visual Basic.
Read More

XAML

Extensible Application Markup Language (XAML, pronounced zammel [zæml]) is a declarative XML-based language created by Microsoft which is used to initialize structured values and objects. It is available under Microsoft's Open Specification Promise. The acronym originally stood for Extensible Avalon Markup Language - Avalon being the code-name for Windows Presentation Foundation (WPF)
XAML is used extensively in .NET Framework 3.0 technologies, particularly Windows Presentation Foundation (WPF) and Windows Workflow Foundation (WF). In WPF, XAML is used as a user interface markup language to define UI elements, data binding, eventing, and other features. In WF, workflows can be defined using XAML.
XAML elements map directly to Common Language Runtime object instances, while XAML attributes map to Common Language Runtime properties and events on those objects. XAML files can be created and edited with visual design tools such as Microsoft Expression Blend, Microsoft Visual Studio, and the hostable Windows Workflow Foundation visual designer. They can also be created and edited with a standard text editor, a code editor such as XAMLPad, or a graphical editor such as Vectropy.
Anything that is created or implemented in XAML can be expressed using a more traditional .NET language, such as C# or Visual Basic.NET. However, a key aspect of the technology is the reduced complexity needed for tools to process XAML, because it is based on XML. As a result, a variety of products are emerging, particularly in the WPF space, which create XAML-based applications. As XAML is simply based on XML, developers and designers are able to share and edit content freely amongst themselves without requiring compilation. As it is strongly linked to the .NET Framework 3.0 technologies, the only fully compliant implementation as of today is Microsoft's
Read More

Silverlight

Microsoft Silverlight is a programmable web browser plugin that enables features such as animation, vector graphics and audio-video playback that characterize rich internet applications. Silverlight competes with products such as Adobe Flash, Adobe Flex, Adobe Shockwave, JavaFX, Curl and the JavaScript programming language. Version 2.0, now in beta-testing, brings additional interactivity features and support for .NET languages and development tools.Silverlight was developed under the codename Windows Presentation Foundation/Everywhere (WPF/E). It is compatible with multiple web browser products used on Microsoft Windows and Mac OS X operating systems. Mobile devices, starting with Windows Mobile 6 and Symbian (Series 60) phones, will also be supported. A third-party free software implementation named Moonlight is under development to bring compatible functionality to GNU/Linux.
Silverlight 1.0
A Silverlight 1.0 application hosted in Internet Explorer. Interactivity is provided by Silverlight, but user input controls are HTML controls overlaid on top of Silverlight contentSilverlight 1.0 consists of the core presentation framework, which is responsible for UI, interactivity and user input, basic UI controls, graphics and animation, media playback, Digital rights management, and DOM integration. It is made up of the following components:Input – handling input from devices like keyboard, mouse, stylus etc.UI core – managing rendering of bitmap images (including compressed raster images like JPEG), vector graphics, text and animations.Media – playback of MP3, WMA Standard, WMV7, WMV8 and WMV9/VC-1 streams.XAML – to allow the UI layout to be created using XAML markup language.A Silverlight application starts by invoking the Silverlight control from the HTML page, which then loads up a XAML file. The XAML file contains a Canvas object, which acts as placeholder for other elements. Silverlight provides various geometrical primitives like lines, ellipses and other shapes, to elements like text, images, and media etc. The elements are properly positioned to achieve the desired layout. Any arbitrary shape can be created as well. These elements can be animated using Event triggers; some animation effects are predefined, others can be created as composite of the pre-defined effects. Events like keyboard or mouse movements can also raise Events which can be handled by custom scripts
Read More

file extensions which are configured by default in ASP.NET 2.0

Here is a list of file extensions which are configured by default to be handled by ASP.NET 2.0.
asax used for application level logic
global.asax-ascx used for creating web user control.
ashx- used to create a custom httphandler
asmx- used to create web services
aspx- used for web application pages
axd- is used for special webresource axd handler which allows the developer to package component and controls along with javascript, images etc..in a single assembly. The extension is also used for trace output.
browser- are the browser capabilities files stored in XML format. These gfiles are used to define the capabilities of the browser.
config- used to store the configuration of the web application.
web.config and machine.config- are the common examplescs used as the code behind when the language chosen is C# (CSharp)vb used as the code behind when the language chosen is Visual Basic.Net
master- used as the extension for the master page.
resx- used as an extension for the resource file of the page for internationalization and localization purpose.
sitemap- is used as the configuration file for sitemap
skin- used as the skin file for the themes
svc- used to define a Windows Communication Foundation (WCF) based service
Read More

Know Any File Extension

if u want to know full form of any file extension then u can find out it on following web site............
www.fileinfo.net
Read More

Thursday, October 9, 2008

To show any .CHM help file in VB.NET

Help.ShowHelp(Me, "CHM LOCATION HERE!")
Read More

Search string with Wild Card

Public Function CheckWildCardString(ByVal String1 As String, ByVal String2 As String) As BooleanDim I As Long If Left$(String1, 1) = Chr$(42) And Right$(String1, 1) = Chr$(42) ThenString1 = Replace$(String1, Chr(42), Empty) For I = 1 To Len(String2) If LCase$(Mid(String2, I, Len(String1))) = LCase$(String1) ThenCheckWildCard = TrueExit FunctionEnd IfNext IElseIf Left$(String1, 1) = Chr$(42) Then If LCase$(Right(String2, Len(String1))) = LCase$(String1) ThenCheckWildCard = TrueExit FunctionEnd IfElseIf Right$(String1, 1) = Chr$(42) ThenString1 = Replace$(String1, Chr$(42), Empty)If LCase$(Left(String2, Len(String1))) = LCase$(String1) ThenCheckWildCard = TrueExit FunctionEnd IfElseCheckWildCard = FalseExit FunctionEnd IfEnd Function
Read More

Wednesday, October 8, 2008

Compress Files & Foleder in vb.net


Imports java.util.zip
Imports java.io

Public Class ZipUtility
Public Shared Function CreateZip(ByVal FileNames() As String, ByVal ZipFileName As String) As Boolean
'THIS SAMPLE WILL NOT ALLOW THE ZIP FILE TO BE CREATED IF IT ALREADY EXISTS
'MODIFY AS NEEDED, I WILL WORK ON ADDING IN SUPPORT FOR APPENDING AND OVERWRITING
If DoesFileExist(ZipFileName) Then
Throw New IOException("zip file already exists")
Return False
End If
Try
'OUTPUT STREAM THAT WILL WRITE OUT THE ZIP FILE, THIS
Dim MyOutputStream As New ZipOutputStream(New java.io.FileOutputStream(ZipFileName))
'FILE INPUT STEAM
Dim MyFileStream As java.io.FileInputStream
'OUR ZIP ENTRY, ONE FOR EACH FILE
Dim MyZipEntry As ZipEntry
'A BUFFER FOR THE I/O
Dim Buffer(1023) As SByte
'LOOP EACH FILE NAME IN OUR ARRAY
For Each FileName As String In FileNames
'CHECK THAT FILE EXISTS BEFORE TRYING TO INCLUDE IT IN THE ZIP
If DoesFileExist(FileName) Then
'CREATE A NEW ENTRY IN THE ZIP FILE, BASED ON THE FILE NAME
MyZipEntry = New ZipEntry(New IO.FileInfo(FileName).Name)
'SET IT TO DEFLATE (COMPACT IT)
MyZipEntry.setMethod(ZipEntry.DEFLATED)
'STICK THE ENTRY IN THE ZIP FILE
MyOutputStream.putNextEntry(MyZipEntry)
'CREATE A FILE STREAM TO WRITE THE FILE TO THE ZIP
MyFileStream = New java.io.FileInputStream(FileName)
'A COUNTER WHILE WE INPUT THE BUFFER INTO THE FILE
Dim nCount As Integer = 0
'LOOP THE INPUT FILE STREAM AND WRITE IT TO THE ZIP FILE
nCount = MyFileStream.read(Buffer, 0, Buffer.Length)
While nCount > 0
MyOutputStream.write(Buffer, 0, nCount)
nCount = MyFileStream.read(Buffer, 0, Buffer.Length)
End While
'CLOSE THE FILE STREAM FOR THE FILE BEING ZIPPED
MyFileStream.close()
'CLOSE THE ENTRY IN THE ZIP FILE
MyOutputStream.closeEntry()
End If
Next
'ALL DONE, CLOSE THE ZIP FILE
MyOutputStream.close()
'IF WE MADE IT THIS FAR, RETURN TRUE
Return True
Catch ex As Exception
'PASS THE EXCEPTION TO THE CALLING ROUTINE
Throw ex
'RETURN FALSE
Return False
End Try
End Function



you will require to download library to use above functionality
Read More

Tuesday, October 7, 2008

Connect .NET with MySQL

To connect .NET with MySQL u will have to follow following steps
  1. install mysql-connector-net-5.2.3 from net (its free)
  2. Import mysql.data which u will get in installation folder of above software
  3. import namespace = imports MySql.Data.MySqlClient
  4. then use mysqladaper,mysqlcommand,mysqlconnection as u use oledbdataatapter,oledbcommand,OleDbConnection
  5. when ever u will try to exis table which contain date in 00:00:0000 format then u will get exception like 'unable to convet mysqldatetime type to system datetime type' so to overcome this type of problem either make that datatime field in table as allow null or write the following in connection string "Allow Zero Datetime=true"
Read More
Powered By Blogger · Designed By Seo Blogger Templates