The Microsoft® .NET Framework version 1.1 includes ASP.NET Mobile Controls that enable developers to easily create mobile Web applications. Developers can write and maintain a single application that targets multiple devices. The mobile controls deliver markup language specifically adapted for each browser that accesses the application. ASP.NET Mobile Controls originally shipped in the Microsoft Mobile Internet Toolkit.

 

http://www.microsoft.com/downloads/details.aspx?FamilyID=02fa15fe-40d9-4dce-9bb1-4dd61a5b7ccb&DisplayLang=en


 
Categories: ASP.NET

The Microsoft® .NET Compact Framework 1.0 SP2 Developer Redistributable includes the latest .NET Compact Framework 1.0 SP2 CAB files for all supported processor types.
This install is intended for users of Visual Studio .NET 2003.

This package contains CAB files only which may be redistributed by developers according to the terms of the accompanying EULA and the Visual Studio .NET 2003 EULA.
To update an emulator or device, start the emulator or device, copy then run the cab file which matches the device. (Emulators use x86). (This package does not update Visual Studio .NET 2003 CAB deploy).

Important: Visual Studio .NET 2003 is required to create .NET Compact Framework-based applications. Follow the Visual Studio .NET 2003 link in the Related Resources section on the right for more information.

 

http://www.microsoft.com/downloads/details.aspx?familyid=10600643-09b3-46d8-ba28-bc494bc20d26

 


 
Categories: Compact Framework

The Microsoft® .NET Compact Framework 1.0 SP2 Redistributable includes everything you need to run .NET Compact Framework applications, including the Common Language Runtime and the .NET Compact Framework class library.

Important: Visual Studio .NET 2003 is required to create .NET Compact Framework-based applications. Follow the Visual Studio .NET 2003 link in the Related Resources section on the right for more information.

This package uses ActiveSync to update the device. Make sure to dock your device before running NETCFSetup.msi. You can run the ActiveSync setup later by going to your install folder and running NCFSetup.exe once the device is docked. Those not using ActiveSync can run the CAB files which match the device found in the install folder directly on the device.

 

http://www.microsoft.com/downloads/details.aspx?familyid=359ea6da-fc5d-41cc-ac04-7bb50a134556

 


 
Categories: Compact Framework

December 11, 2003
@ 03:15 AM

What happened was that I had objects pointing to other objects. To allow navigation back, I had also included pointers back to the 'owner' of the objects.

This last thing meant that the objects never got freed, because there was always something referencing them: the members were referenced by the parent, and the parents were referenced by the members. No matter if the caller set the pointer to the top-object in the hierarchy to nothing, the hierarchy remained in memory forever.

Another effect was, that the Class_Terminate event for the objects was never called, and that is were the objects' contents are written to the data base.

The tip is: be careful with references between objects. If you have references like the ones described above, ensure that you have a method in the class that frees all cross-references. Otherwise objects never get freed, and their Class_Terminate event will never be called.

This may sound like a trivial something, but it took me quite some time to figure out why my application was never releasing its memory.

 

Tip Submitted By: Marjo van Diem


 
Categories: VB

I have written a simple function called NeedsFiltering which I use to determine if a block of text contains one or more search characters. The function uses the Like operator to determine if one or more characters in the specified range exist in the input string. If the routine returns False, the text block can be "passed through" without the need for a more time-consuming search.

Function NeedsFiltering (szInput As String) As Integer
Dim szLikeExpr1 As String
Dim szLikeExpr2 As String
szLikeExpr1 = "*[" & Chr(0) & "-" & Chr(8) & "]*"
szLikeExpr2 = "*[" & Chr(128) & "-" & Chr(255) & "]*"
NeedsFiltering = szInput Like szLikeExpr1 Or szInput Like szLikeExpr2
End Function

The "*" in the pattern expressions means "zero or more characters." Therefore, the Like operator will return True if one or more characters in the specified range exist anywhere in the input string. I have used this routine quite successfully in a character filtering application which filters out control and extended ANSI characters (0-8,128-255) from an input file, and places the filtered text in a temporary file. The amount of savings depends upon the number and location of characters in the input string that one wishes to filter out.

 

Tip Submitted By: Barth Riley


 
Categories: VB

