Shannon Shang-I think therefore I am

We came here, you and I, to this place and this profession, to be great, to do great things, and give form to great dreams - and we have

October 2003 - Posts

My Chinese bLog updated

Building my new chinese bLog .

I will be keep a record of  anything that i am thinking.

Rss Url:

http://blogbus.com/blogbus/blog/rdf.php?blogid=4395

Web Url:

http://ch21st.blogbus.com

Microsoft DonNet code samples download

Microsoft asp.net with visual studio .net - code samples

This session will look at the ASP.NET, the next version of ASP. ASP.NET is a compiled .NET Framework-based environment. This allows developers to author applications in any .NET Framework compatible language, including Visual Basic, C#, and JScript. ASP.NET improves deployment, scalability, security, and reliability. ASP.NET also addresses the browser compatibility issues with the Web Forms technology. It will demonstrate how to build web applications with Web Forms, using Visual Studio.NET.

Download Here

Visual C# .NET Code Samples

Get Here

Visual C# Language Specification

Download

MSDN Show: Programming in C#

In this episode, we talk with Anders Hejlsberg, a Distinguished Engineer at Microsoft, who has been instrumental in the design, development, and implementation of this language and its role in the upcoming .NET platform.

 Download Here

Implementing ADO with Various Development Languages Sample

This sample code is provided in conjunction with the MSDN Library article, "Implementing ADO with Various Development Languages." The article Describes how to implement ADO in Microsoft® Visual Basic®, Microsoft Visual C++®, VBScript, JScript®, and Java.

DownLoad

BuildIt - Team Development Build Tool

BuildIt.NET is designed to jump-start the build process used for development of .NET distributed applications. This download provides full source code and comprehensive documentation for the Microsoft Visual C#® development tool and Microsoft Visual Basic® .NET development system.

DownLoad

 

C#: A SQL Server XML and ASP.Net Runtime Application

This customer service sample application demonstrates the use of the Microsoft .Net Framework, SQL Server 2000 XML functionality, and XSLT documents. It allows customers to view customer, order, and order detail information in a secure environment

DownLoad

CmdWnd Sample

This sample creates a modeless command window into which you can enter three types of commands: CmdWnd commands, IDE menu command, and DOS commands

Download

Wins Sample

Wins is a window manager that you can use to find, minimize, make visible, activate, and close windows— even those windows opened in a debug session. It will create files that, when loaded, will open selected windows

Download

MSDN C# Message Queuing

Download

Inside C#, Second Edition: Sample Code

Download

Inside MSXML Performance Sample Inside MSXML Performance

Download

Serving Images from .NET Assemblies

This example shows how to serve images through ASP.NET from resources bound to assemblies.

Download

Sample Code: Microsoft® Visual C#™ .NET (Core Reference), 0-7356-1290-0

Download

