Blog

posts tagged with vb

SDE Slides

0 Comments
By Fons Sonnemans, 20-9-2005

The slides from my presentation 'NDoc Integratie in Visual Studio 2003 & 2005' can now be downloaded.

AsyncHelper for VB.NET

0 Comments
By Fons Sonnemans, 21-4-2005

I received a mail today from Rolf Gasber asking me whether I could help him with a VB.NET version of the AsyncHelper which I used in an earlier post. Here it is:

Public Class AsyncHelper

    Private Delegate Sub DynamicInvokeShimProc(ByVal d As [Delegate], _
                                
ByVal args() As Object)

    Private Shared _dynamicInvokeShim As _
                                 
New DynamicInvokeShimProc(AddressOf DynamicInvokeShim)

    Private Shared _dynamicInvokeDone As _
                                  
New AsyncCallback(AddressOf DynamicInvokeDone)

    Public Shared Sub FireAndForget(ByVal d As [Delegate], _
                                 
ByVal ParamArray args() As Object)
        _dynamicInvokeShim.BeginInvoke(d, args,
AddressOf _
                                
 DynamicInvokeDone, Nothing)
    End Sub

    Private Shared Sub DynamicInvokeShim(ByVal d As [Delegate], _
                                  
ByVal args() As Object)
       d.DynamicInvoke(args)
    End Sub

    Private Shared Sub DynamicInvokeDone(ByVal ar As IAsyncResult)
      
_dynamicInvokeShim.EndInvoke(ar)
    End Sub

End Class

Tags: VB

.NET Quick Reference Card

0 Comments
By Fons Sonnemans, 7-11-2003

Download DotNetRefCard.pdf

I have created a small quick reference card for Microsoft .NET with some hard to remember details. My printer supports two pages per side and double sided printing. This makes it possible to print the 4 pages on a single sheet which makes it easier to use.

Contents:

  • C# String escape sequence
  • C# Numeric & Char Literals
  • String Formatting
  • Standard Numeric Format Strings
  • Custom Numeric Format Strings
  • Standard DateTime Format Strings
  • Custom DateTime Format Strings
  • Regular Expressions

I hope you will find it useful.

Any suggestions and feedback for improving this reference card is most welcome. Send your suggestions and feedback to Fons.Sonnemans@reflectionit.nl

VB.NET Bug?

0 Comments
By Fons Sonnemans, 26-7-2002

I think I have found a Bug in VB.NET (Final)! I can't compile the following program (Build Error: 'Private Function Foo() As Integer' and 'Public Function Foo() As String' cannot overload each other because they differ only by return types. ). It worked in Beta2 of VB.NET.

Public Interface ITestInterface

   Function Foo() As Integer

End Interface

Public Class TestClass

   Implements ITestInterface

   Private Function Foo() As Integer Implements VBBug.ITestInterface.Foo
      Return 1
   End Function

   Public Function Foo() As String
      Return "2"
   End Function

End Class

Tags: VB

MS Outlook 2000 and MS Agent

0 Comments
By Fons Sonnemans, 1-1-2002

By Fons Sonnemans

Download OutlookAgent.zip

You can use Microsoft Agent in Outlook 2000 to read your incoming mail.

Requirements:

  • Microsoft Outlook 2000
  • Microsoft Agent
  • Microsoft Agent Characters
  • Lernout & Hauspie TruVoice Text-to-Speech (TTS) Engine

For more information about installing MS Agent software have a look at: http://www.msagentring.org/setup.htm


10 Steps:

1. Install the requirements.
 
2.  Download this Zipfile and Unzip the CAgent.cls file to a folder (c:\temp).
 
3.  Select in 'Outlook 2000' the menu option 'Tools', 'Macro', 'Visual Basic Editor???' or press 'Alt-F11'.
 
4.  Select in the 'Microsoft Visual Basic' editor menu 'Tools', 'References???'.
   
 
5.  Check the checkboxes in front off 'Microsoft Agent Control 2.0' and 'Microsoft Scripting Runtime'.
 
6.  Open the 'File' menu and select the option 'Import File???'.

 
7. Select the CAgent.cls file and select Open.

 
The project explorer should look like:

 
8. Add the following code to the (existing) ThisOutlookSession.

 
9.  Save the project by clicking the 'Save' button in the toolbar.

 
10. Close de 'Microsoft Visual Basic' Editor.
MS Agent will now read your incoming e-mails. You can easily test it by sending a mail to yourself.


Tags: VB

All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.