These files are used to register you program with the Registration Database. The problem is that the files are not needed! When you compile your OLE server, VB compiles code into it that will do this for you! The problem is that MS does not make this easy for you to find. Because the want you to use the Setup Wizard (anyone that knows me, knows how I feel about the Setup Wizard).

To register your program, simply run your server with the following command line parameter.

MYOLESVR.EXE /REGSERVER 

Your program won't start, it will just register itself. Just make sure you do this after all the runtime files have been installed. You can also un-register your server by using the /UNREGSERVER parameter.

 

Tip By: David McCarter


 
Categories: VB

December 11, 2003
@ 03:09 AM

Run Programs During Windows StartUp

Find the key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

Add a new String Value. Give the value any name, usually the name of the program. Then double-click on it and type in the path, file name and any command line parameters. For example:

Value Name = Notepad
Value Data = c:\windows\notepad.exe

Run Programs When Loading A User

Do the same as listed above, but use the key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run 

 

Tip Submitted By: Yatir Halevi


 
Categories: VB

December 11, 2003
@ 02:57 AM

These properties are usually ones that cause the control to re-paint, like Enabled, Visible, Caption and Text. The flicker can be easily reduced by not setting a property when it is already set. For instance, if the Enabled property is set to True why set it to True again?

Enable/Disable Routine

Use this to enable or disable a control.

Sub SetEnabled (ctrlIn as Control, bSetting as Integer)
     If ctrlIn.Enabled <> bSetting Then
           ctrlIn.Enabled = bSetting
     End If
End Sub

Caption Routine

Use this to change a Caption property.

Sub SetLabel (ctrlIn as Control, sNewText as String)
     If ctrlIn.Caption <> sNewText Then
           ctrlIn.Caption = sNewText
     End If
End Sub

You can make as many of these types of routines as you like. Any property that affects a controls appearance, such as colors, fonts and text, would be a good prospect.

 

This tip is reprinted from the VB Tips & Tricks Volume 1 book.
Parts of this tip was submitted by: David McCarter


 
Categories: VB

In order to setup the camera, it is necessary to have the following:

  1. Not allow any other windows to be running on top of the application. (On Top is optional)
  2. Not allow the application to be re-sized.
  3. Not allow the application to be moved.
  4. Not have Minimize/Maximize buttons. (Minimize button is optional)
  5. Have a visible menu bar available.

Seems like Windows (VB?) allows you to either have a menu with a title bar that can be moved, or no menu with a title bar that does not move. I could not get a maximized window with a menu bar, that was not moveable. Selecting various combinations of the Maximize and Minimize buttons did not help. Usually, double-clicking on the title bar restored the window to its original size and you could then drag it around with the mouse.

The code below allows you to create a Window which is OnTop, or normal, depending on what your application is. It does not respond when the title bar is double clicked for maximize/restore. A visible menu bar is also available.

Form Properties necessary for this implementation:

---------------------------------------------------------------------------

MaxButton False Disabled in the code

Minbutton True/False Depending on the needs of the application

ControlBox True Needed for maximize/restore to work

WindowState Maximized To maximize the form on loading

BorderStyle 0-None Disables Alt+F4 for closing application

BorderStyle 1-Fixed Single Worked best for this application

---------------------------------------------------------------------------

BorderStyle of 2-Sizable is not a good choice, because the frame of the window shows up when you double-click on the title bar.

Declare Sub SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wflags As Integer)
Declare Function GetSystemMenu Lib "User" (ByVal hWnd As Integer, ByVal bRevert As Integer) As Integer
Declare Function DeleteMenu Lib "User" (ByVal hMenu As Integer, ByVal iditem As Integer, ByVal wflags As Integer) As Integer
Const SC_SIZE = &HF000
Const SC_MOVE = &HF010
Const MF_BYCOMMAND = &H0
Sub Form_Load ()
Dim hMenu, iSuccess As Integer
'-------------------------------------------------------
' This will not allow the window to be moved or re-sized
'-------------------------------------------------------
hMenu = GetSystemMenu(Me.hWnd, 0)
iSuccess = DeleteMenu(hMenu, SC_SIZE, MF_BYCOMMAND)
iSuccess = DeleteMenu(hMenu, SC_MOVE, MF_BYCOMMAND)
'-----------------------------------------------------------------------
' This will set the Window to the size of the screen no matter what it 
' is. If the user tries to double click the window, it will appear to 
' not do anything, though it is in restored mode.
'-----------------------------------------------------------------------
Me.Height = Screen.Height + 45
Me.Width = Screen.Width + 60
Me.Left = -15
Me.Top = -15
'--------------------------------------------
' This will make the window always be visible
'--------------------------------------------
SetWindowPos Me.hWnd, -1, 0, 0, 0, 0, &H50
'----------------------------------------------------------------
' This will remove the always visible attribute, use where needed
'----------------------------------------------------------------
'SetWindowPos Me.hWnd, -2, 0, 0, 0, 0, &H50
End Sub

 

