473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Help with visual C# basic concept versus VB-6

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
Nov 15 '05 #1
0 879

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AK | last post by:
I don't want any part of the previous discussion on Visual Basic versus Visual Basic.Net. My query is about using Visual Basic for Applications; and whether it is better to use Visual Basic 6 or...
5
by: Greg | last post by:
I am developing an application where I need to secure a workstation for periods of time. I can use BlockInput to stop users from task switching or messing with the keyboard, but I would like to...
2
by: janice_2k | last post by:
Dear Sir/Mdm, I am writing this on behalf of my company. We bought the Visual Studio .NET Enterprise version but currently we need to use Visual Basic 6 for a small development. We are not able to...
21
by: Philipp | last post by:
Hey, did anyone have a good paper about the opject orianteted concept? wishes
43
by: ZillionDollarSadist | last post by:
Hello, I'm working at a simple Access '97 + VB4 application, and I ran into a terrible problem: something I never modified now gives me a totally unwanted "Invalid use of null" error. It happens...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
31
by: Mark Dufour | last post by:
Hi all, I have recently released version 0.0.20 and 0.0.21 of Shed Skin, an optimizing Python-to-C++ compiler. Shed Skin allows for translation of pure (unmodified), implicitly statically typed...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
15
by: colemanj4 | last post by:
Here is what I have so far, it loops while the PW is incorrect, or until cancel is selected. I want it to lock the tables for adds, deletes, and edits when cancel is selected, and if the PW is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.