HELP, I really need help, I've been reading a lot about
C# and visual C# but I can't get it to do what I want, I'm
considering myself to be pretty good on VB but I've been
recommended to learn C#, so I would like to redo some of
the application I have as VB-app in visual C# just to get
me moving.
The whole developing interface in .Net is making me
confused, how can I set up a database application like I
would like to have them?, Could someone skilled on C# help
me by creating the equivalent application as per below VB6
It's really a small app but for me with a crucial aspect
which I cannot create in C#, I would like to understand
MDI-aspect + Public DB object + GetConnected sub + Dim
Form as new Form aspect + Load object vs Object.show
If it's convenient send the whole visual C#
project "winzipped" to kj******@hotmail.com
ok, here we go, both forms and module has default names,
and I added a reference to Microsoft DAO 3.51, if you know
VB6 you make such app run in less than 120 sec.
'' IN MODULE1 FILE
Public MyDB As Database
Public MyRcs As Recordset
Sub Main()
GetConnected
Load MDIForm1
MDIForm1.Show
End Sub
Private Sub GetConnected()
Set MyDB = OpenDatabase("O:\data\MyDatabase.mdb", False,
False)
End Sub
'' IN MDIFORM1 FILE
Private Sub mnu_Loadform_Click()
Dim Myform As New Form1
Load Myform
Myform.Show
End Sub
Private Sub mnu_close_Click()
Unload Me
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
MyDB.Close
Set MyDB = Nothing
End Sub
''IN FORM1 FILE
Private Sub Command1_Click()
Set MyRcs = MyDB.OpenRecordset("MyTableName")
List1.Clear
Do Until MyRcs.EOF
List1.AddItem MyRcs("MyFieldName")
MyRcs.MoveNext
Loop
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set MyRcs = Nothing
End Sub