Tip Submitted By: Sunny Jamshedji


 
Categories: VB

December 11, 2003
@ 02:50 AM

declare the following in a BAS file:

Declare Function GETDRIVETYPE Lib "Kernel" (ByVal nDrive As Integer) As Integer

You must pass this function the drive number, not a drive letter. Drive numbers always start a 0. For instance, drive A: is drive #0, Drive C: is drive #2.

DRIVETYPE = GETDRIVETYPE(DRIVENUM)

This function returns a 2 for removable drives, 3 for fixed drives or 4 for remote drives. This function will return a 0 if it is passed a drive number that does not exist on the system.

 

Submitted By: David McCarter


 
Categories: VB

It relies on the fact that VB removes Debug.Print statements from the compiled EXE. Use Debug.Print to print something that will cause an error. Divide by zero is simple enough.

Public Function IsCodeCompiled() As Boolean
  On Error GoTo ErrorHandler
  Debug.Print 1 / 0
  IsCodeCompiled = True
  Exit Function
ErrorHandler:
  IsCodeCompiled = False
  Exit Function
End Function


Tip Submitted By: David Hay


 
Categories: VB

Microsoft in their invariable wisdom somehow chose to make the manual DRAG function operate rather counter-intuitively. That is, when an item is dropped, the Mouse_Up function for the initiating subroutine is NOT called! This makes it very difficult to detect unsuccessful drops. Detecting an unsuccessful drop can be of importance when you need to update animation that may be in progress to support the Drag-Drop Sequence. To this end, this application note will suggest a very simple method for detecting the End_Of_Drag sequence. This technique work whether the operation was successful or not. One of its major benefits of this technique is that it does not require any custom control programming!

The method involves generating the proper Mouse_Up event at the end of the drag operation. This can be accomplished using a single Windows API call and a normal Visual Basic Timer. The sequence is:

  1. Enable the timer in the Mouse_Down sequence after any animation steps but just before starting the manual Drag sequence.
  2. On each timer tick look at the mouse button to determine if the operator has released.

The steps are pretty simple:

'**** In a .BAS form (as you will probably use this elsewhere) 
Declare the API Function Declare Function GetKeyState Lib "User" (ByVal nKey As Integer) As Integer
'**** In the code sequence for the control of Interest 
Sub Text2_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
    FileCabinet = FileOpenIcon ' *** Animation, transfer image from one Box to another 
    Text2.DragIcon = AnyIcon ' *** Set up the Drag Icon
    Timer1.Enabled = True ' *** Enable the Timer (Put on the form at Design Time)
    Text2.Drag 1 '*** Start the manual Drag Operation
End Sub 
'***** In the form Timer Event Code Section 
Sub Timer1_Timer ()
    K% = 1 '*** Set the Virtual Scan code for the Mouse Left Button 
    I = GetKeyState(K%) '*** Get the Key state
    I = I And (Not 1) '*** Mask off the unimportant Bits
    If I = 0 Then '*** Check to see if the operator has released the button
        FileCabinet = FileClosed '*** Finish animation, by transferring images
        Timer1.Enabled = 0 '*** Turn off the timer so this event will not be triggered
    End If
End Sub

 

Tip Submitted By: Michael D. Strathman


 
Categories: VB

December 11, 2003
@ 02:18 AM

The CheckSum32 function I propose calculates the 32 bits checksum of a string, using a currency variable to avoid overflow errors.

