Designing forms in VB6 vs Access
Author |
Message |
steve.. #1 / 3
|
 Designing forms in VB6 vs Access
Hello, I am a Microsoft Access developer and I am used to doing things the Access way. Well, I have to move a project over to VB6 and I am trying to design some forms in it. Maybe it's just me, but it seems considerably more awkward/time consuming to do things in Visual Basic. In VB, I have to create a new (blank)field and then set the properties for the database they are from, type in the field name, create a label, put the label next to the field, etc. This is opposed to simply dragging and dropping field names from the field list in Access and having all the properties, labels, etc typed in for me automatically. Is there a simpler way to create forms in Visual Basic ala Access? - Steve -- -------------------------------------- If you want to send me an email, send it to: steve{at_sign}tripperjones{dot_com} Sent via Deja.com http://www.*-*-*.com/ Before you buy.
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
Bryan Pollar #2 / 3
|
 Designing forms in VB6 vs Access
Yes, you can try the Data Environment. It's too complicated to describe here, but it's well documented in the VB documentation. Add a DE (Data Environment), create a connection, then a command. Once you have those, you can drag and drop elements from your Access database (that you connected to in the DE) to a VB form and it will do the work for you. There is more to it than this, but you'll need to check the docs for the rest. Good luck!
Quote: > Hello, > I am a Microsoft Access developer and I am used to doing things the > Access way. Well, I have to move a project over to VB6 and I am trying > to design some forms in it. > Maybe it's just me, but it seems considerably more awkward/time > consuming to do things in Visual Basic. In VB, I have to create a new > (blank)field and then set the properties for the database they are > from, type in the field name, create a label, put the label next to the > field, etc. This is opposed to simply dragging and dropping field names > from the field list in Access and having all the properties, labels, > etc typed in for me automatically. > Is there a simpler way to create forms in Visual Basic ala Access? > - Steve > -- > -------------------------------------- > If you want to send me an email, send it to: > steve{at_sign}tripperjones{dot_com} > Sent via Deja.com http://www.deja.com/ > Before you buy.
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
 |
Mr. Jumb #3 / 3
|
 Designing forms in VB6 vs Access
But what of the reverse - VB to Access? I can create a VB form running telnet, but not in Access97 (so far). Key thing is to have the Windows telnet session run within Access97 so that user doesn't have to flip between tables and telnet via alt-tab. Can run a macro/runcommand of telnet.exe, but then Windows telnet takes the focus, not the app. Here's what I have so far: FORM: Sub form_load() FileExecutor(Me.Hwnd, "TELNET.EXE", "Open", Optional cParms As Variant, SW_HIDE ) End Sub MODULE: Option Explicit Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal_ lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Public Const SW_HIDE = 0 Public Const SW_MAXIMIZE = 3 Public Const SW_MINIMIZE = 6 Public Const SW_NORMAL = 1 Public Const SW_SHOWDEFAULT = 10 Public Const SW_SHOWMAXIMIZED = 3 Public Const SW_SHOWMINIMIZED = 2 Public Const SW_SHOWMINNOACTIVE = 7 Public Const SW_SHOWNA = 8 Public Const SW_SHOWNOACTIVATE = 4 Public Const SW_SHOWNORMAL = 1 Public Sub FileExecutor(lhWnd As Long, Path As String, Action As String, Optional cParms As Variant, Optional nShowCmd As Variant) Dim lRtn As Long 'declare the needed variables lRtn = ShellExecute(lhWnd, Action, Path, "", Path, SW_NORMAL) 'execute orprint the file or folder If lRtn <= 32 Then 'if an error is found then call the FileError function FileError (lRtn) End If End Sub Quote:
> Yes, you can try the Data Environment. It's too complicated to describe > here, but it's well documented in the VB documentation. Add a DE (Data > Environment), create a connection, then a command. Once you have those, you > can drag and drop elements from your Access database (that you connected to > in the DE) to a VB form and it will do the work for you. > There is more to it than this, but you'll need to check the docs for the > rest. > Good luck!
> > Hello, > > I am a Microsoft Access developer and I am used to doing things the > > Access way. Well, I have to move a project over to VB6 and I am trying > > to design some forms in it. > > Maybe it's just me, but it seems considerably more awkward/time > > consuming to do things in Visual Basic. In VB, I have to create a new > > (blank)field and then set the properties for the database they are > > from, type in the field name, create a label, put the label next to the > > field, etc. This is opposed to simply dragging and dropping field names > > from the field list in Access and having all the properties, labels, > > etc typed in for me automatically. > > Is there a simpler way to create forms in Visual Basic ala Access? > > - Steve > > -- > > -------------------------------------- > > If you want to send me an email, send it to: > > steve{at_sign}tripperjones{dot_com} > > Sent via Deja.com http://www.deja.com/ > > Before you buy.
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
|
|