Code samples for 'Customizing Code Generation in the .NET Framework Visual Designers'(c#)

Download

Visual Basic 6.00 HOW TO

============================================================

HOWTO: Detect If Computer Has Sound Card That Plays Wave Audio

HOWTO: Determine the Differences Between DoEvents and Sleep

HOWTO: Create a Default Value for Custom Controls and Classes

HOWTO: Determine If Text in a Text Box Can Be Undone

HOWTO: Detect When a Control Is Placed into a UserControl

HOWTO: Set Number of .CAB's in Setup.lst After Repackaging

HOWTO: Change the External HTML Editor

HOWTO: Show Table Borders for All Cells in DHTML Page Designer

HOWTO: Improve Performance of Object De-allocation

HOWTO: Bind a DataList or DataCombo to a Recordset at Run Time

SAMPLE: FSOSAMP.EXE Application Uses the FileSystem Object

HOWTO: Make A Trusted SQL Server DSNLESS Connection

HOWTO: Control Which MDAC Version the Package and Deployment Wizard (PDW) Distributes

HOWTO: Display an Image in a Command Button

HOWTO: Label Pie Slices as Percentages in MSChart Pie Chart

HOWTO: Determine the Currently Selected ScopePaneItem

HOWTO: Refresh a Parameterized DataReport

HOWTO: Expose and Use ENUMS from Visual Basic Components in Active Server Pages

HOWTO: Resolve Ambiguous Names with the Outlook Object Model Using Visual Basic

HOWTO: Use the Split Function to Put a Delimited String into a String Array

HOWTO: Change the Axis Label Font and the Font Size in MSChart

HOWTO: Install an Excel Add-In (XLA or XLL) with Automation

HOWTO: Remove a Visual Basic Project from Visual SourceSafe

HOWTO: Determine If a Table or Query Exists

HOWTO: Get Help with Crystal Reports - International and U.S.

HOWTO: Provide Constants from an ActiveX Component

HOWTO: Determine Visual Basic Trappable Errors

HOWTO: Enable the Windows 95/98/Me Size Grip in a VB Form

HOWTO: Create Excel Chart w/OLE Automation from Visual Basic

HOWTO: Synchronize Data on the Form with a dbCombo

HOWTO: How the Server Use Is Determined by OLE

HOWTO: Close Shelled Process When Finished under Windows 95/98/Me

HOWTO: Change Add-In Manager Description for Add-Ins

HOWTO: Determine the Contents of a Cell in a DBGrid Control

HOWTO: Find and View the Amount of Free Disk Space on a Drive

HOWTO: Speed up Alignment of Controls with Triple-Click

HOWTO: Easily Set Up the Tab Sequence of a Form

HOWTO: Drag a Form by a Child Control

HOWTO: Determine Selected Control from Array of Option Buttons

HOWTO: Pass Optional Parameters to a C DLL Function from VB

HOWTO: Get a Typelib (.TLB) File for a Visual Basic OLE Server

HOWTO: Install Visual Basic to a Network Using 8.3 File Names

HOWTO: Put a ComboBox into a Toolbar

HOWTO: List Stored Procedures in a SQL Server Database

HOWTO: Determine if RDO Restartable Property is Set to False

HOWTO: Get a Long Filename from a Short Filename

HOWTO: Find and Highlight Text in the RichTextBox Control

HOWTO: Use the Assert Method for Debugging

HOWTO: Create A Default Event for a UserControl

HOWTO: Create a Default Property For a User Control

HOWTO: Use Spaces in Enumerated Types

HOWTO: Select All Text in a Field When It Gets the Focus

HOWTO: Determine the Type of Drive Using Win32

HOWTO: Close a Shelled Process When Finished Under Windows

HOWTO: Capture the Parameters from an SQL Procedure with RDO

HOWTO: Get a Long Filename from a Short Filename

HOWTO: Use Optional Arguments in Intrinsic Data Types

HOWTO: Pass a NULL String to a Windows API from Visual Basic

HOWTO: Print the Contents of the MS Chart Control

HOWTO: Tell If UserControl is in Design-Time or Run-Time

HOWTO: Get the Unread Message Count from an Outlook Folder

HOWTO: Give Your ActiveX Component a Friendly Name

HOWTO: Save Attachments to File with MSMAPI.VBX or MSMAPI.OCX

HOWTO: Play MIDI Files Using API Functions

HOWTO: Play an .AVI Video File in Full Screen in Visual Basic

HOWTO: Select a Directory Without the Common Dialog Control

HOWTO: Set the FillColor in the MS Chart Control at Run- time

HOWTO: How to Send/Receive E-Mail Messages with Visual Basic

HOWTO: Use the CallByName Function to Run a Procedure

HOWTO: Create an HTML Page Using ADO and MSFlexGrid

HOWTO: Access and Retrieve the SQL QueryPlan from RDO

SAMPLE: PERSIST.EXE Persists Class Objects with VB6

SAMPLE: LLStream.exe Plays Streaming Audio Files

HOWTO: Print Contents of the Web Browser Control From VB

HOWTO: Set a Custom Range for Value Axis with MSChart Control

HOWTO: Force Application Setup to Use the Default Directory

HOWTO: Create a MAPI-Aware UserControl

HOWTO: Create Shortcuts on the Programs Menu with PDW

HOWTO: Extract an Icon from a Windows Program

HOWTO: Change ProgressBar Orientation at Run-Time

HOWTO: Determine Which 32-Bit Windows Version Is Being Used

HOWTO: Navigate Between DHTML Designer Pages

HOWTO: Add a Horizontal Scroll Bar to a Visual Basic ListBox

HOWTO: Implement Additional Interfaces in an ActiveX Control

HOWTO: Select and Unselect a Range of Cells in MSFlexGrid

HOWTO: Use Bound Controls with an ADO Recordset

HOWTO: Use ADO to Query a Table with a Space in Its Name

HOWTO: Install Crystal Reports for Use in Visual Basic 6.0

HOWTO: Tell That a Visual Studio Service Pack Is Installed

HOWTO: Use the Batch File Generated by PDW

HOWTO: Display Boolean Values in Bound DataGrid

HOWTO: Change Databindings on the Fly

HOWTO: Open a Secured Access Database in ADO Through OLE DB

HOWTO: Display a ReadMe File at the End of a Custom Setup

HOWTO: Set and Get Cookies for a URL Using WinInet APIs

HOWTO: Install the Microsoft Windowless Controls for VB6

HOWTO: Determine RDO Files Needed for Distribution of App

HOWTO: Install a Visual Basic Application on Terminal Server

HOWTO: Debug a MAPI Transport Provider

HOWTO: Determine If Internet Explorer Is Offline from an ActiveX Document

?>

October 2003 Visual Studio .NET Documentation Update
The October 2003 Visual Studio .NET Documentation Update provides the latest version of the Visual Studio .NET 2003 documentation. This update includes:

  • Over 5,000 additional code examples for Visual Basic, Visual C#, and Visual C++.
  • Bug fixes.
  • Content improvements and clarifications.

Download Url:

 

MSDNVSsp1-KB827819-X86-Enu.exe
Another bug in .net

pictureBox.Image.Save  method

For Example:

Reference MSDN,following code will save the image of the picturebox as a ico file.

private void button1_Click(object sender, System.EventArgs e)
  {
      System.Drawing.Imaging.ImageFormat  iconFormat;

   iconFormat=System.Drawing.Imaging.ImageFormat.Icon;
   pictureBox1.Image.Save("c:\\1.ico", iconFormat);
  }

But ,in fact, file format of  "1.ico" is PNG than ICO

Found bugs in VS 6.0

Microsoft Hierarchial FlexGrid Control

Set DataSource of a MSHFlexGrid(MSHFlexGrid1 ) control to a ADODB Recordset (mRst).

At a time  RecordCount of the mRst is 0,from then on ,will can't select the item of MSHFlexGrid1 with mouse.

 

Some components, such as DataReport only can be use in the IDE for the  user who install VB,in Windows2000+

For Example:

NT User A install VB 6 IDE,he can use full components that installed in the system,

but if other NT user ,such as user B login the system,he will can't find “Add Data Report“ submenu,because the DataReport component didn't register to B user.

Solution:

Import the VB6  Addins and Designers register file to all user or to local machine.

 

VC Package not available or not registered

After reinstall VS.net,when i want to create a new project, vs.net raise a error ,it's message is "VC Package not available or not registered"?

Referrence MSDN

http://support.microsoft.com/default.aspx?scid=kb;en-us;320427

This behavior seems to occur because the Windows Installer does not register TLBs and DLLs if the installer finds that these items already exist. In most cases, a previous version of Visual Studio .NET causes this behavior, even if the previous installation was under a different operating system.

and the resolution is to  run the Visual Studio .NET repair, and the setup program will re-registered the TLBs and DLLs  files.

To run the repair, follow these steps:

  1. On the Start menu, point to Settings, click Control Panel, and then click Add/Remove Programs.
  2. On the list of installed programs, click Visual Studio .NET, and then click Change.
  3. Click the second item in the 1 2 3 Visual Studio Setup dialog box.
  4. Click Repair/Re-install, and then follow the onscreen instructions.

but i dislike this way,and i hopethere is a better way to do that .