Function CheckSum32(A$) As Long
'Calculates the 32bits checksum of a string
Const MAXULONG = 4294967295# 'Max unsigned long integer
Const MAXLONG = 2147483647 'Max signed long integer
Dim Sum As Currency 'Currency variable type to avoid overflow
Dim i As Integer 'Source string character counter
Dim j As Integer 'Checksum byte counter (byte # = 0..3)
    j = 0
    For i = 1 To Len(A$)
        'Add byte at relevant position in sum
        Sum = Sum + (Asc(Mid$(A$, i, 1)) * 256 ^ j)
        'remove 33d bit if set
        If Sum > MAXULONG Then Sum = Sum - (MAXULONG + 1)
            'skip to next byte in sum
        If j < 3 Then
            j = j + 1
            Else
              j = 0
        End If
    Next
    'Conversion for signed long integer result
    If Sum > MAXLONG Then Sum = Sum - (MAXULONG + 1)
    CheckSum32 = Sum
End Function

 

Tip Submitted By: Marc Lajus


 
Categories: VB

December 11, 2003
@ 02:15 AM

You can turn off the minimize and maximize menu options by changing properties, but what if you're doing something critical in your VB program that should not be interrupted and you need to remove the "close" option?

Make the following declares

Declare Function GetSystemMenu Lib "User" (ByVal hWnd As Integer, ByVal bRevert As Integer) As Integer
Declare Function RemoveMenu Lib "User" (ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer
Global Const MF_BYPOSITION=&H400

Use the following in your code to remove the "close" option:

SystemMenu% = GetSystemMenu (hWnd, 0) 
Res% = RemoveMenu(SystemMenu%,6, MF_BYPOSITION)
Res% = RemoveMenu(SystemMenu%,6, MF_BYPOSITION) 'also remove the separator line

Check out the GetMenuID and InsertMenu API functions to do more complicated tasks.


 


 
Categories: VB

December 8, 2003
@ 01:52 AM

12/2/2003: Altiris, Inc. (Nasdaq: ATRS), a leader in systems management solutions that reduce the total cost of owning information technology, today announced that it has acquired privately held Wise Solutions in a combined cash and stock transaction valued at approximately $43 million.

Wise Solutions is the leading provider of enterprise application management solutions and is best known for its expertise in application packaging, including conflict analysis and resolution. Wise Solutions has licensed its Wise Package Studio products to a wide range of customers and partners such as Dell, HP, Wal-Mart, Universal Studios and GlaxoSmithKline.

The strategic acquisition of Wise significantly enhances Altiris® IT lifecycle management offerings with the addition of Wise branded products, and provides Altiris with technology that will enhance existing client and server management offerings, specifically in software delivery and patch management. The acquisition is expected to be immediately accretive and is expected to provide operational efficiencies over time.

"Through this strategic acquisition, Altiris adds world class software packaging and delivery capabilities to our portfolio of IT lifecycle management offerings," commented Greg Butterfield, President and CEO of Altiris. "Through our existing partnership with Wise, we have already been successful in winning new customer relationships and are now positioned to further leverage our channel partner relationships. As a result of this acquisition, we expect to further integrate the technologies and expand our branded offerings."

Rockwell Automation, a leading industrial automation company with annual sales of approximately $4 billion, uses Altiris and Wise Solution technologies to automate desktop and laptop management for more than 12,000 employees.

Jim Harings, Rockwell Automation global administration analyst, said, "We use Altiris and Wise Solutions to help reduce the cost of software configuration management. These complementary technologies help us automate and standardize application management and software distribution. A natively integrated solution will help us further create a more stable software environment and ultimately increase end-user productivity while reducing help desk costs."

Fred Broussard, senior research analyst for IDC's PC and Device Management Software, said, "When there are thousands of machines within an IT department's responsibility, repackaging is an important part of the overall software distribution process. A software distribution solution that can take advantage of repackaging capabilities to speed software delivery to the desktops is going to strengthen Altiris' product line."

Under the terms of the agreement, Altiris agreed to pay approximately $31.5 million in cash and issue 348,797 shares of Altiris common stock for all capital stock of Wise Solutions. A portion of the consideration has been placed in escrow to satisfy certain indemnification obligations of the Wise Solutions shareholders.


 
Categories: Components | News