Hello everyone..How do i create a user manual or the instructions of the software in vb6? Is it possible to pattern the manual with the manual of mysql or the like..

Another question. How do i populate my treeview in vb6 from a mysql database??

Any help would be very much appreciated..Thank you!!

Dani AI

Generated

Short practical answer for with pointers to the replies from and .

For the user manual

  • Two common, easy-to-maintain options: an external compiled help (CHM or PDF/HTML) and an in-app help viewer. CHM gives you context-sensitive help: author HTML topics, compile with HTML Help Workshop, set your VB6 project HelpFile and per-form/control HelpContextID so F1 opens the right topic. If you prefer simpler workflows, write topics in Word or Markdown and produce a PDF or a small set of HTML pages that you display in a WebBrowser control inside your app. Use a short Quick Start plus task-based HOWTOs and a troubleshooting section — style the doc after a good reference, but do not copy another product’s manual verbatim.

Populating TreeView from MySQL (robust approach)

  • Let your query return: id, parent_id, text (and an optional sort column).
  • Load the result into memory, then build nodes in two phases: add roots first (parent_id NULL/0), then attach children by looking up their parent node. Use a Dictionary to map record id -> Node so lookups are O(1). Repeat passes until no pending rows remain; any leftover rows are orphans you can log for debugging.
  • Example pattern (VB6, needs Microsoft Scripting Runtime):
' load rows into a pending collection, then:
' add roots: create TreeView nodes for parent_id = 0 or ""
' keep a Dictionary id->Node. Loop pending and attach items whose parent exists.
' repeat until no change; remaining pending items are orphans.

Quick tips and pitfalls

  • As noted, use ADO with the MySQL ODBC/Connector your system supports; on modern Windows remember VB6 is 32-bit so install the 32-bit ODBC driver. For very large trees, populate children on demand in the NodeExpand event (lazy load). Always check for encoding issues, invalid parent ids, and performance by loading data into arrays/dictionaries before touching the UI.

Recommended Answers

All 2 Replies

Part 1 - VB5 or 6 to MySQL
Using ODBC 3.51 connector

Set DB = New ADODB.Connection
Set RS = New ADODB.Recordset
DB.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
                      "SERVER=" & sHostName & ";" & _
                      "DATABASE=" & sDBName & ";" & _
                      "UID=" & sUID & ";PWD=" & sPWD & "; OPTION=3"
DB.Open
    
    Set RS = DB.Execute("SHOW TABLES", ret)
    Set cTable = New Collection
    While RS.EOF = False

'get the data from the database columns 
'(not fields because "real" databases have 
'columns of data, not fields of entries) :) according to some professor in SQL

'-- not applicable code here
'--             vTable = RS.Fields(0)
'--            cTable.Add vTable
'-- not applicable code here

        RS.MoveNext
    Wend
    DoEvents
    
'// do your stuff here...

Set RS = Nothing
DB.Close

'// as usual...

!!!REPLACE THE "SHOW TABLES" WITH YOUR OWN SQL QUERY!!!


Part 2- TreeView

See helpfile in VB for info on...

"Add Method (Nodes Collection)"

It has the example at the end of the listing.

Dim nodX As Node	' Declare the object variable.
Dim I as Integer	' Declare a counter variable.
For I = 1 to 4
	Set nodX = TreeView1.Nodes.Add(,,,"Node " & Cstr(i))
	' Use the reference to set other properties, such as Enabled.
	nodX.Enabled = True
	' Set image property to image 3 in an associated ImageList.
	nodX.ExpandedImage = 3
Next I

follow the link for your question

link

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.