Unicode Controls for VB6 Key 2.9.28


Web Browsers / Friday, February 23rd, 2018
Developer: Lorenzi Davide
Specifications: Version 3.1 fixes Combo Box controls have a problem when selecting items with the keyboard, sometimes the index didn't correspond with the shown text.
Requirements: None
Limitation: 45-day free trial
Operation system: Windows 95/98/Me/NT/2000/XP/Vista
Price: $699
License: Free to try
Version: v2.9.28
Downloads: 1809
Rating: 4.5 / Views: 4681

Unicode controls in VB6

The controls look and behave exactly like the corresponding parts of the Explorer and are Unicode enabled…. If a VbDate is applied to a label caption or textbox it will display the date as short date as defined in your regional configurations. In in . . . . . . . . . . . . . . . . . . . . . Http://msdn2.Microsoft.Com/en-us/library/ms688421.Aspx ‘ The variants are required by the OLE API ‘ ref > http://msdn2.Microsoft.Com/en-us/library/ms221473.Aspx pVartypes(0) = vbLong: Vars(0) = VarPtr(fmtEtc): pVars(0) = VarPtr(Vars(0)) pVartypes(1) = vbLong: Vars(1) = VarPtr(pMedium): pVars(1) = VarPtr(Vars(1)) If DispCallFunc(IID_IDataObject, IDataObjVTable_GetData, CC_STDCALL, _ vbLong, 2, pVartypes(0), pVars(0), varRtn) = 0 Then If pMedium.Data = 0 Then Exit Function ‘ no OLE data object, nothing to do Else ‘ we have a pointer to the files, kinda sorta CopyMemory hDrop, ByVal pMedium.Data, 4& If Not hDrop = 0 Then ‘ the hDrop is a pointer to a DROPFILES structure ‘ copy the 20-byte structure for our use CopyMemory dFiles, ByVal hDrop, 20& End If End If If dFiles.FWide = 0 Then ‘ ‘ ANSI listing, probably called on Win9x GlobalFree pMedium.Data ‘ leave the passed Data object unmodified Else ‘ use the pFiles member to track offsets for file names dFiles.PFiles = dFiles.PFiles + hDrop ‘ build string array to hold unicode file names ReDim sFiles(1 To OLEDragDrop_DataObject.Files.Count) For iCount = 1 To UBound(sFiles) ‘ get the length of the current file & multiply by 2 because it is wide format ‘ lstrLenW is supported in Win9x lLen = lstrlenW(ByVal dFiles.PFiles) * 2 sFiles(iCount) = String$(lLen 2, 0) ‘ build a buffer to hold the file name If bTestUnicode Then ‘ option wanted to test for unicode characters If Not bIsUnicode Then ‘ for multiple files, only test if needed For ptrChar = dFiles.PFiles + 1 To dFiles.PFiles + lLen – 1 Step 2 CopyMemory dFiles.PtX, ByVal ptrChar, 1 If (dFiles.PtX And &HFF) Then Exit For Next bIsUnicode = (ptrChar < dFiles.PFiles + lLen) End If End If CopyMemory ByVal StrPtr(sFiles(iCount)), ByVal dFiles.PFiles, lLen ' populate the buffer ' move the pointer to location for next file, adding 2 because of a double null separator/delimiter btwn file names dFiles.PFiles = dFiles.PFiles + lLen + 2 Next GlobalFree pMedium.Data ' modify the passed Data object so it now contains unicode strings as needed With OLEDragDrop_DataObject.Files .Clear For iCount = 1 To iCount – 1 .Add sFiles(iCount), iCount Next End With End If GetDroppedFileNames = True End If bTestUnicode = bIsUnicode End Function Private Function PerformFileLengthTest(FileName As String) As Long ' opens a unicode filename and gets its file size Const GENERIC_READ As Long = &H80000000 Const OPEN_EXISTING = &H3 Const FILE_SHARE_READ = &H1 Const FILE_ATTRIBUTE_ARCHIVE As Long = &H20 Const FILE_ATTRIBUTE_HIDDEN As Long = &H2 Const FILE_ATTRIBUTE_READONLY As Long = &H1 Const FILE_ATTRIBUTE_SYSTEM As Long = &H4 Const FILE_ATTRIBUTE_NORMAL = &H80& Dim Flags As Long, Access As Long Dim Disposition As Long, Share As Long Dim hFile As Long Access = GENERIC_READ Share = FILE_SHARE_READ Disposition = OPEN_EXISTING Flags = FILE_ATTRIBUTE_ARCHIVE Or FILE_ATTRIBUTE_HIDDEN Or FILE_ATTRIBUTE_NORMAL _ Or FILE_ATTRIBUTE_READONLY Or FILE_ATTRIBUTE_SYSTEM hFile = CreateFileW(StrPtr(FileName), Access, Share, 0&, Disposition, Flags, 0&) If hFile = 0 Then ' hFile should never be zero. Note that Vb supports both Gregorian and Hijri Calendars via VBA.Calendar = vbCalGreg or VBA.Calendar = vbCalHijri   52 describes the "Unicode Collation Algorithm" at , and this link provides further information , however Microsoft does not use the "Unicode Collation Algorithm" as indicated at .

VB6 Unicode problem (persain)

Note: Most of the above techniques will not work under Themed WinXP under the following conditions:   Forms 2.0 Object Library (Unicode) As can be seen above it is a easy way to get limited Unicode support in your projects but falls way short of something you would want to use in a Commercially distributed application. Public Function INIWriteString(ByVal Section As String, ByVal key As String, ByVal lpString As String, ByVal FileName As String) As Long If Not FileExists(FileName) Then UnicodeFile_Write_VB FileName, “” End If INIWriteString = WritePrivateProfileStringW(StrPtr(Section), StrPtr(key), StrPtr(lpString), StrPtr(FileName)) End Function Public Function INIDeleteKey(ByVal Section As String, ByVal key As String, ByVal FileName As String) As Long INIDeleteKey = WritePrivateProfileStringW(StrPtr(Section), StrPtr(key), 0&, StrPtr(FileName)) End Function Public Function INIDeleteSection(ByVal Section As String, ByVal FileName As String) As Long INIDeleteSection = WritePrivateProfileStringW(StrPtr(Section), 0&, 0&, StrPtr(FileName)) End Function Public Function INIReadSections(ByVal Default As String, ByVal FileName As String) As String Dim cSize As Long Dim strReturn As String Dim retVal As Long cSize = 32768 strReturn = String(cSize, 0) retVal = GetPrivateProfileStringW(0&, 0&, StrPtr(Default), StrPtr(strReturn), cSize, StrPtr(FileName)) If retVal > 0 Then INIReadSections = Left(strReturn, retVal) End If End Function Public Sub UnicodeFile_Write_VB(ByVal sFileName As String, ByVal strValue As String) Dim FF As Long Dim b() As Byte FF = FreeFile Open sFileName For Binary Access Write As #FF ReDim b(1) b(0) = &HFF b(1) = &HFE Put #FF, , b Erase b b = strValue Put #FF, , b Close #FF End Sub  66 Support Unicode in Crypto Utilities: Most Vb6 crypto utilities were written with ANSI only support.