The position of the drinking glasses change before the crook pours the milk in to them.
The knockout drops, or chloral hydrate, that the crook gives Barney take about an hour to work. This would be more than enough time for Andy and the FBI agent to reach Barney's room before he passes out. Yes he is fast asleep when they arrive.
When barney is standing in the office with the gun in his back you can see the wire attached to the gun when it falls down his leg.