|
|
|
Name & Date Posted |
Tip |
||||
The Guru May 03, 2001 |
Microsoft Wheel Mouse
In The VB IDE
|
||||
|
|||||
The Guru March 20, 2001 Posted from searchVB.com |
Encryption made simple
|
||||
The Guru Nov 19, 2000 Posted Microsoft |
Visual Basic IDE Short CutsHere Is a complete listing of key shortcuts for the Visual Basic IDE. The list is long, so Click here to view it. |
||||
The Guru Nov 11, 2000 Posted Microsoft |
COM+ TipsCOM+ and Windows 2000: Ten Tips and Tricks for Maximizing COM+ Performance.
|
||||
|
|||||
The Guru Oct 27, 2000 Posted from VB2theMax |
Silent installVB6 Deployment and Packaging Wizard's resulting setup.exe has a command line switch that allows for a silent install. This feature is virtually undocumented except in the source code for Setup1.exe. The default path for the project file of Setup1 is: C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Setup1\Setup1.vbp To do a silent install, the following syntax is required: setup.exe /s c:\anylogfilename.log The silent install is only interupted (that I could see) when the install encounters the "Setup is attempting to copy a file that is older than the one currently..." dialog. This interruption doesn't occur if the setup contains the latest versions of the files being installed.
|
||||
The Guru Oct 27, 2000 Posted from VB2theMax |
Access an ADO Recordset FasterThe ADO Recorset object exposes a hidden, undocumented member: the Collect property. This property is functionally similar to the Field's Value property, but it's faster because it doesn't need a reference (explicit or implicit) to the Field object. You can use this property by passing a numeric index or a field's name, as in: Dim rs
As New ADODB.Recordset rs.Open "authors", "DSN=pubs" Under ADO 2.5, the Collect property appears to be about 30% faster than the standard way to refer to a field's value.
|
||||
The Guru Oct 17, 2000 Posted from searchVB.com |
Make Your VB App WaitThe tip involves making a VB app wait for the completion of some other process outside VB. This code is long, so Click Here to go view the code.
|
||||
|
|||||
The Guru Oct 07, 2000 Posted from searchVB.com |
SQL-Assignment TroublesHere is another solution to assigning strings in SQL statements this code is long, so Click Here to go view the code
|
||||
Chintamani Bivalkar Oct 07, 2000 |
Update To Prevent Multiple VB application instancesChintamani writes: Hi guru , I am a primary grade student of VB. I always visit your site for tips & code. In one of your tips..you had given a code for "Prevent Multiple VB application instances" (june23) I had gone thru some books & felt that similar thing can be achieved by following code The Guru's Notes:Thanks for the update Chintamani, but I would just like to add the following "Gotcha" notes. Since a computer running Windows NT can support multiple desktops, if you use a component designed to work with distributed COM, it can result in the following scenario:
There are now two instances of the component running on the same NT computer, in different desktops. This scenario is not a problem unless the author of the component has placed a test for App.PrevInstance in the startup code for the component to prevent multiple copies of the component from running on the same computer. In this case, the remote component creation will fail. Also, although App.PrevInstance is supported in VB for CE, it does not work properly and can cause some major debugging head aches. If your application does not fall into either of these two categories, then your code will work nicely.
|
||||
The Guru July12, 2000 Posted from Element K Journals |
Avoid Variable Type Comparison Glitches In TextboxesWhen you retrieve a numeric value from a textbox, you may want to compare it to some other preset value. For example, consider the following code: |
||||
The Guru July 12, 2000 |
VARIABLE DECLARATIONMost high level programming languages force the developer to explicitly declare a variable before using it. Visual Basic is a notable exception. In fact, by default, VB's installation leaves the Visual Basic environment in a state where variable declaration is not required. |
||||
The Guru June 29, 2000 Posted from Element K Journals |
How to build a data-shaped SQL clause for VBSince it's introduction in ADO 2.0, data shaping has remained largely on the fringes of
Visual Basic arcanum. Relegated to the back pages of musty manuals, you may have
overlooked this useful aspect of ADO. If you're not familiar with data-shaping, in essence, it lets you create recordsets within recordsets--or parent/child relationships--all with a
single ADO object. This means no messy joins, no complicated filtering, and no need for spaghetti-code in presentation logic. Data shaping reduces the amount of traffic crossing a network, provides more flexibility when using aggregate functions, and reduces overhead when interfacing with leading-edge tools like XML. |
||||
|
|||||
The Guru June 25, 2000 |
See if a String is BlankThere are several ways to decide whether a string is blank:Dim txt As String Dim blank As String blank = "" : If Len(txt) = 0 Then ... If txt = vbNullString Then ... If txt = "" Then ... If txt = blank Then ...The test Len(txt) = 0 is roughly 20 percent faster than the others. |
||||
The Guru June 23, 2000 Posted from Element K Journals |
Prevent Multiple VB application instancesThis code is long, so Click Here to go view the code
|
||||
The Guru June 19, 2000 Posted from Microsoft Site |
Don't lose focus in UserControlsTypically, to determine when a UserControl
gains and loses focus, you might think to use the standard
GotFocus and LostFocus events. However, in UserControls these
two events aren't always reliable. There are situations where
a control will lose the focus without firing the LostFocus
event (for example, when Alt+Tabbing to another application),
and also get the focus without firing the GotFocus event. As a
result, your best bet for monitoring the focus status is to
insert code in the UserControl's EnterFocus and ExitFocus
events. |
||||
The Guru June 15, 2000 |
Cint() TipThe CInt() function rounds to the nearest integer value. In other words, CInt(2.4) returns 2, and CInt(2.6) returns 3. |
||||
The Guru June 14, 2000 Posted from Element K Journals |
Add pop-up menu support to the Rich Textbox controlWhile Visual Basic provides an easy way to create shortcut menus, some controls |
||||
The Guru June 12, 2000 Posted from Microsoft Site |
Uncover internal DLL functions with Dependency WalkerWhile the Windows API functions are fairly well documented, you may come across other DLL files that remain a mystery. For example, suppose you want to incorporate the MIDAS digital audio player into your application. The help files that come with this free DLL list all the important external function names. However, because the DLL doesn't support Visual Basic, you must hook into the DLL with API declarations. The internal names supported in this library aren't in the help files. To unravel this mystery, you can use the Dependency Walker, a handy utility that comes with Visual Studio (appears as Depends on the Windows program menu). Simply point the utility to the DLL in question, and it will list all the internal file names that you'll need to refer to in your API declarations. For example, in the MIDAS DLL, you use a function called MIDASplayModule to play a sound module. However, the internal name for the function is _MIDASplayModule@8. As a result, you must declare the function in Visual Basic like so Declare Function MIDASplayModule Lib "midas11.dll" Alias _ "_MIDASplayModule@8" (ByVal module As Long, ByVal loopSong _ As Boolean) As Long |
||||
|
|||||
Mike Coleman via
Element K Journals June 07, 2000 |
Move files to the Recycle Bin with VB and Windows APIThis code is long, so Click Here to go view the code
|
||||
The Guru June 05, 2000 Posted from Microsoft Site |
Win API ViewerWhen you use the Windows API, you should never need to write your own Declare statement. The API Text Viewer utility loads in a text file (WIN31API.TXT for 16-bit, and WIN32API.TXT for 32-bit) and lets you copy declares, global constants, and user-defined types. You can also convert the text file to an Access database for faster searching. Handy, eh? |
||||
The Guru June 05, 2000 Posted from Microsoft Site |
Creating multiple controls of the same typeYou can [Ctrl] your Visual Basic control selection. |
||||
|
|||||
The Guru June 04, 2000 Posted from Microsoft Windows2000 Site |
Move Portions of Your Start Menu in W2KYou can make shortcuts on the taskbar that bring up frequently used items from your Start menu. This is also helpful if you want easy access to Start menu items on a different part of the screen. |
||||
The Guru June 04, 2000 |
Using Microsoft's HTML Parser to Get Data from Web SitesThis article describes how to gather information from the Web and distribute it on other Web pages or databases with the help of the reusable parser component of Internet Explorer. (7 printed pages) |
||||
The Guru. May 30, 2000 Posted From Microsoft Site |
Spell check RTF documents in Visual BasicTo spell check RTF documents, you could resort to embedding Word into your application. However, if you plan to use the WebBrowser control, there's no need to program Word for spell checking. That's because the WebBrowser control provides this functionality for you. To access it, you use the WebBrowser control's ExecWB() method with the OLECMDID_SPELL flag. |
First Name | |
Last Name | |
Enter your VB Tip in the space provided below.
Send mail to WebMaster with
questions or comments about this web site.
|