Gantt Charts: Part 1 with Aleksander Wojtasz
Imagine being able to drag-and-drop schedule items directly on a Gantt chart interface—all built entirely within Microsoft Access without any third-party controls.
In this Access Europe user group presentation, Aleksander Wojtasz demonstrates how to create an interactive Gantt chart scheduling system using pure Access and Windows GDI (Graphics Device Interface) API calls. The solution enables real-time drag-and-drop functionality, dynamic resizing, and interactive visual feedback, all while maintaining performance through efficient memory management and drawing techniques.
This presentation offers Access developers a powerful new approach to building sophisticated scheduling interfaces that rival commercial alternatives, complete with downloadable example databases and detailed technical explanations.
Core Technologies
GDI Library Basics
- Windows Graphics Device Interface (GDI32.DLL)
- Present since early Windows versions
- Handles low-level drawing operations
- No additional components required
Key Components
- Device Context (drawing canvas)
- Device Independent Bitmap (memory bitmap)
- Memory arrays for coordinate tracking
- Event handlers for mouse interaction
Implementation Overview
Drawing Operations
- Lines with customizable styles and colors
- Rectangles with optional rounded corners
- Text with font control
- Image handling and stretching
- Background grid patterns
Mouse Interaction
- Real-time drag and drop
- Edge detection for resizing
- Coordinate translation
- Event handling for mouse up/down/move
Data Management
- In-memory arrays for performance
- Updates only on completed actions
- Layout tracking for hit detection
- Efficient redrawing techniques
Technical Architecture
Canvas Class Module
- Handles all drawing operations
- Manages GDI resources
- Coordinates mouse interaction
- Maintains layout information
Supporting Components
- Job tracking tables
- Resource management
- Status handling
- Context menu integration
Performance Considerations
Memory Management
- Efficient array usage
- Coordinate caching
- Minimal database updates
- Smart redraw logic
Security Settings
- Requires macro security consideration
- Options for trusted locations
- Certificate signing possibilities
- Performance impact awareness
Practical Applications
Sample Implementation
- Car repair workshop scheduling
- Technician assignment
- Job status tracking
- Interactive timeline management
Real-World Usage
- Home renovation scheduling
- Resource allocation
- Project timeline visualization
- Status tracking
Conclusion
Aleksander's presentation demonstrates a sophisticated yet maintainable approach to creating interactive Gantt charts in Access without external dependencies. The solution combines Windows API calls with efficient memory management to deliver smooth performance while maintaining full database integration. The enthusiastic response from attendees and requests for follow-up presentations underscore the value of this innovative approach.
Recording
The full recording is available on YouTube:
Join Live!
Want to get even more out of these presentations? Join the live Access User Group events! The next upcoming events are listed on the AUG Event Calendar.
Attending live gives you the opportunity to:
- Interact directly with presenters during Q&A sessions
- Network with other Access developers
- Share your own experiences and challenges
- Get immediate answers to your specific questions
- Participate in group discussions
With multiple user groups across different time zones (and languages!), you're sure to find a meeting time that works for your schedule.
Acknowledgements
- Base cover image generated by FLUX-schnell
- Initial draft generated by Claude-3.5-Sonnet