Home | Index | Dotnet4all Snippets | Submit resources
About | Mail us 





Getting the scema name from an XMLDocument object. (Saturday, August 14, 2004)
An XmlDocument represents an instance document. There's no
requirement that an instance document must "know" of its schema
document. XML applications may associate a schema with an
instance document by any means (I list some of these techniques
below, but it's not a comprehensive list).

Possibly (if you're looking for the schema document's filename),
then if the author of the instance document provides the hint of
xsi:schemaLocation (or xsi:noNamespaceSchemaLocation) that
the XML Schema recommendation allows, you could check for
the presence of this qualified attribute. For example,

XmlDocument xmlDoc = new XmlDocument( );
xmlDoc.Load( "instance.xml");
XmlNode root = xmlDoc.DocumentElement;
XmlNamespaceManager nsMan = new XmlNamespaceManager( xmlDoc.NameTable);
nsMan.AddNamespace( "xsi", "http://www.w3.org/2001/XMLSchema-instance");
XmlNode schemaLoc = root.SelectSingleNode( "@xsi:schemaLocation", nsMan);
if ( null != schemaLoc )
// Format of attribute value is "tnsURI _space_ schemaLocation".
Console.WriteLine( schemaLoc.Value.Split( new char[] { ' '})[ 1]);


That's just one manner of determining a schema document from an
instance document. Other possibilities might include identifying the
schema in a comment, or processing instruction, or in a variable or
function argument outside of the instance document altogether;
which is why there is no guaranteed solution to get the schema's
filename.

Posted by Xander Zelders
0 Comments



Make text blink in a text box or on a label
Add a 'System.Windows.Forms.Timer' to your form, set its interval to
500, for example, add a handler to the timer's 'Tick' event and type
this code:

Me.Label1.Visible = Not Me.Label1.Visible

Posted by Xander Zelders
8 Comments



How to paint transparent pixels in the resource editor
The resource editor has a little symbol that looks like a television set for
creating transparent pixels...

Failing that, you can set the transparent colour at runtime if you load in
an image from the resources and use the Bitmap.MakeTransparent method on it.

Posted by Xander Zelders
2 Comments



Adding controls to a Web Control Library project.
You can't do this visually.
This can only be done by using the Render() or CreateChildControls() methods.

Posted by Xander Zelders
0 Comments



How to Reset a Form with its initial values.
Use:

Call document.forms[0].reset();

Posted by Xander Zelders
0 Comments



How to modify the registry using VB.NET
Just use RegistryKey.SetValue, passing in an integer as the value.

Posted by Xander Zelders
0 Comments



How to open a new web browser from a windows form
System.Diagnostics.Process.Start("http://www.google.com");

You need to make sure your application is STA, but that's default on C#.

Posted by Xander Zelders
2 Comments



How to open a new web browser from a webform
Simply use:

response.write("<script>window.open('xxx')</script>")

Posted by Xander Zelders
0 Comments



How to open a new web browser from a windows form
If you just want to start a browser, put this line of code in the event
handler for the menu:

System.Diagnostics.Process.Start("iexplore.exe");
(assuming you want to start IE).

If you'd like to browse to a specific URL with the default browser,
simply use the URL instead of "iexplore.exe".

Posted by Xander Zelders
1 Comments



Split string into A boolean array
The Convert class and Array class don't have a method to all elements of an array. Try the method:

public bool[] StringArrayToBool(String str)
{
String[] boolstringarray = str.Split(new char[]{','});
bool[] boolarray = new bool[boolstringarray.Length];
for(int x=0;x boolarray[x]=Convert.ToBoolean(boolstringarray[x]);
return boolarray;
}

Posted by Xander Zelders
0 Comments



Microsoft Visual Basic .NET Standard 2003 (Thursday, August 12, 2004)



by Microsoft Software
ASIN: B000089GKW

Features:
- Tools for rapidly building Windows and Web applications
- Write code faster and with fewer errors
- Leverage even more of your code knowledge and skills
- Packed with enhancements and new features
- Language features include full implementation inheritance and polymorphism

From amazon.com
"Amazon.com Review
Visual Basic is a hugely popular programming language that is suitable for students and beginners as well as professional development. This is the .NET version, which is significantly different from older variants of Basic. It’s also the Standard edition, which is intended to be introductory. Professional developers should consider Visual Studio .NET 2003, which includes a more advanced version of Visual Basic as well as other languages. The full Visual Studio is needed for features like compiling code into libraries, or targeting the Compact Framework for mobile devices. Even so, this Standard edition is a capable package that includes all you need to build applications for both Windows and the Web.
Two things make Visual Basic .NET Standard 2003 easy to learn and use. One is the language itself, which is designed to be closer to natural English than others. The other is the array of tools and wizards that Microsoft provides, including a visual form designer for both Windows and Web projects. The web technology is called ASP.NET, and enables easy creation of web page that query and update databases, although note that a Windows web server running .NET is required. The programming environment is slick, with convenient features like docking and tabbed windows, project wizards, auto-completion and pop-up help in the code editor. The .NET version of Visual Basic benefits from full object-orientation and a rich class library. It also supports advanced features like multi-threading, which is a way of writing code to do background tasks.

Whereas Visual Basic 6.0 and earlier version needed a small runtime library, this .NET edition requires the .NET Framework, a runtime engine and class library that manages memory and enforces security. Framework applications perform well, since they are compiled to native code at runtime, but there is an overhead in terms of memory usage and the Framework runtime must be installed. These factors, together with less than perfect code compatibility, have made some Visual Basic developers reluctant to switch. While that’s understandable, the .NET technology is now maturing and this release is probably the right moment to make the move. It’s still important to note the heavy system requirements, and that .NET applications do not run on Windows 95. --Tim Anderson, Amazon.co.uk

Amazon.com Product Description
Visual Basic .NET 2003 provides the easiest, most productive language and tool for rapidly building applications for Microsoft Windows and the Web. Ideal for existing Visual Basic developers as well as new developers in the Microsoft .NET development environment, Visual Basic .NET 2003 delivers enhanced visual designers, increased application performance, and a powerful integrated development environment (IDE) to get you on the fast track to application development.
"

Posted by Xander Zelders
0 Comments



Microsoft Visual C++ .NET Standard 2003



by Microsoft
ASIN: B000089GKV

Features:
- Proven, object-oriented language for building applications
- Create highly-tuned .NET-connected applications and components
- Move existing C++ code to .NET granularly and at a self-defined pace
- Utilize enhanced libraries to incorporate advanced features
- Advanced compiler and language features make writing complex code easier and safer

From amazon.com
"Amazon.com Product Description
Visual C++ .NET 2003 provides developers with a proven, object-oriented language for building powerful and performance-conscious applications. With advanced ISO-conforming template features, low-level platform access, and an optimizing compiler, Visual C++ .NET 2003 delivers superior functionality for generating robust applications and components.
Developers can use Visual C++ .NET 2003 to build a wide variety of solutions, including Microsoft Windows-based and Microsoft .NET-connected applications. C++ is one of the world's most popular systems-level languages, and Visual C++ .NET 2003 gives developers a world-class tool with which to build best-in-class software.

Use Managed Extensions to C++ and compiler support for optimized Microsoft intermediate language (MSIL) code generation. Incorporate Microsoft .NET Framework features including garbage collection, Windows Forms, and threading. Call unmanaged code using high-performance C++ interoperability technology. Write and compile purely unmanaged x86 code. Speed up your application or reduce its size with optimization options for a range of processors, including Whole Program Optimization, and support for Streaming SIMD Extensions (SSE) and Streaming SIMD Extensions 2 (SSE2) instruction sets.
"

Posted by Xander Zelders
0 Comments



Microsoft Visual Studio .NET Professional 2003 English



by Microsoft
ASIN: B00008I9K2

Features:
- Quickly build Windows-based professional software applications
- Streamline Web-based development
- Create server-side business logic
- Integrate with a wide range of applications, systems, and devices
- Reduce IT operating costs

From amazon.com
"Amazon.com Review
Visual Studio .NET Professional 2003 is Microsoft’s multi-faceted development tool, targeting both Windows and Web applications. This 2003 edition includes numerous small improvements as well as major new features like the Compact Framework, for applications that run on Pocket PC and other smart devices. It supports multiple languages, with the main ones being Visual Basic, C#, and C++. There is also a Java-like language called J#, although J# applications only work on Windows so this is not a true Java development tool. The Visual Studio .NET environment is truly integrated. It makes extensive use of docking and tabbed windows, and there are plenty of project wizards along with huge amounts of online help. Auto-completion and pop-up help eases the business of editing code.
Microsoft’s .NET tools are very different from their predecessors. Visual C++ can still compile standard Windows executables, but the other languages all target the .NET Framework, a runtime engine and class library that manages memory and enforces security. Framework applications perform well, since they are compiled to native code at runtime, but there is an overhead in terms of memory usage and the Framework runtime must be installed. In compensation, .NET brings many advantages. All the languages are fully object-oriented, the class library is rich, and XML support is deeply integrated. ASP.NET is for web applications, and represents a large advance on the old ASP. Instead of script, ASP.NET supports any of the .NET languages, running on the server and just-in-time compiled to native code. There is a visual web page designer, and carefully designed applications support a wide range of browsers. A new feature in this version of Visual Studio is Mobile Web Forms, which use adaptive rendering to support the browsers in mobile phones and PDAs.

The database technology in Visual Studio is called ADO.NET. It uses a disconnected model, which means that applications work with data locally, only contacting the server for data transfer or update. It’s a good model for laptops, smart devices, and wide area networks, but there’s a lot to learn for those skilled in older database APIs.

The Visual Studio .NET Professional 2003 edition represents the best value in the range. There’s no Visual SourceSafe or Visio diagramming, and it lacks the server licences found in the high-end Enterprise editions, but it’s otherwise a fully comprehensive package.

For those wondering whether to make the jump to .NET, this release is probably the right moment to go ahead. The technology is maturing, and the inclusion of the Compact Framework makes the package more compelling. Students and newcomers to programming will welcome the clean object-orientation in C#, and the deep XML support on offer is essential for enterprise applications or integrating with other platforms. It’s still important to note the heavy system requirements, and that .NET applications do not run on Windows 95. In most cases, the higher productivity of .NET languages soon pays for any additional resources. --Tim Anderson, Amazon.co.uk

Amazon.com Product Description
Visual Studio .NET 2003 Professional enables you to rapidly build a broad range of applications for Microsoft Windows, the Web, and mobile devices. Developers can use 2003 Professional to build professional software, reduce IT operating costs, and integrate with a wide range of applications, systems, and devices.

Extending visual design capabilities to the server is easier than ever with Visual Studio .NET 2003. The Component Designer provides a canvas for building and instantiating business... read more

Product Description
Rapidly build next generation Internet applications that target any Internet device and integrate with any platform. Build professional software for Windows and the Web. Provides intuitive visual designers for building professional Windows and Web-based software, enabling developers to reuse existing skills across multiple application types.
"


Posted by Xander Zelders
0 Comments



 
Previous Posts
    - Rich Text Box SelectionColor
    - ListBox non-Dataset load Value and discription
    - Knew how to do it the old way, but ...
    - InvalidActiveXStateException error when editing si...
    - when to use DoEvents in vb.net?
    - Playing Audio from a Filestream using MCI
    - XML in a combobox
    - Setup Project
    - WMI Com Interop exception handling
    - Problem With Mailto Start Process

Archives
    - 08/01/2004 - 08/08/2004
    - 08/08/2004 - 08/15/2004
    - 08/15/2004 - 08/22/2004
    - 08/22/2004 - 08/29/2004
    - 08/29/2004 - 09/05/2004
    - 09/05/2004 - 09/12/2004
    - 09/12/2004 - 09/19/2004
    - 09/19/2004 - 09/26/2004
    - 09/26/2004 - 10/03/2004
    - 10/03/2004 - 10/10/2004
    - 01/02/2005 - 01/09/2005
    - 01/09/2005 - 01/16/2005
    - 01/30/2005 - 02/06/2005
    - 01/01/2006 - 01/08/2006


Disclaimer & Terms of Use | DotNet4All.Com concept & © 2004 - 2007 by Zelders² - Holland