I have dc7800 Small form factor , i have Quad Core q9400 , and 4gb of ram ddr2 , i want to add a GT 1030 but i dont know will 240W Power Supply be enough for it + q9400. Anyone had any ideas ?
GT1030 is very low power, you should be ok there.
What you DO need is a low profile or low profile ready GT1030 to fit your case.
Here is an example:
https://www.newegg.com/Product/Product.aspx?Item=N82E16814500424