devxlogo

The Latest

CConsole – A class for creating console applications

‘ CCONSOLE Class” Creates a console window and writes to it’ Example:’ Dim cons As New CConsole’ cons.WriteString “Hello World”Private Declare Function AllocConsole Lib “kernel32” () As LongPrivate Declare Function

ShowIcon – Extract an icon from a file and show it

Private Declare Function ExtractIcon Lib “shell32.dll” Alias “ExtractIconA” _ (ByVal hInst As Long, ByVal lpszExeFileName As String, _ ByVal nIconIndex As Long) As LongPrivate Declare Function DrawIcon Lib “user32” (ByVal

Display the Windows Shortcut Wizard

You can programmatically start the Shortcut Wizard from your code, to give the end user the capability to create a new shortcut: Shell “rundll32.exe AppWiz.Cpl, NewLinkHere ” & App.Path, 1

The Difference between ‘Count’ and ‘Count(*)’

‘Count’: Counts the number of non-null values.‘Count(*)’: Counts the number of rows in the table, including null values and duplicates. Related Posts Handle WPF Application Exceptions all in one PlaceIs

Using ROWNUM To Retrieve

It is often necessary to get a list of values from multiple rows. Generally, this is done using the cursor, which tends to make the task more complicated.I tried to

Execute an Operating System Command From Within SQL Server

The Related Posts US tech giants buy out AI startupsRepeated Service Disruptions for Google Compute EngineMicrosoft Buys Italian IoT Vendor SolairChina, Germany discuss green transition outcomesContainer Wars: Docker vs. Rkt

Testing New Operations For Null

Beginning Java programmers sometimes test the results of a newoperation for a null. The code for this test looks like this: Integer i = new Integer (400); if (i ==

Threads and ThreadGroups

Every Java thread is a member of a Related Posts Display of Bit Field on UISUSE Releases OpenStack Cloud 5Nasa reviews Starliner’s return readiness progressBroadband Forum brings Fiber closer to

Remove vbs Attachments in Outlook

Home users of Outlook must create a new form and make it the default form for their Inbox. This code removes any attachments with vbs in the filename on incoming

Pass Information from a Servlet to a JSP

You can use this kind of bean to pass information from a servlet to a JSP page through a session variable. For Instance: DataBean myobj = new dataBean();myobj.setData( Related Posts

A Simple Way to Install a Special Font

This tip loads and removes any font. Loaded fonts can be listed by the common dialog control but not in the Windows Fonts folder. The advantage is it lets you

List That Requires Items of the Same Class

The benefits here are that the class can be set at runtime. You don’t need to write a new list for every Class that needs listing. public class HomogenousList extends

Automatically Select the Radio Button

Make the width of the radio option button a lot wider than the caption text it holds. Next, position a textbox between the end of the caption and the actual

Limitations of reinterpret_cast

A reader tried to cast a nonstatic member function of a certain class to void*, as in the following example: class A{public: void func();};void *pmf = reinterpret_cast < void *>

Conditional Compilation

In many cross-platform applications, you have code sections that — depending on the target OS and compiler — need to be either concealed or compiled. For example, code that uses

Pointers to const Member Functions

The const-ness of a member function is an integral part of its type. The following class defines two member functions, f(), g(), which have the same return type and parameter

A VBScript Hit Counter

I created this Hit Counter to keep track of the use of our Company Intranet. On the SQL Server (in our case MSSQL 7), you will need to have a

Dynamic Constants

In applications that cannot be recompiled (e.g., apps that are installed on a customer’s machine as binaries only), values of constants may change occasionally. For example, exchange rates and the

Leading Blanks in Input

By default, std::cin ignores leading whitespaces when it reads input from the keyboard or file. For example, if you execute the following statement: char name[10];cin>>name; and the user enters the

Code Inserter ToolWindow Addin

If you ever wanted to enhance the VB6 IDE without writing your own add-in program, or doing any programming, then this addin is for you. It creates a ToolWindow with

IsFileInCache – Check whether a file is in the Internet cache

Private Declare Function GetUrlCacheEntryInfo Lib “wininet.dll” Alias _ “GetUrlCacheEntryInfoA” (ByVal sUrlName As String, lpCacheEntryInfo As Any, _ lpdwCacheEntryInfoBufferSize As Long) As Long’ Check whether the file identified by the URL

IsConnectedToInternet – Check whether there is an Internet connection

Private Declare Function InternetGetConnectedState Lib “wininet.dll” (ByRef _ lpSFlags As Long, ByVal dwReserved As Long) As LongConst INTERNET_CONNECTION_MODEM = 1Const INTERNET_CONNECTION_LAN = 2Const INTERNET_CONNECTION_PROXY = 4Const INTERNET_CONNECTION_MODEM_BUSY = 8′ return

Send All Your System Messages To File

Often, while developing a system you want to debug it using System.out.println or System.err.println. When development is over you would like to send all those messages to file. The easiest