-
Re: App Object (fixes)
"John Butler" <nospamjrbutler@btinternet.com> wrote:
>
>Thanks Rob. Not sure you'll shut anyone up...but it is a great illustration
>and I'm sure some of us'll use it...
To go along with this and Pat's comment:
Yes, I'm sure a lot of them don't care. They have consistently shown that
they don't care about the *solution*, they only care to complain - which
is why nobody gives them a shred of respect, or gives their moaning any sympathy.
Also why their credability is in the crapper half the time (if not more).
I'm sure some of them will go right on complaining. However, the original
complaint is why the App object is missing. Well, now it is *not*. All legit
reasons for that particular gripe have been eliminated.
>Observation though: I notice you had to do an API declaration to get the
OS
>version? Would've thought the framework provided that somewhere....but
>obviously not...seems like an oversight...
It is in the framework. I just rushed the code and that was what popped into
my head first.
I'm also expecting there to be some issues with combinations of flags in
the LogMode (I HATED how MS threw these bit flags together - look at the
first 3 to see what I'm talking about).
Here's a revised version of the code (with some other fixes), just in case
anyone goes ripping through the archive one day for it:
=================================================================
Option Explicit On
Option Strict On
Imports System.Reflection
Imports System.Reflection.Assembly
Imports System.Diagnostics.Process
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Imports System.ComponentModel
Imports System.IO
' In order to set/retrieve project Comments, you must add this attribute
' to your Assembly Info file.
<Serializable(), AttributeUsage(AttributeTargets.Assembly)> _
Public Class AssemblyCommentAttribute
Inherits System.Attribute
Private _comments As String
Public Sub New(ByVal Comments As String)
_comments = Comments
End Sub
Public ReadOnly Property Comments() As String
Get
Return _comments
End Get
End Property
End Class
' Create a Console or Service type application if you want a truly
' unattended process. If you want to programmatically query for
' unattended app status, add this attribute to the assembly information
' file, and pass TRUE to the constructor. Do this only if your application
' does not have a user interface.
<Serializable(), AttributeUsage(AttributeTargets.Assembly)> _
Public Class UnattendedAppAttribute
Inherits System.Attribute
Private _unattended As Boolean
Public Sub New(ByVal Unattended As Boolean)
_unattended = Unattended
End Sub
Public ReadOnly Property Unattended() As Boolean
Get
Return _unattended
End Get
End Property
End Class
Friend Enum LogModeFlags
vbLogAuto = 0 'If running on Windows 95 or later, this option logs
messages to the file specified in the LogFile property. If running on Windows
NT, messages are logged to the Windows NT Application Event Log, with "VBNET"
used as the application source and App.Title appearing in the description.
VbLogOff = 1 'Turns logging off from the App object.
VbLogToFile = 2 'Forces logging to a file.
VbLogToNT = 3 'Forces logging to the NT event log. If not running
on Windows NT, or the event log is unavailable, logging is ignored and the
property is set to vbLogOff.
VbLogOverwrite = 16 'Indicates that the logfile should be recreated each
time the application starts. This value can be combined with other mode options
using the OR operator. The default action for logging is to append to the
existing file. In the case of NT event logging, this flag has no meaning.
VbLogThreadID = 32 'Indicates that the current thread ID be prepended
to the message, in the form "[T:0nnn] ". This value can be combined with
other mode options using the OR operator.
vbLogAutoWithThreadID = VbLogThreadID
vbLogToFileAndOverwrite = 18
vbLogToFileWithThreadID = 34
vbLogToFileAndOverwriteWithThreadID = 52
vbLogToNTWithThreadID = 35
End Enum
Friend Enum VBEventType
vbLogEventTypeError = 1 'Error.
vbLogEventTypeWarning = 2 'Warning.
vbLogEventTypeInformation = 4 'Information
End Enum
Friend Structure AssemblyInfo
Friend Title As String
Friend Company As String
Friend Description As String
Friend Comments As String
Friend Product As String
Friend Copyright As String
Friend Trademark As String
Friend Unattended As Boolean
Friend PreviousInstance As Boolean
End Structure
Friend Structure Version
Friend Major As Integer
Friend Minor As Integer
Friend Build As Integer
Friend Revision As Integer
End Structure
Friend Class App
Private Const EventLogSource As String = "VBNET"
Private Const ErrOLEAutoModel As String = "Not implmented. .NET does
not use the same OLE Automation RPC model."
Private Shared _initialized As Boolean
Private Shared _assemblyInfo As AssemblyInfo
Private Shared _version As VBApp.Version
Private Shared _logMode As LogModeFlags
Private Shared _logPath As String
Private Shared _ranFirstFileLog As Boolean
Private Shared _eventLog As EventLog
Friend Shared ReadOnly Property PrevInstance() As Boolean
Get
Return _assemblyInfo.PreviousInstance
End Get
End Property
Friend Shared ReadOnly Property TaskVisible() As Boolean
Get
Return Not Process.GetCurrentProcess.MainWindowHandle.Equals(IntPtr.Zero)
End Get
End Property
' See AssemblyCommentsAttribute for more information
Friend Shared ReadOnly Property Comments() As String
Get
If Not _initialized Then InitAssemblyInfo()
Return _assemblyInfo.Comments
End Get
End Property
Friend Shared ReadOnly Property CompanyName() As String
Get
If Not _initialized Then InitAssemblyInfo()
Return _assemblyInfo.Company
End Get
End Property
Friend Shared ReadOnly Property Title() As String
Get
If Not _initialized Then InitAssemblyInfo()
Return _assemblyInfo.Title
End Get
End Property
Friend Shared ReadOnly Property FileDescription() As String
Get
If Not _initialized Then InitAssemblyInfo()
Return _assemblyInfo.Description
End Get
End Property
Friend Shared ReadOnly Property ProductName() As String
Get
If Not _initialized Then InitAssemblyInfo()
Return _assemblyInfo.Product
End Get
End Property
Friend Shared ReadOnly Property LegalCopyright() As String
Get
If Not _initialized Then InitAssemblyInfo()
Return _assemblyInfo.Copyright
End Get
End Property
Friend Shared ReadOnly Property LegalTrademark() As String
Get
If Not _initialized Then InitAssemblyInfo()
Return _assemblyInfo.Trademark
End Get
End Property
Friend Shared ReadOnly Property EXEName() As String
Get
Return [Assembly].GetExecutingAssembly.GetName.Name
End Get
End Property
Friend Shared ReadOnly Property Path() As String
Get
Return IO.Path.GetDirectoryName([Assembly].GetExecutingAssembly.Location)
End Get
End Property
Friend Shared ReadOnly Property Version() As VBApp.Version
Get
If Not _initialized Then InitAssemblyInfo()
Return _version
End Get
End Property
Friend Shared ReadOnly Property Major() As Integer
Get
Return App.Version.Major
End Get
End Property
Friend Shared ReadOnly Property Minor() As Integer
Get
Return App.Version.Minor
End Get
End Property
Friend Shared ReadOnly Property Build() As Integer
Get
Return App.Version.Build
End Get
End Property
Friend Shared ReadOnly Property Revision() As Integer
Get
Return App.Version.Revision
End Get
End Property
<Obsolete(".NET does not use the Component Manager or the VB5/6 Forms
classes. Therefore, non-modal forms in libraries are always allowed.")> _
Friend Shared ReadOnly Property NonModalAllowed() As Boolean
Get
Return True
End Get
End Property
Friend Shared ReadOnly Property hInstance() As IntPtr
Get
Return Marshal.GetHINSTANCE([Assembly].GetExecutingAssembly.GetModules()(0))
End Get
End Property
Friend Shared ReadOnly Property ThreadID() As Integer
Get
Return AppDomain.GetCurrentThreadId
End Get
End Property
' See UnattendedAppAttribute for more details
Friend Shared ReadOnly Property UnattendedApp() As Boolean
Get
Return _assemblyInfo.Unattended
End Get
End Property
<Obsolete("Option doesn't exist. If you are creating remoting objects,
the host keeps the application alive.")> _
Friend Shared ReadOnly Property RetainedPoject() As Boolean
Get
Return False
End Get
End Property
<Obsolete("Option doesn't exist.")> _
Friend Shared ReadOnly Property StartMode() As Integer
Get
Return 0
End Get
End Property
<Obsolete("Each form can now have a help file referred to by a HelpProvider
component. This method shows only the help file for the main form.")> _
Friend Shared ReadOnly Property HelpFile() As String
Get
Dim f As Form = DirectCast(Form.FromHandle(Process.GetCurrentProcess.MainWindowHandle),
Form)
If Not f Is Nothing Then
Dim fi() As FieldInfo
Dim i As Integer
fi = f.GetType.GetFields(BindingFlags.Instance Or BindingFlags.NonPublic)
For i = 0 To fi.GetUpperBound(0)
If fi(i).FieldType.Name = "HelpProvider" Then
Return DirectCast(fi(i).GetValue(f), HelpProvider).HelpNamespace()
End If
Next i
End If
End Get
End Property
<Obsolete(ErrOLEAutoModel)> _
Public Property OleRequestPendingMsgText() As String
Get
Throw New NotImplementedException(ErrOLEAutoModel)
End Get
Set(ByVal Value As String)
Throw New NotImplementedException(ErrOLEAutoModel)
End Set
End Property
<Obsolete(ErrOLEAutoModel)> _
Public Property OleRequestPendingMsgTitle() As String
Get
Throw New NotImplementedException(ErrOLEAutoModel)
End Get
Set(ByVal Value As String)
Throw New NotImplementedException(ErrOLEAutoModel)
End Set
End Property
<Obsolete(ErrOLEAutoModel)> _
Public Property OleRequestPendingTimeout() As Integer
Get
Throw New NotImplementedException(ErrOLEAutoModel)
End Get
Set(ByVal Value As Integer)
Throw New NotImplementedException(ErrOLEAutoModel)
End Set
End Property
<Obsolete(ErrOLEAutoModel)> _
Public Property OleServerBusyMsgText() As String
Get
Throw New NotImplementedException(ErrOLEAutoModel)
End Get
Set(ByVal Value As String)
Throw New NotImplementedException(ErrOLEAutoModel)
End Set
End Property
<Obsolete(ErrOLEAutoModel)> _
Public Property OleServerBusyMsgTitle() As String
Get
Throw New NotImplementedException(ErrOLEAutoModel)
End Get
Set(ByVal Value As String)
Throw New NotImplementedException(ErrOLEAutoModel)
End Set
End Property
<Obsolete(ErrOLEAutoModel)> _
Public Property OleServerBusyRaiseError() As Boolean
Get
Throw New NotImplementedException(ErrOLEAutoModel)
End Get
Set(ByVal Value As Boolean)
Throw New NotImplementedException(ErrOLEAutoModel)
End Set
End Property
<Obsolete(ErrOLEAutoModel)> _
Public Property OleServerBusyTimeout() As Integer
Get
Throw New NotImplementedException(ErrOLEAutoModel)
End Get
Set(ByVal Value As Integer)
Throw New NotImplementedException(ErrOLEAutoModel)
End Set
End Property
<Obsolete("Use the EventLog classes for more flexibility.")> _
Friend Shared ReadOnly Property LogMode() As LogModeFlags
Get
Return _logMode
End Get
End Property
<Obsolete("Use the EventLog classes for more flexibility.")> _
Friend Shared ReadOnly Property LogPath() As String
Get
Return _logPath
End Get
End Property
<Obsolete("Use the EventLog classes for more flexibility.")> _
Friend Shared Sub LogEvent(ByVal LogBuffer As String, ByVal EventType
As VBEventType)
Dim threadText As String
If (_logMode Or LogModeFlags.VbLogThreadID) = LogModeFlags.VbLogThreadID
Then
threadText = "Thread ID: " + ThreadID.ToString
End If
If (_logMode And LogModeFlags.VbLogToNT) = LogModeFlags.VbLogToNT
Then
Dim logEntryType As EventLogEntryType
Select Case EventType
Case VBEventType.vbLogEventTypeError
logEntryType = EventLogEntryType.Error
Case VBEventType.vbLogEventTypeInformation
logEntryType = EventLogEntryType.Information
Case VBEventType.vbLogEventTypeWarning
logEntryType = EventLogEntryType.Warning
End Select
_eventLog.WriteEntry("VBNET", _
"The VB.NET Application identified by the event source logged
this Application event" + _
vbCrLf + Title + threadText + " ,Logged: " + LogBuffer _
, logEntryType, 1)
Exit Sub
End If
If (_logMode And LogModeFlags.VbLogToFile) = LogModeFlags.VbLogToFile
Then
Dim fs As FileStream
Dim sw As StreamWriter
Dim eventTypeText As String
Try
If _ranFirstFileLog Then
fs = File.Open(_logPath, FileMode.Append)
Else
If (_logMode And LogModeFlags.VbLogOverwrite) = LogModeFlags.VbLogOverwrite
Then
If File.Exists(_logPath) Then
File.Delete(_logPath)
End If
fs = File.Open(_logPath, FileMode.CreateNew)
Else
fs = File.Open(_logPath, FileMode.OpenOrCreate Or
FileMode.Append)
End If
_ranFirstFileLog = True
End If
sw = New StreamWriter(fs)
Select Case EventType
Case VBEventType.vbLogEventTypeError
eventTypeText = "Error "
Case VBEventType.vbLogEventTypeInformation
eventTypeText = "Information "
Case VBEventType.vbLogEventTypeWarning
eventTypeText = "Warning "
End Select
sw.WriteLine(eventTypeText + "Application " + _logPath +
": " + threadText + " ,Logged: " + LogBuffer)
sw.Flush()
sw.Close()
Catch ex As Exception
_logMode = LogModeFlags.VbLogOff
Finally
If Not sw Is Nothing Then
sw.Close()
End If
End Try
End If
End Sub
<Obsolete("Use the EventLog classes for more flexibility.")> _
Friend Shared Sub StartLogging(ByVal LogTarget As String, ByVal LogModes
As LogModeFlags)
_logPath = LogTarget
Select Case LogModes
Case LogModeFlags.VbLogOff, LogModeFlags.VbLogToFile, LogModeFlags.vbLogToFileAndOverwrite,
LogModeFlags.vbLogToFileAndOverwriteWithThreadID
_logMode = LogModes
Case LogModeFlags.vbLogAuto, LogModeFlags.vbLogAutoWithThreadID
If IsNT4OrHigherOS() Then
_logMode = LogModeFlags.VbLogToNT
StartNTLog()
Else
_logMode = LogModeFlags.VbLogToFile
End If
If (LogModes And LogModeFlags.VbLogThreadID) = LogModeFlags.VbLogThreadID
Then
_logMode = (_logMode Or LogModeFlags.VbLogThreadID)
End If
Case LogModeFlags.VbLogToNT, LogModeFlags.vbLogToNTWithThreadID
If IsNT4OrHigherOS() Then
StartNTLog()
_logMode = LogModes
Else
_logMode = LogModeFlags.VbLogOff
End If
Case Else
_logMode = LogModeFlags.VbLogOff
End Select
End Sub
Private Shared Function IsNT4OrHigherOS() As Boolean
If Environment.OSVersion.Platform = PlatformID.Win32NT Then
Return True
End If
End Function
Private Shared Sub StartNTLog()
If Not _eventLog Is Nothing Then
_eventLog = New EventLog("Application", ".", EventLogSource)
End If
End Sub
Private Shared Sub InitAssemblyInfo()
Dim assemblyCompany As AssemblyCompanyAttribute()
assemblyCompany = DirectCast(GetExecutingAssembly.GetCustomAttributes(GetType(AssemblyCompanyAttribute),
True), AssemblyCompanyAttribute())
If Not ((assemblyCompany Is Nothing) OrElse (assemblyCompany.Length
= 0)) Then
_assemblyInfo.Company = assemblyCompany(0).Company
End If
Dim assemblyDesc As AssemblyDescriptionAttribute()
assemblyDesc = DirectCast(GetExecutingAssembly.GetCustomAttributes(GetType(AssemblyDescriptionAttribute),
True), AssemblyDescriptionAttribute())
If Not ((assemblyDesc Is Nothing) OrElse (assemblyDesc.Length = 0))
Then
_assemblyInfo.Description = assemblyDesc(0).Description
End If
Dim assemblyTitle As AssemblyTitleAttribute()
assemblyTitle = DirectCast(GetExecutingAssembly.GetCustomAttributes(GetType(AssemblyTitleAttribute),
True), AssemblyTitleAttribute())
If Not ((assemblyTitle Is Nothing) OrElse (assemblyTitle.Length =
0)) Then
_assemblyInfo.Title = assemblyTitle(0).Title()
End If
Dim assemblyProduct As AssemblyProductAttribute()
assemblyProduct = DirectCast(GetExecutingAssembly.GetCustomAttributes(GetType(AssemblyProductAttribute),
True), AssemblyProductAttribute())
If No220 41924 <3cf78b2a@10.1.10.29> article retrieved - head and body follows
Reply-To: "Tim Overbay" <luhar@neverendingsoftware.com>
From: "Tim Overbay" <luhar@neverendingsoftware.com>
Newsgroups: vb.dotnet.discussion
References: <3cf4fd4f@10.1.10.29> <3cf5149e@10.1.10.29> <3cf52743$1@10.1.10.29> <MPG.175f54b8367891a2989680@news.devx.com> <3cf6a9bf@10.1.10.29>
Subject: Re: Converting projects to VB.NET
Date: Fri, 31 May 2002 09:03:37 -0600
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 12.5.152.60
Message-ID: <3cf78b2a@10.1.10.29>
X-Trace: 31 May 2002 07:39:38 -0800, 12.5.152.60
Path: 10.1.10.29
Xref: 10.1.10.29 vb.dotnet.discussion:41924
I just finished an app that uses both. The scientific data is stored on the
server in a SQL db and the project data is stored locally in an Access db.
They haven't reported any problems with either one. *knock wood* And, as far
as I could tell, the OleDBProvider wasn't any less capable.
SQL server is obviously better performance-wise, but Access is great for
small, local databases.
Tim
"John Butler" <nospamjrbutler@btinternet.com> wrote in message
news:3cf6a9bf@10.1.10.29...
>
> "turbofish" <junk@turbofish.com> wrote in message
> news:MPG.175f54b8367891a2989680@news.devx.com...
> > Well, most of what I do is either desktop accounting programs/office
> > automation with very little network use. Maybe a maximum of 5-7 clients
on
> one
> > database at a time. There are a LOT of programs and offices out there
just
> > like this. .NET focuses on the SQL server. In fact, every book I have on
> .NET
> > when it comes to covering database stuff, they won't even mention
anything
> > less than SQL 2000.
> > It's a real shame that Microsoft has forgotten that not everyone has a
> need
> > for large scale database apps.
>
> I haven't used it, but what is wrong with the OleDB driver in .NET? Far as
> I've seen, it works the same ways as the sql server.net data provider I
> use....Is it slower or less capable? I'm curious, as I haven't seen any
> issues reported...and I might need to use an Access database for a
> customer's website, for an upcoming project....
>
> Rgds
> John Butler
>
>
>
-
Re: App Object (fixes)
Thanks Rob! You're making my point better than I ever could. You're work of
art is much better than that nasty old App object!
-
Re: App Object (fixes)
> ...and I certainly don't want Rob writing part of my apps.
Dave: Why do you prefer to let Microsoft write part of your apps? If MS'
code doesn't work, you have no recourse. If Rob's code doesn't work, you can
e-mail him, or fix it yourself.
---
Phil Weber
-
Re: App Object (fixes)
"Dave Doknjas" <dave_doknjas@yahoo.ca> wrote:
>
>Thanks Rob! You're making my point better than I ever could. You're work
of
>art is much better than that nasty old App object!
>
You've missed the point. You asked for an App object, Rob gave you one. If
you look you would see that all of the things that the App object did for
you are still available in the .NET framework. Organized a little different,
but still there and in some cases more capable (logging comes to mind). The
framework is big, but hardly more complicated. Don't confuse different with
difficult.
-
Re: App Object (fixes)
>You've missed the point. You asked for an App object, Rob gave you one. If
>you look you would see that all of the things that the App object did for
>you are still available in the .NET framework. Organized a little different,
>but still there and in some cases more capable (logging comes to mind).
The
>framework is big, but hardly more complicated. Don't confuse different with
>difficult.
And I guess you've missed my point. I don't want to waste any time re-creating
VB6's shortcuts (but of course I'll have to) and I certainly don't want Rob
writing part of my apps.
-
Re: App Object (fixes)
"Dave Doknjas" <dave_doknjas@yahoo.ca> wrote:
>
>>You've missed the point. You asked for an App object, Rob gave you one.
If
>>you look you would see that all of the things that the App object did for
>>you are still available in the .NET framework. Organized a little different,
>>but still there and in some cases more capable (logging comes to mind).
>The
>>framework is big, but hardly more complicated. Don't confuse different
with
>>difficult.
>
>And I guess you've missed my point. I don't want to waste any time re-creating
>VB6's shortcuts (but of course I'll have to) and I certainly don't want
Rob
>writing part of my apps.
>
Just out if curiosity what "VB6 shortcuts" do you think you'll have to re-create.
Besides, you know of course that Microsoft did a lot of this with the Microsoft.VisualBasic.Compatibility
namespace.
-
Re: App Object (fixes)
>Just out if curiosity what "VB6 shortcuts" do you think you'll have to re-create.
>Besides, you know of course that Microsoft did a lot of this with the Microsoft.VisualBasic.Compatibility
>namespace.
Try this: take a non-trivial VB6 project and try to get it running under
VB.NET. Get back to me once you've done this (if you've ever had access to
a non-trivial VB6 project).
-
Re: App Object (fixes)
Weak weak weak.
It seems to me like Rob just took care of re-creating that particular VB6
shortcut for ya. VBc has enjoyed many years of third-party component
development and the same thing will happen with VB.NET.
How many "non-trivial" apps have you written in VB6 without any third-party
components or calls to the API?
You can get down off your soapbox now. None of your points have been
particularly original or stood up to scrutiny.
Tim
"Dave Doknjas" <dave_doknjas@yahoo.ca> wrote in message
news:3cf790b9$1@10.1.10.29...
>
> >You've missed the point. You asked for an App object, Rob gave you one.
If
> >you look you would see that all of the things that the App object did for
> >you are still available in the .NET framework. Organized a little
different,
> >but still there and in some cases more capable (logging comes to mind).
> The
> >framework is big, but hardly more complicated. Don't confuse different
with
> >difficult.
>
> And I guess you've missed my point. I don't want to waste any time
re-creating
> VB6's shortcuts (but of course I'll have to) and I certainly don't want
Rob
> writing part of my apps.
>
-
Re: App Object (fixes)
"Dave Doknjas" <dave_doknjas@yahoo.ca> wrote:
>
>>Just out if curiosity what "VB6 shortcuts" do you think you'll have to
re-create.
>>Besides, you know of course that Microsoft did a lot of this with the Microsoft.VisualBasic.Compatibility
>>namespace.
>
>Try this: take a non-trivial VB6 project and try to get it running under
>VB.NET. Get back to me once you've done this (if you've ever had access
to
>a non-trivial VB6 project).
I'm not going down that path. That's been discussed to death. We all know
there isn't an easy migration path, but that isn't an answer to the question.
I won't disagree that MSFT made a mistake by calling it VB, but that doesn;t
make it a bad thing.
FWIW I have no intentions of migrating anything that is currently in production
to .NET. I do have plans for re-architecting an application to C# sometime
in the next 18 mths or so (waiting for the Tablet PC to come out). I'm not
sure what you consider trivial, this one tops out at about 150,000 LOC and
appr 115 forms and I don't know how many user controls and classes. It obviously
will not "migrate" to VB.NET. I had a ***** of a time getting it from VB3
to VB5. I do know that once I get it to .NET it will be better architected
and will have fewer lins of code. I'm guessing it will approach about half
as many lines of code, with added functionality. That is what having a large
framework behind you can provide.
-
Re: App Object (fixes)
So what's this? You think only people who complain the whole time have non-trivial
apps? You're a stereotyping, generalizing, whining little putz, aren't you?
I've been working with .NET for nearly two years now, and I've successfully
converted two non-trivial projects already. Now working on the third, the
largest by far.
Again, if you people coded half as much as you complain, converting wouldn't
be such an issue. Of course, the people who use the time to code instead
***** actually *get something accomplished*. Funny how that works, isn't
it?
Either way, yours is a moot point, since there are MANY more shortcuts I
can take in VB.NET that i couldn't have made in VB6 code, so the net effect
is much better, for me anyway.
-Rob
"Dave Doknjas" <dave_doknjas@yahoo.ca> wrote:
>
>>Just out if curiosity what "VB6 shortcuts" do you think you'll have to
re-create.
>>Besides, you know of course that Microsoft did a lot of this with the Microsoft.VisualBasic.Compatibility
>>namespace.
>
>Try this: take a non-trivial VB6 project and try to get it running under
>VB.NET. Get back to me once you've done this (if you've ever had access
to
>a non-trivial VB6 project).
-
Re: App Object (fixes)
"Dave Doknjas" <dave_doknjas@yahoo.ca> wrote in message
news:3cf7a4ff@10.1.10.29...
>
> That's great! Now all I have to do to replace existing VB6 functionality
> is scavenge code from people like Rob or write it myself!
>
No. The functionality exists. If you want to make it look exactly like VB6
then yes,you might have to re-group a couple of classes.
-
Re: App Object (fixes)
In article <3cf79705$1@10.1.10.29>, jlsglynn@hotmail.com says...
<snip>
> I do know that once I get it to .NET it will be better architected
> and will have fewer lins of code. I'm guessing it will approach about half
> as many lines of code, with added functionality. That is what having a large
> framework behind you can provide.
I'm curious, why will it be better architected?
Will it be due to VB.NET/VB6 differences or re-design?
Michael
-
Re: App Object (fixes)
"Tim Overbay" <luhar@neverendingsoftware.com> wrote:
>Weak weak weak.
>
>It seems to me like Rob just took care of re-creating that particular VB6
>shortcut for ya. VBc has enjoyed many years of third-party component
>development and the same thing will happen with VB.NET.
That's great! Now all I have to do to replace existing VB6 functionality
is scavenge code from people like Rob or write it myself!
>
>How many "non-trivial" apps have you written in VB6 without any third-party
>components or calls to the API?
>
I didn't have to copy/paste code from the 3rd party components. I made very
few API calls.
-
Re: App Object (fixes)
Pardon my language, but you *are* a whiny little *****. First you whine that
you don't want to rewrite code that's readily available in VB6--somebody
took a little time and effort to do it for you. Then you whine that you
don't want to take the time to scavenge for other people's code--which is
what VBc developers have been doing since the beginning.
Rob's right. You need to spend less time trolling and more time writing
actual code. Better yet, just give it up! Hire somebody to write your code
for you, or find another vocation. Perhaps a career in law would be more
suitable for you. You certainly sound like an argumentative shyster.
Tim
"Dave Doknjas" <dave_doknjas@yahoo.ca> wrote in message
news:3cf7a4ff@10.1.10.29...
>
> "Tim Overbay" <luhar@neverendingsoftware.com> wrote:
> >Weak weak weak.
> >
> >It seems to me like Rob just took care of re-creating that particular VB6
> >shortcut for ya. VBc has enjoyed many years of third-party component
> >development and the same thing will happen with VB.NET.
>
> That's great! Now all I have to do to replace existing VB6 functionality
> is scavenge code from people like Rob or write it myself!
>
> >
> >How many "non-trivial" apps have you written in VB6 without any
third-party
> >components or calls to the API?
> >
>
> I didn't have to copy/paste code from the 3rd party components. I made
very
> few API calls.
>
>
-
Re: App Object (fixes)
Michael Bennett <mikey0131@mac.com> wrote:
>In article <3cf79705$1@10.1.10.29>, jlsglynn@hotmail.com says...
><snip>
>
>> I do know that once I get it to .NET it will be better architected
>> and will have fewer lins of code. I'm guessing it will approach about
half
>> as many lines of code, with added functionality. That is what having a
large
>> framework behind you can provide.
>
>I'm curious, why will it be better architected?
>Will it be due to VB.NET/VB6 differences or re-design?
>
>Michael
One of the biggest benefits is the ability to inherit. Not just from classes
that you create but from the framework itself. I've been building controls
for internal use that would have been difficult to do in VB6 but in .NET
is an afternoons worth of work. There are a lot of other reasons, things
like the framwork contains more functionality that will lead to cleaner design
etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|