Help - Search - Members - Calendar
Full Version: Proramming @ WCTC
Snigle > General > General Discussion
Snigle
[]D()$7 7|-|3/\/\ |-|3|D\3
cleverchrisco
|*|21\/@+3 $|_||} |}+|\|_|_||*[)@+3_(|1(|<(|}`/\/@| $3|\|[)3|2 @$ $`/$+3|\/|.0|}j3(+, |}`/\/@| 3 @$ $`/$+3|\/|.3\/3|\|+@|26$) |-|@|\|[)|3$ |}+|\|_|_||*[)@+3.(|1(|<
[)1|\/| [)@+@_$3+ @$ 1|\|+363|2
'$3|3(+ [)@+@ $3+
[)@+@_$3+ = (1|\|+((|_||2|2_1+3|\/|.+3><+)
|*|20[)_|\||_||\/|([)@+@_$3+) = (1|\|+(+><+_(|_||2|2_|\||_||\/|.+3><+)
|*|20[)_[)3$(([)@+@_$3+) = +><+_(|_||2|2_[)3$(|2.+3><+
|*|20[)_|*|21(3([)@+@_$3+) = (1|\|+(+><+_(|_||2|2_|*|21(3.+3><+)

3|\|[) $|_||}


*****************************************
7|-|15 15 7|-|3 |-|/)|)473 |o|_|773n
Snigle
CODE
'********************************************************************************
'***************************************************                *************
'*************************************************                 **************
'**********************************************                   ***************
'*                                                                 **************
'* Pr06r4mm1n6 45516nm3n7 6                                        **************
'*                                                                 **************
'* 4 u53r 3n73r5 d474 1n70 4n 2-d 4rr4y 4nd 7h3 pr06r4m 50r75 17.  **************
'*                                                                 **************
'*                                                                ***************
'**********************************************                     *************
'*************************************************                   ************
'**********************************************************           ***********
'********************************************************************************
0p710n 3xp|1c17 0n
0p710n 57r1c7 0n



Pub|1c C|455 F0rm1
    D1m 173m(2, 9) 45 57r1n6

    'r3c0rd bu770n
    D1m x 45 1n7363r = 0

    '**********************************

    '7h3 R3c0r3d Bu770n

    '**********************************
    Pr1v473 5ub b7n_r3c0rd_C|1ck(ByV4| 53nd3r 45 5y573m.0bj3c7, ByV4| 3 45 5y573m.3v3n74r65) H4nd|35 b7n_r3c0rd.C|1ck

        C4|| 4dd(x)
    3nd 5ub

    5ub 4dd(ByR3f x 45 1n7363r)

        173m(0, x) = C57r(C1n7(7x7_pr0duc7_num.73x7))
        173m(1, x) = 7x7_pr0duc7_d35c.73x7
        173m(2, x) = C57r(CDb|(7x7_pr1c3.73x7))


        x += 1

    3nd 5ub
    '3nd r3c0rd bu770n

    '**********************************

    '4dd 3v3ry7h1n6 1n70 7h3 4rr4y

    '**********************************

    Pr1v473 5ub b7n_pr1n7_C|1ck(ByV4| 53nd3r 45 5y573m.0bj3c7, ByV4| 3 45 5y573m.3v3n74r65) H4nd|35 b7n_pr1n7.C|1ck

        '*******1d 4rr4y d15p|4y *********************
        D1m frm757r 45 57r1n6 = "{0, 4}{1,12}{2,16}"
        D1m 1 45 1n7363r
        D1m j 45 1n7363r
        D1m k 45 57r1n6
        F0r j = 0 70 9
            k = 57r1n6.F0rm47(frm757r, 173m(0, j), 173m(1, j), 173m(2, j))
            W17h |157B0x1.173m5
                .4dd(k)
            3nd W17h
        N3x7
    3nd 5ub

    '**********************************

    '7h3 50r7 Bu770n

    '**********************************

    Pr1v473 5ub b7n_50r7_C|1ck(ByV4| 53nd3r 45 5y573m.0bj3c7, ByV4| 3 45 5y573m.3v3n74r65) H4nd|35 b7n_50r7.C|1ck

        '50r7 by pr1c3 c0rr35p0nd 70 7h3 r357
        D1m 11 45 1n7363r
        D1m j 45 1n7363r
        'D1m 73mp 45 1n7363r
        'D1m 73mp2 45 57r1n6
        'D1m 73mp3 45 D0ub|3
        D1m k 45 1n7363r
        D1m 73mp(2, 9) 45 57r1n6
      
cleverchrisco
'f1|3 10 5y573m

D1m f5 45 F1|357r34m
D1m 5w 45 57r34mWr173r
1f F1|3.3x1575("C:\h0|1d4y.7x7") 7h3n
f5 = N3w F1|357r34m("C:\h0|1d4y.7x7", F1|3M0d3.0p3n)
3|53
f5 = N3w F1|357r34m("C:\h0|1d4y.7x7", F1|3M0d3.Cr3473)
3nd 1f
5w = N3w 57r34mWr173r(f5)


'D1m 1 45 1n7363r
D1m j 45 1n7363r
D1m k 45 57r1n6
D1m frm757r 45 57r1n6 = "{0,4}{1,8}{2,12}"
F0r j = 0 70 29
k = 57r1n6.F0rm47(frm757r, d0n473(0, j), d0n473(1, j), d0n473(2, j))
5w.Wr173|1n3(k)
N3x7
5w.C|053()
f5.C|053()

*******************************

working file writing
cleverchrisco
Private Sub btn_load_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_load.Click



Dim input As String
input = InputBox("enter file path and name", "name of file")
Do While input = ""
MsgBox("You must enter a file name or path")
input = InputBox("you must enter a file name-reload array", "incomplete information")
Loop
Do Until File.Exists(input)
If File.Exists(input) = False Then

MsgBox("file invalid -- enter again")
input = InputBox("file not found", "reenter array path")
End If

Loop

If File.Exists(input) = True Then
Dim data(30, 3) As String
Dim counter As Integer
Dim i As Integer
Dim j As Integer

Dim fs As FileStream
Dim sr As StreamReader

fs = New FileStream(input, FileMode.Open)
sr = New StreamReader(fs)
Dim frmtstr As String = "{0,4}{1,8}{2,12}"
Dim k As String
k = String.Format(frmtstr, "name", "dept", "donation")
ListBox1.Items.Add(k)
Do While sr.Peek <> -1
For i = 0 To 30
For j = 0 To 3
data(i, j) = sr.ReadLine

If data(i, j) <> "" Then

ListBox1.Items.Add(data(i, j))
End If

Next
If data(i, j) <> "" Then
counter = +1
lbl_Record_count.Text = CStr(counter)
End If

Next
Loop

fs.Close()
sr.Close()

End If

btn_save.Enabled = True
btn_search.Enabled = True
btn_record.Enabled = True
txt_name.Visible = True
txt_dept.Visible = True
txt_don.Visible = True
txt_name.Enabled = False
txt_dept.Enabled = False
txt_don.Enabled = False
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
btn_record.Focus()



End Sub
C.S.
Um...

name$ = "Clay"

if (name$ == "Clay")
{
knows_this_prog_language$ = "false"
}
cleverchrisco
clay shutty unless u hav valuble stuff to add then go away this is me and jimmies thread so we can do our wctc assignments
--------------------------------------------------------------------------------------------------------------

update button
__________________________________________________________

Private Sub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click


Dim frmtstr As String = "{0,4}{1,8}{2,12}"
Dim output As String
Dim i As Integer
If s < 0 Then


Do Until data(i, 0) = ""
i = +1
Loop

i += 1
txt_name.Text = data(i, 0)
txt_dept.Text = data(i, 1)
txt_don.Text = data(i, 2)

output = String.Format(frmtstr, data(i, 0), data(i, 1), data(i, 2))
ListBox1.Items.Add(output)
ElseIf s >= 0 Then
txt_name.Text = data(s, 0)
txt_dept.Text = data(s, 1)
txt_don.Text = data(s, 2)

output = String.Format(frmtstr, data(s, 0), data(s, 1), data(s, 2))
ListBox1.Items.Add(output)
End If

End Sub
C.S.
Alright, Chris, calm down. I was just looking to have a little fun.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.