home *** CD-ROM | disk | FTP | other *** search
/ PC Open 19 / pcopen19.iso / Imag / IMAGINE / CUSTOM.Z / MODBASIC.BAS < prev    next >
Encoding:
BASIC Source File  |  1997-04-11  |  1.4 KB  |  35 lines

  1. Attribute VB_Name = "modBasic"
  2. Option Explicit
  3.  
  4. 'For Always-On-Top switches
  5. Public Const conHwndTopmost = -1
  6. Public Const conHwndNoTopmost = -2
  7. Public Const conSwpNoActivate = &H10
  8. Public Const conSwpShowWindow = &H40
  9. Public Const SWP_NOMOVE = 2
  10. Public Const SWP_NOSIZE = 1
  11. Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE Or conSwpNoActivate
  12.  
  13. Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  14.  
  15. 'Declares and constant for getting the locale information
  16. Public Const LOCALE_SDECIMAL = &HE
  17. Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
  18. Declare Function GetUserDefaultLCID Lib "kernel32" () As Long
  19.  
  20.  
  21. Public Function ConvertDecimalDelimiter(sNumber As String, sDecimalDelimiter As String) As String
  22.     Dim sInteger As String
  23.     Dim sFractional As String
  24.     Dim nPosition As Integer
  25.     
  26.     nPosition = InStr(sNumber, ".")
  27.     If nPosition <> 0 Then
  28.         sInteger = Left(sNumber, nPosition - 1)
  29.         sFractional = Right(sNumber, Len(sNumber) - nPosition)
  30.         ConvertDecimalDelimiter = sInteger & sDecimalDelimiter & sFractional
  31.     Else
  32.         ConvertDecimalDelimiter = sNumber
  33.     End If
  34. End Function
  35.