Welcome Guest!
 VB.NET Helper
 Previous Message All Messages Next Message 
VB .NET Helper Newsletter  Rod Stephens
 Oct 09, 2009 09:47 PDT 

These days I often have examples that work in .NET but not in VB 6, bit
it's not too often that I post an example that works in VB 6 but not in
.NET.

This week I've posted an example that gets an object's reference count
(the number of variables pointing to it). Because VBN .NET uses garbage
collection instead of reference counting (a mistake IMHO), you can't do
this in VB .NET.

Have a great week and thanks for subscribing!
----------
Rod
RodSte-@vb-helper.com

Books To Keep: http://www.BooksToKeep.com
----------
*** Now Available ***

Beginning Database Design Solutions
http://www.amazon.com/exec/obidos/ASIN/0470385499/vbhelper/

Visual Basic 2008 Programmer's Reference
http://www.amazon.com/exec/obidos/ASIN/0470182628/vbhelper/
==========

    VB.NET Contents:
1. New HowTo: Get a module's fully qualified name in Visual Basic .NET
2. New HowTo: Send a window to the top or bottom in Visual Basic .NET

    Both Contents:
3. New Links
==========
++++++++++
<VB.NET>
++++++++++
==========
1. New HowTo: Get a module's fully qualified name in Visual Basic .NET
http://www.vb-helper.com/howto_net_get_module_name.html
http://www.vb-helper.com/HowTo/howto_net_get_module_name.zip

The GetModuleName function returns the module's fully qualified name. It
gets the Type for the Person class and uses that object's Module method
to get the module. It then simply returns the module's
FullyQualifiedName property.

Imports System.Reflection

Public Class Person
    ' Return the module's fully qualified name.
    Public Shared Function GetModuleName() As String
        Dim my_module As [Module] = GetType(Person).Module
        Return my_module.FullyQualifiedName
    End Function

    ...
End Class
==========
2. New HowTo: Send a window to the top or bottom in Visual Basic .NET
http://www.vb-helper.com/howto_net_send_to_top_bottom.html
http://www.vb-helper.com/HowTo/howto_net_send_to_top_bottom.zip

The program uses the SetWindowPos API function to move the window to the
top or bottom.

<DllImport("user32.dll", SetLastError:=True)> _
Private Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal
hWndInsertAfter As IntPtr, ByVal X As Integer, ByVal Y As Integer, ByVal
cx As Integer, ByVal cy As Integer, ByVal uFlags As UInt32) As Boolean
End Function

ReadOnly HWND_BOTTOM As New IntPtr(1)
ReadOnly HWND_TOP As New IntPtr(0)

Private Const SWP_NOSIZE As UInt32 = &H1
Private Const SWP_NOMOVE As UInt32 = &H2

Private Sub btnSendToBottom_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnSendToBottom.Click
    Dim flags As UInt32 = SWP_NOMOVE Or SWP_NOSIZE
    SetWindowPos(Me.Handle, HWND_BOTTOM, 0, 0, 0, 0, flags)
End Sub

Private Sub btnBringToTop_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnBringToTop.Click
    Dim flags As UInt32 = SWP_NOMOVE Or SWP_NOSIZE
    SetWindowPos(Me.Handle, HWND_TOP, 0, 0, 0, 0, flags)
End Sub
==========
++++++++++
<Both>
++++++++++
==========
3. New Links
http://www.vb-helper.com/links.html

Enable Technology Training
http://www.enableit.co.uk
Training in VBA, ASP, ASP.NET, SQL Server, etc. in West Midlands and
Birmingham.

Advanced Outlook Repair
http://www.repair-outlook.com/
Outlook recovery tool that scans damages folders to recover messages,
folders, etc.

calnet Technology Group
http://calnettech.com/
Computer support and IT Services in the Los Angeles/Irvine/Long Beach
area.
==========
Archives:
    http://www.topica.com/lists/VBHelper
    http://www.topica.com/lists/VB6Helper
    http://www.topica.com/lists/VBNetHelper

Post questions at:
    http://www.topica.com/lists/VBHelperQA
	
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Developers
 Food & Drink
 Health & Fitness
 Internet
 Music
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Software
 Sports
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.