K8047 Gain setting

I am having problems setting the gain on my 8047 card.
I have simply set up 4 buttons with the following:-

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        SetGain(1, 1)
    End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        SetGain(1, 2)
    End Sub

and so on fo gain 5 and 10
this should set the gain of channel 1 to 1, 2, 5,10
However it does not do anything.
The card works perfectly well with all other commands and if I use the supplied demo program the gain changes, so the card works. Is my code correct, or am I missing something?
Thanks for your help
Dave

Your code looks OK.
Is there same problem on all the channels 1 to 4?
As a test you may use the following code.
Does the LED turn on but the gain setting doesn’t change:

SetGain(1, 10) LEDon()
Here you can download another example in Visual Basic 2008 to test:
box.net/shared/t5se5yp5s6

Thank you for your help, I tried your source program and I had no problems. This made me think a bit more. I eventually discovered my mistake, I had not put the radio buttons for the gain changes in their own group box, subsequently the channels were controlled by all the radio buttons and unfortunately in my program I had set one of the radio buttons fixed to minimum gain, hence all the other buttons were over ruled by this command.
I have now seperated the gain setting for the individual channels and all works well.
Now to the next challenge. Thanks Dave A.