I can't tell you for sure but I have seen D40 sports bars on Hilux's.
Try downloading the specs sheets (there is a thread here with the specs for 07-10 D40's) from each company and compare the sizes of the tubs, if the difference is only a few millimeters then it will be possible but stretching any more than that and you might put undue stress on the canopy.
Failing that ring a few canopy makers and ask them how their sizes match, you don't have to buy from them just because you ask a question.
Welcome to the forums as well.