Click here to Skip to main content
15,888,527 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: need good books for GUI design Pin
Ray Cassick26-Aug-03 16:42
Ray Cassick26-Aug-03 16:42 
GeneralRe: need good books for GUI design Pin
J. Dunlap26-Aug-03 16:56
J. Dunlap26-Aug-03 16:56 
Generaltrouble with msbind.dll Pin
Marcel Härry26-Aug-03 14:12
Marcel Härry26-Aug-03 14:12 
GeneralTranslation needed Pin
oliver_twistor26-Aug-03 11:24
oliver_twistor26-Aug-03 11:24 
GeneralRe: Translation needed Pin
Ian Darling27-Aug-03 0:01
Ian Darling27-Aug-03 0:01 
GeneralRe: Translation needed Pin
oliver_twistor27-Aug-03 4:03
oliver_twistor27-Aug-03 4:03 
GeneralRe: Translation needed Pin
Ian Darling27-Aug-03 4:27
Ian Darling27-Aug-03 4:27 
GeneralRe: Translation needed Pin
oliver_twistor27-Aug-03 22:31
oliver_twistor27-Aug-03 22:31 
Thanks, but I have already worked it out. It was only one small adjustment I had to do in my code to make it worked.

I did it like this:

<br />
Dim x As Integer<br />
    Dim y As Integer<br />
    Dim counter As Integer<br />
    Dim check As Boolean<br />
<br />
<br />
    Private Sub Bttn_Fkltt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bttn_Fkltt.Click<br />
        x = TxtBx_Fkltt.Text<br />
        counter = 1<br />
        check = False<br />
        y = x * (x - 1)<br />
        If x > 2 Then<br />
            Do Until check = True<br />
                counter = counter + 1<br />
                y = y * (x - counter)<br />
                If counter = x - 1 Then<br />
                    check = True<br />
                    Exit Do<br />
                End If<br />
            Loop<br />
            Lbl_Fkltt.Text = y<br />
        Else<br />
            Lbl_Fkltt.Text = y<br />
        End If<br />
    End Sub<br />


Look at the code: If counter = x - 1 Then. Before, I had If counter = x Then, and with that code, y was multiplied with 0 in the end, resulting in y = 0.

//OT
GeneralAbout Shaped forms in vb.NET Pin
Romein25-Aug-03 22:52
Romein25-Aug-03 22:52 
GeneralRe: About Shaped forms in vb.NET Pin
Johannes Hansen27-Aug-03 16:49
Johannes Hansen27-Aug-03 16:49 
GeneralRe: About Shaped forms in vb.NET Pin
fume27-Aug-03 20:41
fume27-Aug-03 20:41 
GeneralRe: About Shaped forms in vb.NET Pin
Romein27-Aug-03 22:01
Romein27-Aug-03 22:01 
GeneralRe: About Shaped forms in vb.NET Pin
Johannes Hansen29-Aug-03 3:50
Johannes Hansen29-Aug-03 3:50 
Generalneed simple text editor Pin
iaustin25-Aug-03 14:57
iaustin25-Aug-03 14:57 
GeneralRe: need simple text editor Pin
RichardGrimmer1-Sep-03 4:58
RichardGrimmer1-Sep-03 4:58 
QuestionAnchoring Datagrid? Pin
Anonymous25-Aug-03 7:02
Anonymous25-Aug-03 7:02 
AnswerRe: Anchoring Datagrid? Pin
Ray Cassick27-Aug-03 4:37
Ray Cassick27-Aug-03 4:37 
GeneralInvert RBG into a color variable in vb.NET Pin
Romein25-Aug-03 3:18
Romein25-Aug-03 3:18 
GeneralRe: Invert RBG into a color variable in vb.NET Pin
Roger Alsing25-Aug-03 3:37
Roger Alsing25-Aug-03 3:37 
GeneralYhea exactly!!! 10anx alot! Pin
Romein25-Aug-03 5:01
Romein25-Aug-03 5:01 
GeneralData Binding Problem. Pin
Martin Cross24-Aug-03 11:07
Martin Cross24-Aug-03 11:07 
GeneralRe: Data Binding Problem. Pin
Martin Cross25-Aug-03 22:38
Martin Cross25-Aug-03 22:38 
GeneralexecWB Pin
pnpfriend24-Aug-03 7:42
pnpfriend24-Aug-03 7:42 
GeneralError Creating Window Handle Pin
Martin Cross24-Aug-03 5:40
Martin Cross24-Aug-03 5:40 
GeneralRe: Error Creating Window Handle Pin
Martin Cross24-Aug-03 11:02
Martin Cross24-Aug-03 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.