The effect of the molecular structures of dicyanomethylene compounds on their supramolecular assembly, photophysical and electrochemical properties.