|
Mathematical User-Defined Functions
|
Total Hit (2696) |
Introduction
Mathematical UDFs
Factorial
PercentFrom
PercentValue
Degree
Allocation
Combination
--------------------------------------------------------------------------------
Introduction
I would like to write the series of articles about useful User-Defined Functions gro
....Read More |
Rating
|
|
|
Date and Time User-Defined Functions
|
Total Hit (3954) |
Introduction
Date and Time UDFs
DatePart
TimePart
GetWorkingDays
AddWorkingDays
FirstMonthDay
LastMonthDay
--------------------------------------------------------------------------------
Introduction
I would like to write the series of articles about useful User-Defined Fu
....Read More |
Rating
|
|
|
String User-Defined Functions
|
Total Hit (2703) |
Introduction
String UDFs
StrIns
StrDel
StrSeparate
StrCHARINDEX
StrREPLACE
StrREVERSE
«B»Introduction«/B»
I would like to write the series of articles about useful User-Defined Functions grouped by the following categories:
==>Date and Time User-Defined Functions
==>Mat
....Read More |
Rating
|
|
|
Some useful UDF for SQL Server 2000
|
Total Hit (3048) |
Introduction
UDF examples
Database creation date
Date the object was created
Get date part of datetime value
Get time part of datetime value
Get the number of working days between two dates
«B»Introduction«/B»
SQL Server 2000 supports User-Defined Functions (UDFs) - one or more Tr
....Read More |
Rating
|
|
|
mark the stored procedure to automatic execution
|
Total Hit (2846) |
You can use the sp_procoption system stored procedure to mark the stored procedure to automatic execution when the SQL Server will start.
Note. Only objects in the master database owned by dbo can have the startup setting changed and this option is restricted to objects that have no parameters.
....Read More |
Rating
|
|
|
|
|
|
|
(Screen Saver) diffuseGravity
|
Total Hit (2941) |
This screen saver simulates 4 particles with gravity, and draws color changing lines between them. Gravity, refresh, and number of color bars are fully configurable, and you end up with some VERY neat pictures. I used the screen saver template at vbhelper.com as a starting point.
....Read More |
Rating
|
|
|
Singleton Design Patten in VB.NET
|
Total Hit (2888) |
The Singleton pattern ensures that only one instance of a class is created. All objects that use an instance of that class use the same instance. This is the most common design pattern, and easy to implement, but very powerful when used properly.
|
Rating
|
|
|
Moving a Window Without a Titlebar
|
Total Hit (3509) |
«Code LangId=1»'Place this code in the declarations section of your form:
Option Explicit
Declare Function ReleaseCapture Lib "user32" () As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As _
Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Lo
....Read More |
Rating
|
|
|
Centering a Window with a Taskbar Visual
|
Total Hit (3185) |
«Code LangId=1»Option Explicit
Private Const SPI_GETWORKAREA = 48
Private Declare Function SystemParametersInfo& Lib "User32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As _
Long, lpvParam As Any, ByVal fuWinIni As Long)
Private Type RECT
Left As Long
Top As Long
....Read More |
Rating
|
|
|
Changing Display Settings on the Fly
|
Total Hit (3952) |
«Code LangId=1»'Place this code in a Module:
'Place this code in a Module:
Option Explicit
Private Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (lpString1 As _
Any, lpString2 As Any) As Long
Const CCHDEVICENAME = 32
Const CCHFORMNAME = 32
Private Type DEVMODE
dmDevi
....Read More |
Rating
|
|
|
Flashing Form Caption
|
Total Hit (3090) |
«Code LangId=1»'Ever wanted to get the users attention without one of those annoying BEEPs, or just have a 'little fun? Here is a good way to do it. Flash the caption of your Form. That should get 'their attention!
'Place this code into a Module:
Option Explicit
Declare Function FlashWindow L
....Read More |
Rating
|
|
|
Keeping a Window On Top
|
Total Hit (3085) |
«Code LangId=1»'Place this into your Module:
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
Global Const SWP_NOMOVE = 2
Global Const SWP_NO
....Read More |
Rating
|
|
|
LOG Files
|
Total Hit (2770) |
«Code LangId=1»'Just place this in a Module and you can call it from anywhere in your program!
Sub SetLog(Message As String)
'This Sub writes to a LOG file.
Dim theFile As String, theMessage As String
theFile = App.Path & "\PRGMLOG.TXT"
theMessage = Message & vbCrLf
Open theFile For Append A
....Read More |
Rating
|
|
|
Right Click PopUp Menu
|
Total Hit (1585) |
«Code LangId=1»'First, create a menu using menueditor. Add all of your menu items as if you were just making
'a regular menu. Now set the VISIBLE property of the main menu item to false (see below, set
'the MNUEDIT item's VISIBLE to false). Like this:
'mnuEdit
'---mnuUndo
'---mnuRedo
'---m
....Read More |
Rating
|
|
|
|
|
String operation in vb.net
|
Total Hit (1948) |
The following example uses some of the methods discussed in the Basic String Operations topics to construct a class that performs string manipulations in a manner that might be found in a real-world application. The MailToData class stores the name and address of an individual in separate properties
....Read More |
Rating
|
|
|
|
|
|
|
|
|
|
|