devxlogo

Tip Bank

Drag Files Into Project Window

Creating a new project in VB6 (and earlier versions) has always been a pain when you have a large library of modules to add in. You can do it a

FormatDateTimeEx – Extended formatting for date and time values

Enum DateTimeFormat dtGeneralDate dtLongDate dtMediumDate dtShortDate dtLongTime dtMediumTime dtShortTime dtCustomEnd Enum’ Enhanced VB FormatDateTime functionFunction FormatDateTimeEx(newDate, Optional ByVal dtFormat As DateTimeFormat = _ dtGeneralDate, Optional FirstDayOfWeek As VbDayOfWeek = vbSunday,

GetBatteryTime – Get the life time of a notebook’s battery

Private Declare Function GetSystemPowerStatus Lib “kernel32” _ (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As LongPrivate Type SYSTEM_POWER_STATUS ACLineStatus As Byte BatteryFlag As Byte BatteryLifePercent As Byte Reserved1 As Byte BatteryLifeTime As Long BatteryFullLifeTime