-
WSDylan Morley
AskWoody LoungerThere are a couple of help packages that you can use to create files…
‘Microsoft Help Workshop’
This is the help package used to create the older ‘windows style’ help files. You generate the files by linking RTF documents together. Painful.‘Microsoft HTML Help Workshop’
This package generates help files in the ‘browser’ style format. You can design your help pages in any HTML editor, save to .HTM format and link the pages together in HTML workshop. Most of Microsofts help files are now in this format – I find this much easier to use and you can create quite advanced help files incorporating Java scripts etc. HTML workshop is a free download from Microsoft if you do not have it.The HelpContextID and WhatsThisHelpID properties allow you to link your VB application together with your help file. So, when a user presses F1 on a particular section of your system, the correct help page will be displayed. Unfortunately, there’s no standard wizard to create your help files with VB.
-
WSDylan Morley
AskWoody LoungerThe only way you can affect the menu bar or menu objects is by sub-classing the items and creating custom paint routines in your new window procedure.
Can be complicated, but there’s some excellent source at http://www.vbaccelerator.com[/url%5D
Check out either the coolbar/rebar or popmenu controls, both of which demonstrate these techniques with example projects.
-
WSDylan Morley
AskWoody LoungerI suppose the biggest module is about 100KB & that’s been broken down into specific modular routines already (it’s a particularly complicated application now!). Whilst this isn’t much in itself, I worry about the client PC’s who don’t have as much RAM and pretty much push their PCs with multiple instances of Word, Access, Excel etc.
This isn’t a serious problem, it’s not something thats causing the app to crash – I’m just not sure on how the modules are handled in Memory compared to say class objects which have obvious initialise/terminate events (Maybe I’ll create a few more objects if possible and get some of the code out of standard modules).
Thanks for the answers – always good advice on this site.
-
WSDylan Morley
AskWoody LoungerGary,
Yes, I think this is what I’m going to do. I was just hoping to find some articles to give a bit more info on what an ‘acceptable’ size module is and how they are handled during code execution – searched MSDN and found exactly nothing…!
Thanks for your answer.
Dylan
-
WSDylan Morley
AskWoody LoungerJust found the ‘SentOnBehalfOfName’ property!! Thanks anyway
-
WSDylan Morley
AskWoody LoungerKevin,
Pure API for this one, there’s quite a good article on MSDN that should help you…
http://msdn.microsoft.com/library/default….regapi_9zoz.asp[/url]
You’ll need to use the GetNamedSecurityInfo or GetSecurityInfo APIs to return the security descriptor associated with the key.
Thanks
Edited by Rory to make link live.
-
WSDylan Morley
AskWoody LoungerI opened a temporary module in the database and noticed that the..
Option Compare Database
Option Explicit…statements were duplicated – Removed & it runs fine. Thanks, didn’t know this could affect queries…
-
WSDylan Morley
AskWoody LoungerOur network can be flaky at times & we are in the middle of migrating from 3xNovell 5.1 to IP4700 so this could well explain the hiccups.
I think I’ll give the dbForceOSFlush and dbRefreshCache flags a go, they sound like they could solve my issues.
Thanks again for your help
-
WSDylan Morley
AskWoody LoungerThat sounds good & makes sense, I didn’t realise it could occur like that! I’m creating global objects when the app is loaded, I use a single routine to create the objects…
Private Function OpenDatabase(DB_Database As Database, sDatabaseName As String) As Boolean
On Error GoTo MainOpenError
‘ // Create workspace if one does not exist
If (g_WSControl Is Nothing) Then
Set g_WSControl = DBEngine.Workspaces(0)
End If‘ // Set the database
Set DB_Database = g_WSControl.OpenDatabase(DataLocations.NetworkDatabasePathName & “” & sDatabaseName, False, False)
OpenDatabase = TrueExit Function
MainOpenError:
If Len(sDatabaseName) = 0 Then
MsgBox “Error opening database – no database name supplied. Please check INI File”, vbInformation, “Error Occurred”
End
ElseIf (Err.Number = 3045) And (sDatabaseName = DataLocations.NetworkDatabaseName) Then
MsgBox “The MACC database is being compacted and is not currently available.” & Chr$(13) & “Please try again in 5 minutes”, vbExclamation, “Database compacting”
End
Else
MsgBox “Error occurred opening database(” & sDatabaseName & “)” & Chr$(13) & Err.Description, vbCritical, “Could not access ” & sDatabaseName
End IfEnd Function
So, the g_WSControl is just the [DEFAULT_WORKSPACE] for the client PC.
Oh, and just to make things more interesting – this isn’t a persistent error. It only seems to happen every now & then, but it’s too serious an error for me to roll the app out!
Thanks again
-
WSDylan Morley
AskWoody LoungerCharlotte,
This is the thing that’s driving me crazy. The search screen just builds some SQL from user input and opens a recordset over the ‘Order_Details’ table. The results of the SQL are then loaded into the results pane.
Record 5029 appeared in the results pane so it has been returned from the SQL run over the database, indicating to me that the record has been saved. But, when I went into Access and looked at the table, the record was not there! How is it possible for the SQL to return a record in the app that’s not there in table view? If the record has not been saved, surely the SQL should not pick it up?
I used a single transaction to control the update routine (BeginTrans, Update the recordset, CommitTrans, nothing fancy). Could the workspace have this effect?
The WS object is released when the app is closed, this is the only thing I can think of that is being destroyed at this point, perhaps explaining why the data vanishes between app loads. Have you ever encountered any strange behaviour when using Workspaces?
Thanks
-
WSDylan Morley
AskWoody LoungerMany Thanks
-
WSDylan Morley
AskWoody Loungerhttp://www.planet-source-code.com [/url] has a forum where you may explain your project requirements and developers then bid against it.
There are some good developers associated with the site and bids can be very competitive…
-
WSDylan Morley
AskWoody LoungerCharlotte,
Yes, we’re using a Novell server – currently in the process of converting everything over to NT. Thanks for an excellent answer though, the article is very helpful.
Cheers
Dylan -
WSDylan Morley
AskWoody LoungerSam,
Yeah that does it – my function now looks like…
Private Function ValidateWindowStyle() As Boolean
Dim lResult As Long
lResult = GetWindowLong(m_varhWnd, GWL_STYLE)
If (lResult And WS_THICKFRAME) Then
ValidateWindowStyle = True
End IfEnd Function
Thanks for your help!
-
WSDylan Morley
AskWoody LoungerI had a similar problem in a project that I am developing – I needed to switch to a different printer before opening Crystal reports (which picks up the default printer and doesn’t let you change before printing!).
Couple of functions here might help…
‘ // To notify applications the printer has changed
Private Const HWND_BROADCAST As Long = &HFFFF
Private Const WM_WININICHANGE As Long = &H1APrivate Declare Function GetProfileString Lib “kernel32” _
Alias “GetProfileStringA” _
(ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpDefault As String, _
ByVal lpReturnedString As String, _
ByVal nSize As Long) As LongPrivate Declare Function WriteProfileString Lib “kernel32” _
Alias “WriteProfileStringA” _
(ByVal lpszSection As String, _
ByVal lpszKeyName As String, _
ByVal lpszString As String) As LongPrivate Declare Function SendMessage Lib “user32” _
Alias “SendMessageA” _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lparam As Any) As Long‘ // ******************************************************************************
‘ // FUNCTION
‘ // SubDefaultPrinter(ByVal PrinterName As String,
‘ // ByVal DriverName As String,
‘ // ByVal PrinterPort As String)
‘ //
‘ // PARAMETERS
‘ // PrinterName – The name of the object printer
‘ // Drivername – The name of the driver for the objet printer
‘ // PrinterPort – The name of the port to action the printer on
‘
‘ // RETURN VALUE
‘ // None
‘ //
‘ // COMPONENTS USED
‘ // Windows Registry
‘ //
‘ // NOTES
‘ // You can change the ‘default’ printer programatically by using the Win32-API. Used
‘ // to switch from a default printer to ‘Zetafax’ without any user interction
‘ // ******************************************************************************Private Sub SetDefaultPrinter(ByVal PrinterName As String, _
ByVal DriverName As String, _
ByVal PrinterPort As String)
Dim DeviceLine As String‘rebuild a valid device line string
DeviceLine = PrinterName & “,” & DriverName & “,” & PrinterPort‘Store the new printer information in the
‘[WINDOWS] section of the WIN.INI file for
‘the DEVICE= item
Call WriteProfileString(“windows”, “Device”, DeviceLine)‘Cause all applications to reload the INI file
Call SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, ByVal “windows”)End Sub
‘ // ******************************************************************************
‘ // FUNCTION
‘ // GetDefaultPrinter()
‘ //
‘ // PARAMETERS
‘ // None
‘
‘ // RETURN VALUE
‘ // String representation of the current default printer
‘ //
‘ // COMPONENTS USED
‘ // Windows Registry
‘ //
‘ // NOTES
‘ // Returns the value held in the registry that represents the users default printer
‘ // ******************************************************************************Public Function GetDefaultPrinter() As String
Dim sReturnString As String
‘ // Allocate string space
sReturnString = Space(1024)‘ // Get the currently active (default) printer held in the registry
GetDefaultPrinter = Left(sReturnString, GetProfileString(“windows”, “Device”, “”, sReturnString, Len(sReturnString)))‘ // Cause all applications to reload the INI file
Call SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, ByVal “windows”)End Function
Test out the ‘GetDefaultPrinter’ function which should return the print string that is stashed in the registry
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Discover the Best AI Tools for Everything
by
Alex5723
9 hours, 10 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
3 hours, 56 minutes ago -
Rufus is available from the MSFT Store
by
PL1
20 hours, 8 minutes ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
22 hours, 17 minutes ago -
KB5061768 update for Intel vPro processor
by
drmark
4 hours, 42 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
53 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
18 hours, 2 minutes ago -
Office gets current release
by
Susan Bradley
20 hours, 40 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
2 days, 10 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
1 day, 19 hours ago -
Stop the OneDrive defaults
by
CWBillow
2 days, 11 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
2 days, 21 hours ago -
X Suspends Encrypted DMs
by
Alex5723
2 days, 23 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
2 days, 23 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
3 days ago -
OpenAI model sabotages shutdown code
by
Cybertooth
3 days, 1 hour ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
2 days, 13 hours ago -
Enabling Secureboot
by
ITguy
2 days, 20 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
3 days, 9 hours ago -
No more rounded corners??
by
CWBillow
3 days, 4 hours ago -
Android 15 and IPV6
by
Win7and10
2 days, 18 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
3 days, 21 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
4 days ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
3 days, 18 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
4 days, 7 hours ago -
May preview updates
by
Susan Bradley
3 days, 18 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 days, 10 hours ago -
Just got this pop-up page while browsing
by
Alex5723
3 days, 23 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
3 days, 20 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
2 days, 22 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.