devxlogo

Tip Bank

Outlook Meeting Requests

Question: Is there a way to turn off meeting requests for a user? Is there a way to turn off the “feature” that sets a tentative meeting when you open

Escaped Characters

Question: When defining a string, is there a way to include a carriage return in the text? Answer: Yes. A carriage return is represented by the special escapedcharacter . However,

Synchronized Method Overhead

Question: I am interested in keeping my code running as fast as possible. Is there a cost associated with making my methods synchronized, and if so, how significant a cost?

Use “.equals” in Place of “==”

Java provides two methods to test for equality: the == Operator and the .equals method. The .equals is implemented by all objects. Most programmers tend to use == for equality,

Check whether the user is working off-line

Internet Explorer offers the possibility to simulate an Internet connection with the off-line mode. If you want to know if off-line mode is on or off you can use InternetQueryOption

Setting the off-line mode

You can programmatically set the Internet Explorer off-line mode with the InternetSetOption API, as this code snippet demonstrates: Const INTERNET_OPTION_CONNECTED_STATE = 50Const INTERNET_STATE_CONNECTED = 1Const INTERNET_STATE_DISCONNECTED = 2Const INTERNET_STATE_DISCONNECTED_BY_USER =

Delete a User in NT

Question: How do I delete a user in NT with the API’s? Answer: The code below shows how to delete a user (if the server name is blank, it attempts

EnumRASEntries – Enumerate all available RAS phone-book entries

Const ERROR_SUCCESS = 0&Const ERROR_BUFFER_TOO_SMALL = 603&Const RAS_MaxEntryName = 256Private Type RASENTRYNAME dwSize As Long szEntryName(RAS_MaxEntryName) As ByteEnd TypePrivate Declare Function RasEnumEntries Lib “RasApi32.DLL” Alias _ “RasEnumEntriesA” (ByVal reserved As