Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Public Form Classes

1 view
Skip to first unread message

DanS

unread,
Dec 29, 2009, 9:24:21 AM12/29/09
to
We (unfortunately) had an outside source write a utility app. (This is
the one using the Telnet session I asked about previously.)

The guy wrote a class that wraps the Winsock control utilizing.......

"Private WithEvents Socket As MSWinsockLib.Winsock" at the top of the
class....I'll call it clsROS.

Now here's the question......

There is a login form, and a GUI configuration form. You use the login
form, and when successfully logged in, the GUI config forms shows.

The login form has a privately dim'd clsROS on it.

The GUI form has a public dim'd clsPOS on it.

The order of operations is....

1) The connection is made in the Login form clsROS.
2) The GUI form is loaded.
3) Then there's a call to set the GUI's (public) clsROS = Login Form
clsROS, which (sort of) hands over the TCP/IP connection to the GUI form
so the same connection is being used (?).
4) The Login form is then unloaded.

What effect does the unloading of the referenced class have on the GUI
form who's Public clsROS was set to the one with the form that was just
unloaded ?

(I'm hoping my description makes sense.)

Larry Serflaten

unread,
Dec 29, 2009, 9:53:37 AM12/29/09
to

"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote

> The login form has a privately dim'd clsROS on it.
>
> The GUI form has a public dim'd clsPOS on it.
>
> The order of operations is....
>
> 1) The connection is made in the Login form clsROS.
> 2) The GUI form is loaded.
> 3) Then there's a call to set the GUI's (public) clsROS = Login Form
> clsROS, which (sort of) hands over the TCP/IP connection to the GUI form
> so the same connection is being used (?).
> 4) The Login form is then unloaded.
>
> What effect does the unloading of the referenced class have on the GUI
> form who's Public clsROS was set to the one with the form that was just
> unloaded ?

What effect? Literally, nothing.

Provided:

A: clsPOS was a typo in the second sentence above, and that you meant they
each had a variable - of the same type - (clsROS)

B: After the hand-off and before the login form unloads, the clsROS variable
in the login form is set to Nothing.


For A, you can easily confirm that in your next post, and for B, that's more
of a 'good practices' suggestion rather than allowing VB to de-reference the
private variable as the form unloads.

The object is allocated on the heap, everybody and their dog can latch on
and release, until the cows come home. What matters is the last one to let go.
At that point the allocation on the heap is allowed to be re-claimed.

(So to speak)
HTH
LFS


Bob Butler

unread,
Dec 29, 2009, 9:56:48 AM12/29/09
to

"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF05FD382423th...@216.196.97.131...

> We (unfortunately) had an outside source write a utility app. (This is
> the one using the Telnet session I asked about previously.)
>
> The guy wrote a class that wraps the Winsock control utilizing.......
>
> "Private WithEvents Socket As MSWinsockLib.Winsock" at the top of the
> class....I'll call it clsROS.

bad idea; declaring an instance of a control without using the actual
control is asking for trouble. If I remember right this may not run on all
systems.

> Now here's the question......

<cut>


> What effect does the unloading of the referenced class have on the GUI
> form who's Public clsROS was set to the one with the form that was just
> unloaded ?

none, the object exists until the last reference is released so the main
GUI's reference to the class keeps the class alive even if the login form's
reference is released afterwards.

BTW, unloading a form is not enough to release module-level variables
anyway. Depending on how the form was instantiated and/or if a "set
loginform=nothing" happens after the unload then the login form may be
terminating and that WILL release module-level variables. Even if that
happens it won't affect objects that are still referenced by something else;
it'll just reduce their reference counts.


Ralph

unread,
Dec 29, 2009, 10:02:49 AM12/29/09
to

"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF05FD382423th...@216.196.97.131...

VB uses reference-counting to determine the lifetime of any object assigned
to it. In general an object will stay "alive" as long as there is a
reference (and that reference is still in 'scope') to it.

I'm not sure I full understand the scenario, but the Form carrying a
reference to a live object might prove problematic if the Form is only
"unloaded".

-ralph


DanS

unread,
Dec 29, 2009, 10:19:55 AM12/29/09
to
>> What effect does the unloading of the referenced class have on the
>> GUI form who's Public clsROS was set to the one with the form that
>> was just unloaded ?
>
> What effect? Literally, nothing.
>
> Provided:
>
> A: clsPOS was a typo in the second sentence above, and that you meant
> they
> each had a variable - of the same type - (clsROS)
>
> B: After the hand-off and before the login form unloads, the clsROS
> variable
> in the login form is set to Nothing.
>
>
> For A, you can easily confirm that in your next post,

Yes, this was a typo.


> and for B,
> that's more of a 'good practices' suggestion rather than allowing VB
> to de-reference the private variable as the form unloads.

No, the clsROS is not set to nothing before unloading the form.

I wasn't sure what happened when the form is unloaded.

Is it just the winsock object that is kept (not destroyed), or the form
as well ?

> The object is allocated on the heap, everybody and their dog can latch
> on and release, until the cows come home. What matters is the last
> one to let go. At that point the allocation on the heap is allowed to
> be re-claimed.
>
> (So to speak)

(As a note, I've read all the responses, and all info contained was duly
noted. Thank you.)

I really wish I would have done this project myself. I'm supposed to be
maintaining it though when it's finally handed over.......

The whole thing is unreadable spaghetti code. Objects not set to nothing,
I found the keyword END being used in at least 3 different places, and to
top it all off, the author used virtually no indentation at all in the
source code, which makes it even harder to read than it already is, and
absolutely no REM's, anywhere to describe anything he's doing.

Sheesh !!!!

Thanks in advance,

DanS


DanS

unread,
Dec 29, 2009, 11:27:13 AM12/29/09
to

> (As a note, I've read all the responses, and all info contained was
> duly noted. Thank you.)
>
> I really wish I would have done this project myself. I'm supposed to
> be maintaining it though when it's finally handed over.......
>
> The whole thing is unreadable spaghetti code. Objects not set to
> nothing, I found the keyword END being used in at least 3 different
> places, and to top it all off, the author used virtually no
> indentation at all in the source code, which makes it even harder to
> read than it already is, and absolutely no REM's, anywhere to describe
> anything he's doing.
>
> Sheesh !!!!

It's much worse now...........I was just instructed that I now own this
project and have been instructed to 'pretty it up' and 'if there's any
functionality that needs to be tweaked'.

@#*(&(*)&)( !!!!!!! ())(*@$)(_!_++_#@()#*_ !!!!!!!

I wonder if the bosses definition of 'pretty it up' and the other statement
could possibly mean scrap it and start from scratch.

Bob Butler

unread,
Dec 29, 2009, 11:37:50 AM12/29/09
to

"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF0693FC8D44th...@216.196.97.131...
<cut>

> No, the clsROS is not set to nothing before unloading the form.
>
> I wasn't sure what happened when the form is unloaded.
>
> Is it just the winsock object that is kept (not destroyed), or the form
> as well ?

Your login form has a reference to the class which has a reference to the
winsock control (if I understood the description correctly)

Your main form also gets a reference to that same class

The login form is unloaded which destroys the GUI protion of that form but
the reference to the class with the winsock remains intact. Depending on
how the login form was instantiated it may be released immediately after the
unload, in which case the reference to the class is also released, or it may
not be released until the app terminates. You'd have to put a breakpoint in
the login form's Form_Terminate event or review the way it is created to
determine that.

Either way, the main form retains a reference to the class so that stays
alive and the reference it holds to the winsock control also remains alive.

<cut>


> The whole thing is unreadable spaghetti code. Objects not set to nothing,
> I found the keyword END being used in at least 3 different places,

in which case anything still alive is just abruptly terminated without a
chance for normal cleanup. Getting rid of the END statements should be a
priority.

> and to
> top it all off, the author used virtually no indentation at all in the
> source code, which makes it even harder to read than it already is, and
> absolutely no REM's, anywhere to describe anything he's doing.

Been there. Don't buy anything from this guy again!


Nobody

unread,
Dec 29, 2009, 11:54:07 AM12/29/09
to
"Bob Butler" <no...@nospam.ever> wrote in message
news:uztlWdJi...@TK2MSFTNGP05.phx.gbl...

>
> "DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
> news:Xns9CF05FD382423th...@216.196.97.131...
>> We (unfortunately) had an outside source write a utility app. (This is
>> the one using the Telnet session I asked about previously.)
>>
>> The guy wrote a class that wraps the Winsock control utilizing.......
>>
>> "Private WithEvents Socket As MSWinsockLib.Winsock" at the top of the
>> class....I'll call it clsROS.
>
> bad idea; declaring an instance of a control without using the actual
> control is asking for trouble. If I remember right this may not run on
> all systems.

True mostly for MS controls. Some third party controls allow this like
SocketWrench freeware(require Windows 2000+). There is an article about
MSWinsock control about this very issue:

Visual Basic Winsock control run-time error 429 and scalability
http://support.microsoft.com/kb/313984

Basically this method works only if you have VB6 itself installed on the
target machine.


Nobody

unread,
Dec 29, 2009, 11:56:26 AM12/29/09
to
Besides what others suggested, in MSDN library, search by title the
following topics:

Life Cycle of Visual Basic Forms
Object References and Reference Counting
Understanding Control Lifetime and Key Events


C. Kevin Provance

unread,
Dec 29, 2009, 11:56:53 AM12/29/09
to
"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF074A86DAC6th...@216.196.97.131...

| It's much worse now...........I was just instructed that I now own this
| project and have been instructed to 'pretty it up' and 'if there's any
| functionality that needs to be tweaked'.
|
| @#*(&(*)&)( !!!!!!! ())(*@$)(_!_++_#@()#*_ !!!!!!!
|
| I wonder if the bosses definition of 'pretty it up' and the other
statement
| could possibly mean scrap it and start from scratch.

I'm envious. Those kinds of projects are my favourite. :-)


Tom Shelton

unread,
Dec 29, 2009, 12:00:37 PM12/29/09
to

I always hated the winsock control. I did all my tcp/ip stuff in VB6 using
classes I wrote that used the raw winsock api.

--
Tom Shelton

DanS

unread,
Dec 29, 2009, 12:05:10 PM12/29/09
to
> True mostly for MS controls. Some third party controls allow this like
> SocketWrench freeware(require Windows 2000+). There is an article about
> MSWinsock control about this very issue:
>
> Visual Basic Winsock control run-time error 429 and scalability
> http://support.microsoft.com/kb/313984
>
> Basically this method works only if you have VB6 itself installed on the
> target machine.

Great !!!!!! Another thing to fix.

Fix may equal re-write from scratch.

DanS

unread,
Dec 29, 2009, 12:07:28 PM12/29/09
to
"C. Kevin Provance" <*@*.*> wrote in news:uqOdqfKiKHA.1460
@TK2MSFTNGP06.phx.gbl:

I'd e-mail you the project, but I don't think *@*.* is a valid e-mail
address !!!!!!

Nobody

unread,
Dec 29, 2009, 12:28:38 PM12/29/09
to
"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF07B17EB7EBth...@216.196.97.131...

I would put the control on the main form and move the class declaration and
its events to the main form, and let frmLogin call methods of the main form.
frmLogin is probably only make one request, and therefore the main form only
need to expose one method(DoLogin). This is easier to fix than it seems.

DanS

unread,
Dec 29, 2009, 12:46:15 PM12/29/09
to
"Nobody" <nob...@nobody.com> wrote in
news:ud8iuxKi...@TK2MSFTNGP04.phx.gbl:

Uh..........that part.....maybe.

But I don't know wtf this person was thinking. At first I was told
there's two socket connections made.....

The first connection is made, that one is 'handed over' to the second
form, and then *another* connection is made that actually does the telnet
session.

The first connection is then used to make sure the device is still there.
They've got a timer spitting out a cr/lf on the 1st connection every 20
seconds expecting *some* data to be returned. This continues on even
after the second connection is made, the actual telnet session.

For the life of me, I don't understand why this was done like this...it's
a pretty lame design.

And....and.....to top it all off, netstat -a shows me *3* active telnet
connections to the device, and not 2.

I may be spending my holiday weekend locked in a room rewriting this
entire thing.

f!


Regards,

DanS

Larry Serflaten

unread,
Dec 29, 2009, 12:50:34 PM12/29/09
to

"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote

> I wasn't sure what happened when the form is unloaded.
>
> Is it just the winsock object that is kept (not destroyed), or the form
> as well ?

As Bob points out, it depends.

For starters, the winsock is tied to the class. It was my understanding that it
was the class reference that you were passing around. I guess I assumed that
it 'did the right thing' in handling the winsock (released it when closing down)
so that the winsock object followed what the class did.

Still, just 'unloading' a form does not remove it from memory. The variable
must also be set to Nothing, or left to fall out of scope (where VB sets it
to Nothing).

If the form is called up by its default name, then it will never fall out of
scope and will hang around until your app closes. (ex: Form1.Show)

If the form is called up using a procedure level variable, and then unloaded,
the variable will fall out of scope at the end of the procedure:

Sub Main()
Dim login As frmLogIn
Dim AppUI As frmAppUI

Set login = New frmLogIn
login.Show vbModal
If login.Sucessful Then
Set AppUI = New frmAppUI
Set AppUI.ROS = login.ROS ' the hand-off
AppUI.Show
End If

End Sub

At the end of the log in session (because login was shown modally)
the login form will unload but hang around in memory. That is why
public variables or public functions (to return ROS) are still possible.

At the end of the Main subroutine the login variable falls out of scope
and its resources reclaimed, including the release of the private ROS
object. The AppUI (public) ROS variable then becomes the sole
survivor holding on to the original ROS object.

On a side note, notice that the AppUI variable will also fall out of
scope at the end of the Main procedure. Suffice it to say that there
is a hidden object (window) still referencing the visible form, even
if your program can't access it.

The rise and fall of forms is somewhat 'behind the magic curtain',
but once you fully understand the lifecycle of an object, it all more
or less falls into place.

To track the coming and going of forms (in and out of memory)
add debug statements to the Initialize and Terminate events which
are provided for just that sort of notification.

Good luck on your new project, remember to save and back up
your work, often....

HTH
LFS


DanS

unread,
Dec 29, 2009, 1:47:14 PM12/29/09
to
"Larry Serflaten" <serf...@usinternet.com> wrote in

>> I wasn't sure what happened when the form is unloaded.
>>
>> Is it just the winsock object that is kept (not destroyed), or the
>> form as well ?
>
> As Bob points out, it depends.
>
> For starters, the winsock is tied to the class. It was my
> understanding that it was the class reference that you were passing
> around.

Yes, it was/is the class reference being passed. I misspoke when I said
winsock object, as it's included ikn the class. But the winsock object's
got to go now too, according to the MSDN link posted by Nobody. (Or just
attached to a form somewhere.)

> I guess I assumed that it 'did the right thing' in handling
> the winsock (released it when closing down) so that the winsock object
> followed what the class did.

<SNIP>

>
> Good luck on your new project, remember to save and back up
> your work, often....

Thank you. Typically, I save just prior to hitting the run button in the
IDE, every time.

C. Kevin Provance

unread,
Dec 29, 2009, 2:07:14 PM12/29/09
to
"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF07B7BC8D41th...@216.196.97.131...

| "C. Kevin Provance" <*@*.*> wrote in news:uqOdqfKiKHA.1460
| @TK2MSFTNGP06.phx.gbl:
|
| I'd e-mail you the project, but I don't think *@*.* is a valid e-mail
| address !!!!!!

I didn't say I'd do it for free. :P


Bob Butler

unread,
Dec 29, 2009, 3:17:03 PM12/29/09
to

"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF08C65A98ECth...@216.196.97.131...

> "Larry Serflaten" <serf...@usinternet.com> wrote in
<cut>

> Thank you. Typically, I save just prior to hitting the run button in the
> IDE, every time.

if you do that then you may as well go to tools / options / environment and
select the option to save changes whenever the app is run

C. Kevin Provance

unread,
Dec 29, 2009, 3:45:06 PM12/29/09
to
"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF05FD382423th...@216.196.97.131...

| We (unfortunately) had an outside source write a utility app. (This is
| the one using the Telnet session I asked about previously.)
|
| The guy wrote a class that wraps the Winsock control utilizing.......
|
| "Private WithEvents Socket As MSWinsockLib.Winsock" at the top of the
| class....I'll call it clsROS.
|

Just to toss my two cents in:

Some time back I found someone elses project on the web called vbSendMail
(which is awesome, BTW) which I whittled down to use internally. It's an AX
DLL, but had one hidden form with the Winsock control. I didn't care for
that and attempted the exact same thing you are trying to do here, with the
reference. It didn't work out so well. Not so much because of dist issues,
but functioality. In the end I kept the form/control thing. It wasn't
worth the hassle.

The alternative was to go straight Winsock API which as you probably know
can get complicated.

If possible, I would stick with the winsock control, and if more than one is
needed, go with making it a control array. Just my thought, or what I would
do. :-)

- Kev


JPB

unread,
Dec 29, 2009, 3:55:18 PM12/29/09
to
On Dec 29, 10:19 am, DanS

<t.h.i.s.n.t.h....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:
> top it all off, the author used virtually no indentation at all in the
> source code, which makes it even harder to read than it already is

Hopefully you haven't started manually indenting yet - There's a good
free add-on called SmartIndenter that can do this for you
automatically. You can get it from here:

http://www.oaltd.co.uk/Indenter/IndentFrm.htm

DanS

unread,
Dec 29, 2009, 4:17:04 PM12/29/09
to
"C. Kevin Provance" <*@*.*> wrote in news:ugMOgoLiKHA.1652
@TK2MSFTNGP05.phx.gbl:

I didn't necessarily think you would, I was just showing my desire to not
work on this........

....now I'm wondering how many $1000's the company paid for this !!!!!

DanS

unread,
Dec 29, 2009, 4:18:15 PM12/29/09
to
JPB <jasonpe...@gmail.com> wrote in news:65b64e17-0132-46c4-8027-
11e8a6...@n31g2000vbt.googlegroups.com:

Thanks, I'll have a look.

DanS

unread,
Dec 29, 2009, 4:22:03 PM12/29/09
to
"C. Kevin Provance" <*@*.*> wrote in
news:eClvLfMi...@TK2MSFTNGP06.phx.gbl:

I usually use either the winsock control, or the VB winsock class I've
used elsewhere that can be found around the net.

Any and all constructive input is always appreciated.

Thanks.

DanS

C. Kevin Provance

unread,
Dec 29, 2009, 4:48:01 PM12/29/09
to

It's kevin.at.tpasoft.com (remove dots as needed)

I'll take a look at it and see if it's salvagable (versus a rewrite)...if
you want.

- Kev

"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message

news:Xns9CF0A5CDA21AEth...@216.196.97.131...

DanS

unread,
Dec 29, 2009, 7:57:22 PM12/29/09
to
"C. Kevin Provance" <*@*.*> wrote in
news:etVMVDNi...@TK2MSFTNGP05.phx.gbl:

>
> It's kevin.at.tpasoft.com (remove dots as needed)
>
> I'll take a look at it and see if it's salvagable (versus a
> rewrite)...if you want.
>
> - Kev

Thanks, but I've already started working on the rewrite. It's absolutely
necessary.

Let's see how it goes...........

Thanks for your time,

DanS

Paul Clement

unread,
Dec 30, 2009, 1:40:22 PM12/30/09
to
On Tue, 29 Dec 2009 18:57:22 -0600, DanS <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:

� "C. Kevin Provance" <*@*.*> wrote in


� news:etVMVDNi...@TK2MSFTNGP05.phx.gbl:

� >
� > It's kevin.at.tpasoft.com (remove dots as needed)
� >
� > I'll take a look at it and see if it's salvagable (versus a
� > rewrite)...if you want.
� >
� > - Kev

� Thanks, but I've already started working on the rewrite. It's absolutely
� necessary.

� Let's see how it goes...........

� Thanks for your time,

� DanS

I you're going to re-write it why not use .NET? That is, unless you want to re-write it again a few
years from now.


Paul
~~~~
Microsoft MVP (Visual Basic)

C. Kevin Provance

unread,
Dec 30, 2009, 1:53:46 PM12/30/09
to
"Paul Clement" <UseAdddressA...@swspectrum.com> wrote in message
news:ba7nj555f7crihfbm...@4ax.com...

| I you're going to re-write it why not use .NET? That is, unless you want
to re-write it again a few
| years from now.

Here come the .Nxt trolls. Just waiting in the shadows with your hand on
your wank, eh Paul?

Problem is, if he uses .Nxt, he will have to write it again in a few years
when MSFT breaks backwards compatibility between Flamework versions.


mayayana

unread,
Dec 30, 2009, 2:01:44 PM12/30/09
to

>
> Thanks, but I've already started working on the rewrite. It's absolutely
> necessary.
>

As long as you're rewriting why not use Windows
sockets directly and cut out the control dependency?
Or you can use a class that mimics the control:

http://www.koders.com/noncode/fid8F45DF43059FCEE77CD99F26786B8A6696CC5E88.as
px

If you use that I think you'll also need
http://www.koders.com/vb/fid943F2756BB30A4AAF783E322D25B13088D13302D.aspx


Tom Shelton

unread,
Dec 30, 2009, 2:32:44 PM12/30/09
to

First I must say, that I think your advice to the OP to use the winsock control
sucked - but I kept quite. I used to do a lot of network programming in VB5/6
and if there is one thing I can tell you - unless your doing really simple
stuff, the winsock control bites. Using the raw api is not that hard...

Now, for the .NET part of my response :) I don't care if the OP continues to
use VB6, and I agree that Paul probably shouldn't have even brought it up. I
imagine the OP is probably not in a postition to change tools - and even if he
is he may not want to for what ever presonal reasons he may have. Cool.

But, I have to ask you - how often in the last 10 years do you think code
writen against one version of the framework hasn't worked on a new version?
The answer ALMOST NEVER. So, what makes you think that will be the case in
the next 10 years?

--
Tom Shelton

DanS

unread,
Dec 30, 2009, 2:36:45 PM12/30/09
to
Paul Clement <UseAdddressA...@swspectrum.com> wrote in
news:ba7nj555f7crihfbm...@4ax.com:

> On Tue, 29 Dec 2009 18:57:22 -0600, DanS
> <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:
>
> � "C. Kevin Provance" <*@*.*> wrote in
> � news:etVMVDNi...@TK2MSFTNGP05.phx.gbl:
> �
> � >
> � > It's kevin.at.tpasoft.com (remove dots as needed)
> � >
> � > I'll take a look at it and see if it's salvagable (versus a
> � > rewrite)...if you want.
> � >
> � > - Kev
> �
> � Thanks, but I've already started working on the rewrite. It's
> absolutely � necessary.
> �
> � Let's see how it goes...........
> �
> � Thanks for your time,
> �
> � DanS
>
> I you're going to re-write it why not use .NET?

Do you want a list ? .......

(Rhetorical question.)

The short answer is.......because it's got to be done 2 months ago....

......and I don't have time to re-learn everything I thought I've known for
the last 10 years.

If I *did* have the time, I'd more likely modify the programming of the
device to be browser configurable, than to learn .N for this.

At least that way, it would be platform independant as just another browser
app.

Or, I'd learn to program Java so it's cross-platform.......

Or, I'd try out & learn RealBasic which is supposed to cross-compile
intrinsic code and controls into Windows binaries, Linux binaries, and MAC
binaries with a minimum amount of OS specific mods to the source code.

.N would be my last choice.


Tom Shelton

unread,
Dec 30, 2009, 2:52:53 PM12/30/09
to
On 2009-12-30, DanS <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:
> Paul Clement <UseAdddressA...@swspectrum.com> wrote in
> news:ba7nj555f7crihfbm...@4ax.com:
>
>> On Tue, 29 Dec 2009 18:57:22 -0600, DanS
>> <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:
>>
>> � "C. Kevin Provance" <*@*.*> wrote in
>> � news:etVMVDNi...@TK2MSFTNGP05.phx.gbl:
>> �
>> � >
>> � > It's kevin.at.tpasoft.com (remove dots as needed)
>> � >
>> � > I'll take a look at it and see if it's salvagable (versus a
>> � > rewrite)...if you want.
>> � >
>> � > - Kev
>> �
>> � Thanks, but I've already started working on the rewrite. It's
>> absolutely � necessary.
>> �
>> � Let's see how it goes...........
>> �
>> � Thanks for your time,
>> �
>> � DanS
>>
>> I you're going to re-write it why not use .NET?
>

<snip>

> Or, I'd learn to program Java so it's cross-platform.......
>

http://www.mono-project.com

C# (and VB.NET) are also cross platform. And yes, I do use mono for lots of
little linux utilities all the time.

Still... Good luck on the project - though, I would have misgivings about
using the winsock control. I've been looking over the suggestion mayanna
made, and it looks like a decent alternative.

--
Tom Shelton

Paul Clement

unread,
Dec 30, 2009, 3:29:05 PM12/30/09
to
On Wed, 30 Dec 2009 13:53:46 -0500, "C. Kevin Provance" <*@*.*> wrote:

� "Paul Clement" <UseAdddressA...@swspectrum.com> wrote in message

� news:ba7nj555f7crihfbm...@4ax.com...
� | I you're going to re-write it why not use .NET? That is, unless you want
� to re-write it again a few
� | years from now.

� Here come the .Nxt trolls. Just waiting in the shadows with your hand on
� your wank, eh Paul?

Sorry Kev, but I would never recommend an application re-write using a demised development platform.
That is, unless time constraints and lack of knowledge with respect to an alternative were critical.
In that case, there's never enough time to do it right but I guess plenty of time to do it over
later on.

� Problem is, if he uses .Nxt, he will have to write it again in a few years

� when MSFT breaks backwards compatibility between Flamework versions.

LOL! Ignorance is bliss. If you spent half as much time attacking those who mention .NET and applied
that extra time to learning something new, it might actually sound like you knew what you were
talking about. ;-)

C. Kevin Provance

unread,
Dec 30, 2009, 3:42:43 PM12/30/09
to
TL;DR.

Why not just a link to a page with a canned response.

Troll.

"Tom Shelton" <tom_s...@comcastXXXXXXX.net> wrote in message
news:uSiSdbYi...@TK2MSFTNGP06.phx.gbl...

C. Kevin Provance

unread,
Dec 30, 2009, 3:43:40 PM12/30/09
to
Any excuse to be a troll. You have to realize by now your credibility in
this forum is $hit.

Troll.


"Paul Clement" <UseAdddressA...@swspectrum.com> wrote in message

news:hgcnj59plvkolo4fr...@4ax.com...

Paul Clement

unread,
Dec 30, 2009, 3:51:17 PM12/30/09
to
On Wed, 30 Dec 2009 13:36:45 -0600, DanS <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:

� > I you're going to re-write it why not use .NET?



� Do you want a list ? .......

� (Rhetorical question.)

� The short answer is.......because it's got to be done 2 months ago....

� ......and I don't have time to re-learn everything I thought I've known for
� the last 10 years.

� If I *did* have the time, I'd more likely modify the programming of the
� device to be browser configurable, than to learn .N for this.

� At least that way, it would be platform independant as just another browser
� app.

� Or, I'd learn to program Java so it's cross-platform.......

� Or, I'd try out & learn RealBasic which is supposed to cross-compile
� intrinsic code and controls into Windows binaries, Linux binaries, and MAC
� binaries with a minimum amount of OS specific mods to the source code.

� .N would be my last choice.

Ouch. Well a re-write is the best opportunity to at least choose a platform that has a future (even
if it isn't .NET).

Of course platform independence becomes somewhat of a pipe dream because the Winsock implementation
will be different regardless of whether you choose a cross-platform language. So, it probably
doesn't matter whether you use different development tools.

As you implied, true platform independence for the device would probably require a built in web
server utility of some sort.

C. Kevin Provance

unread,
Dec 30, 2009, 3:50:36 PM12/30/09
to
"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9CF194CE8CF82th...@216.196.97.131...

| .N would be my last choice.

As it should be, considering the bloat and weak performance. I used to use
the awsome little alarm clock utility as I was too busy to write my own. It
was a freeware little VB6 app. Then recently the dev decided to rewrite in
.Nxt. Now it's a slow, buggy POS that was no where near as reliable as the
VB6 version. To make it worse, the dude started charging for the .Nxt
version.

I wrote the guy and said I would have gladly paid for the VB6 version and
that the move. Nxt ruined what was a great app. He actually *agreed* with
me, but as with all VB6 devs realized too late what a POS .Nxt is. He
wanted a more "modern" look. I advised him how he could accomplish the same
look with VB6 in 1/4 of the code and none of the crappy Lamework. So we'll
see what we see.

That said, Delphi is also a great alternative. The learning curve from VB
is no where near as nasty as .Nxt.


C. Kevin Provance

unread,
Dec 30, 2009, 3:51:40 PM12/30/09
to
|
| http://www.mono-project.com
|
| C# (and VB.NET) are also cross platform. And yes, I do use mono for lots
of
| little linux utilities all the time.
|
| Still... Good luck on the project - though, I would have misgivings about
| using the winsock control. I've been looking over the suggestion mayanna
| made, and it looks like a decent alternative.

He's not going to be brainwashed Tom. Go spank someplace else.

Troll


Tom Shelton

unread,
Dec 30, 2009, 3:53:32 PM12/30/09
to
On 2009-12-30, C. Kevin Provance <*@*.*> wrote:
> TL;DR.
>
> Why not just a link to a page with a canned response.
>
> Troll.

As I thought, no answer except ignorance. Have a good day Kevin.

--
Tom Shelton

Tom Shelton

unread,
Dec 30, 2009, 4:01:12 PM12/30/09
to

I have made no attempt to convert him to .NET - though, I did point out that
it is cross platform.

My advice was to use mayayanna's suggestion over your sucky advice to use the
ever so crappy winsock control.

--
Tom Shelton

Tom Shelton

unread,
Dec 30, 2009, 4:05:31 PM12/30/09
to
On 2009-12-30, C. Kevin Provance <*@*.*> wrote:
> "DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
> news:Xns9CF194CE8CF82th...@216.196.97.131...
>| .N would be my last choice.
>
> As it should be, considering the bloat and weak performance. I used to use
> the awsome little alarm clock utility as I was too busy to write my own. It
> was a freeware little VB6 app. Then recently the dev decided to rewrite in
> .Nxt. Now it's a slow, buggy POS that was no where near as reliable as the
> VB6 version. To make it worse, the dude started charging for the .Nxt
> version.
>

What is the name of the utility - I would like to take a look at it.

--
Tom Shelton

Paul Clement

unread,
Dec 30, 2009, 4:15:41 PM12/30/09
to
On Wed, 30 Dec 2009 15:43:40 -0500, "C. Kevin Provance" <*@*.*> wrote:

� Any excuse to be a troll. You have to realize by now your credibility in

� this forum is $hit.

� Troll.

Sorry, I didn't realize that you were the "assigner of credibility" in this newsgroup. Did someone
give you badge or a certificate for that? Is it stamped on your forehead or maybe as a tattoo on
your arm so that you can be appropriately identified? ;-)

If my posts do not help or interest you, you are free to ignore them. Whining about it does not set
a good example of credibility.

Ralph

unread,
Dec 30, 2009, 4:29:58 PM12/30/09
to
DanS wrote:
>>
>> I you're going to re-write it why not use .NET?
>
> Do you want a list ? .......
>

Ha.

Makes you wonder where the dotNet-er's heads are at.

I can understand their childish enthusiasm and zeal, and their sense of
calling to be an evangelist, but you don't see them in a LAMP, J2EE, PHP, or
Delphi, or Java, or whatever forums. It is only here they feel compeled to
preach.

Basically it comes from a very real feeling of disdain and disrepect. Sight
unseen you are essentially dumber than they are and it gives them a real
lift to point that out - to their own satisfaction - without regard for your
situation.

I had a brother-in-law like that. When I was newly married and just starting
out, every time I had trouble with cars or appliances, his response was
always the same - with the same smug look - "Why don't you just buy a new
one?" lol

If they only took the time to listen to themselves, but they never do.

-ralph


mayayana

unread,
Dec 30, 2009, 7:59:49 PM12/30/09
to
> My advice was to use mayayanna's suggestion over your sucky advice to use
the
> ever so crappy winsock control.
>

It's a shame that vbip.com closed down. The
proprietor of that site (and author of the code)
was pretty much the only person dealing in
Internet code for VB. When I needed to write
SMTP emailing code, and http downloading code,
I used the vbip code as guidance. I never tried
the winsock control, but as far as I can tell it doesn't
add any convenience -- just more VB-friendly
operations.

I find it very odd that there's so much emphasis
on the Internet, and many Internet-related operations
are fairly simple, yet code samples and docs are rare.


mayayana

unread,
Dec 30, 2009, 8:06:58 PM12/30/09
to
> That said, Delphi is also a great alternative. The learning curve from VB
> is no where near as nasty as .Nxt.
>

Going OT again, but I'm still thinking about
something from a thread last week. I had posted
a link to the Register article about the past decade
for MS. Among the comments at "El Reg" there were
several mentions of Lazarus. It looks interesting
and I was curious. I downloaded the package to
take a look. I'm curious what anyone else may know
about Lazarus. It appears the help docs have to
be compiled, which I take to be a very inauspicious
sign that the whole thing may just be open source
geek nonsense...but I'm hesitant to just dismiss it.
The trouble is it takes a lot of work looking at a
new tool just to figure out whether it's something
that I *might* want to look at.


mayayana

unread,
Dec 30, 2009, 8:21:28 PM12/30/09
to

> Basically it comes from a very real feeling of
> disdain and disrepect.

Or in some cases from self-doubt. I find in
watching my own mind that when I have a
strong vested interest in affecting another
person's view it's generally characterized by
a certain vehemence, and that vehemence is
in proportion to my own uncertainty. I'm really
trying to erase my own doubts.

Tom Shelton

unread,
Dec 30, 2009, 10:21:14 PM12/30/09
to

I have played with Lazarus off and on. To be honest, I just can't get into
the pascal syntax. Still, it seems to be a decent tool. Though, I don't know
of any serious Linux applications that have been created using it...

The vast majority of popular Linux apps are C and C++. The rest seem to be a
smattering of python, Java, and yes - C#.

--
Tom Shelton

mayayana

unread,
Dec 31, 2009, 10:18:51 AM12/31/09
to

> I have played with Lazarus off and on. To be honest, I just can't get
into
> the pascal syntax. Still, it seems to be a decent tool. Though, I don't
know
> of any serious Linux applications that have been created using it...
>
> The vast majority of popular Linux apps are C and C++. The rest seem to
be a
> smattering of python, Java, and yes - C#.
>

I was thinking of it for Windows, not as a
cross-platform tool. I think it can be used to
create native executables on both platforms.

So maybe Lazarus could be a worthwhile time
investment for an eventual move to Linux. But if
I were currently moving
to Linux that would be a whole other issue. As
I understand it you do server-side programming
professionally? So Linux is naturally part of your
work interest? If I were moving to Linux it would
be because I've finally given up on anything
from Microsoft. I've nothing against Linux. I just
need a reason to go through all that work. If/when
that time comes I'd also need to think about what I
want from a PC. What might justify such a massive
undertaking?

The shareware market has dried up. Few people
pay for web design. Google has reduced the Internet
to little more than a shopping mall and TV set
combo. I recently discovered the horror of
"Farmville" -- an in-law is addicted to it! It's not
the promising world of computing that enthused me
a decade ago, where hoardes of people were creating
sites to post anything they thought might be useful
to others. It's a globalized, retail diddling joint where,
at the same time, my local restaurant and hardware
store still don't know how to put up a useful website,
and I can't even manage to see the local Staples Sunday
paper ad flier at my local newspaper's website. (While
the Staples site itself is a morass of unnecessary
javascript.) They can't even make the ads easy to find. :)

I guess that's all going a bit off-track, but I think
about those things when I think about the time and
effort needed to learn new tools... The whole landscape
keeps changing so quickly.

Tom Shelton

unread,
Dec 31, 2009, 11:43:07 AM12/31/09
to
On 2009-12-31, mayayana <mayaX...@rcXXn.com> wrote:
>
>> I have played with Lazarus off and on. To be honest, I just can't get
> into
>> the pascal syntax. Still, it seems to be a decent tool. Though, I don't
> know
>> of any serious Linux applications that have been created using it...
>>
>> The vast majority of popular Linux apps are C and C++. The rest seem to
> be a
>> smattering of python, Java, and yes - C#.
>>
>
> I was thinking of it for Windows, not as a
> cross-platform tool. I think it can be used to
> create native executables on both platforms.
>

LOL... You know, I didn't even know that it worked on windows. I've only
played with it on Linux :) So, it could be worth while there I guess - but
what advantage would it have over Delphi (other the cost)?

> So maybe Lazarus could be a worthwhile time
> investment for an eventual move to Linux. But if
> I were currently moving
> to Linux that would be a whole other issue. As
> I understand it you do server-side programming
> professionally?

I do anything I get paid to do. Currently, I mainly do middle tier/data tier
work, but that's not 100%. My next project is an excel addin (VSTO).

> So Linux is naturally part of your
> work interest?

Not at the current employer - no. IBM AIX :) I run linux at home simply
because it is useful. Most of my carrer has really been spend in mixed
windows/*nix environments - so, I do feel fairly comfortable in a Unix
environment. I would never claim to be an expert - but, I know how to get
around and how to find out what I need to know to get my jobs done :)

> If I were moving to Linux it would
> be because I've finally given up on anything
> from Microsoft. I've nothing against Linux. I just
> need a reason to go through all that work. If/when
> that time comes I'd also need to think about what I
> want from a PC. What might justify such a massive
> undertaking?

It's not that massive an undertaking from a user perspective. It is a bit
more so from a developer perspective. That's why languages like python, java,
and again c# are gaining some traction over the traditional C/C++ on linux.
They generally work across most linux distributions - not so with C/C++
programs.

>
> The shareware market has dried up. Few people
> pay for web design. Google has reduced the Internet
> to little more than a shopping mall and TV set
> combo. I recently discovered the horror of
> "Farmville" -- an in-law is addicted to it!

Right now, the hot items seem to be social media apps (such as farmville -
lol). Those little games are tied to advertising, etc, and are making good
money. I've actually been thinking about doing something with that, as there
is a .NET facebook sdk.

Another thing would be smart phone development - particulary the iphone. But
to develop for that you have to have a mac and you have to learn
objective-c... I don't mind learning a new langauge/sdk - but, I'm not sure I
want to buy a mac :)

I have also been looking into Android development. For that, well it's Java,
C++ or a combination of both. If you do pure Java work, then you can do it on
Windows. But, if you are going to be doing any C++ stuff (likely), well the
recommendation is to use Linux as your dev platform - at least for now.

These seem to be the current hot items :)

> It's not
> the promising world of computing that enthused me
> a decade ago, where hoardes of people were creating
> sites to post anything they thought might be useful
> to others. It's a globalized, retail diddling joint where,
> at the same time, my local restaurant and hardware
> store still don't know how to put up a useful website,
> and I can't even manage to see the local Staples Sunday
> paper ad flier at my local newspaper's website. (While
> the Staples site itself is a morass of unnecessary
> javascript.) They can't even make the ads easy to find. :)
>
> I guess that's all going a bit off-track, but I think
> about those things when I think about the time and
> effort needed to learn new tools... The whole landscape
> keeps changing so quickly.

That's the way this industry has always been. If it wasn't, I might still be
using VB...

--
Tom Shelton

C. Kevin Provance

unread,
Dec 31, 2009, 12:27:26 PM12/31/09
to
| I do anything I get paid to do.

You've proved that time and again. In the real world, we call that a whore.


Tom Shelton

unread,
Dec 31, 2009, 1:01:39 PM12/31/09
to
On 2009-12-31, C. Kevin Provance <*@*.*> wrote:
>| I do anything I get paid to do.
>
> You've proved that time and again. In the real world, we call that a whore.

LOL... FOAD.

--
Tom Shelton

mayayana

unread,
Dec 31, 2009, 7:16:17 PM12/31/09
to

> what advantage would it have over Delphi (other the cost)?
>

Good question. I really don't know much
about any of these things.


> >
> > The shareware market has dried up. Few people
> > pay for web design. Google has reduced the Internet
> > to little more than a shopping mall and TV set
> > combo. I recently discovered the horror of
> > "Farmville" -- an in-law is addicted to it!
>
> Right now, the hot items seem to be social media apps (such as farmville -
> lol). Those little games are tied to advertising, etc, and are making
good
> money. I've actually been thinking about doing something with that, as
there
> is a .NET facebook sdk.
>
> Another thing would be smart phone development - particulary the iphone.
>

Yes, but that seems to be a repeat of the shareware
market. I've seen various articles like this...

http://www.macworld.com/article/143627/2009/11/paid_apps.html

...indicating that there's a lot more enthusiasm
than there is money in phone software.

Tom Shelton

unread,
Dec 31, 2009, 7:59:04 PM12/31/09
to

On 2010-01-01, mayayana <mayaX...@rcXXn.com> wrote:
>
>> what advantage would it have over Delphi (other the cost)?
>>
>
> Good question. I really don't know much
> about any of these things.
>

On windows, I just don't see any advantage really. Lazarus is a developing
clone of Delphi. So, it seems to me that unless you just want to play with
language... And, I believe there is a free version of Delphi for that - I
know there used to be.

>
>> >
>> > The shareware market has dried up. Few people
>> > pay for web design. Google has reduced the Internet
>> > to little more than a shopping mall and TV set
>> > combo. I recently discovered the horror of
>> > "Farmville" -- an in-law is addicted to it!
>>
>> Right now, the hot items seem to be social media apps (such as farmville -
>> lol). Those little games are tied to advertising, etc, and are making
> good
>> money. I've actually been thinking about doing something with that, as
> there
>> is a .NET facebook sdk.
>>
>> Another thing would be smart phone development - particulary the iphone.
>>
>
> Yes, but that seems to be a repeat of the shareware
> market. I've seen various articles like this...
>
> http://www.macworld.com/article/143627/2009/11/paid_apps.html
>
> ...indicating that there's a lot more enthusiasm
> than there is money in phone software.

Could be - which is why I'm leaning more towards andorid dev. I already know
the languages involved and the tools are free :) The only real investement is
time to learn the sdk and the platform.

--
Tom Shelton

Karl E. Peterson

unread,
Jan 8, 2010, 6:27:23 PM1/8/10
to
DanS explained on 12/29/2009 :
>>> What effect does the unloading of the referenced class have on the
>>> GUI form who's Public clsROS was set to the one with the form that
>>> was just unloaded ?
>>
>> What effect? Literally, nothing.
>>
>> Provided:
>>
>> A: clsPOS was a typo in the second sentence above, and that you meant
>> they each had a variable - of the same type - (clsROS)
>
> Yes, this was a typo.

Freudian slip, it sounds more like. <g>

--
.NET: It's About Trust!
http://vfred.mvps.org


Karl E. Peterson

unread,
Jan 8, 2010, 6:41:05 PM1/8/10
to

mayayana formulated the question :

Yeah, they need to feel like they made the right choice. You don't
even see the C# folks behaving the same way the Freddites do. The
latter are pretty damned convinced they bet on a losing horse, and
gotta take it out on someone. Naturally, they blame us because were it
not for "the resistence" their horse would've won. So they think, at
any rate. So little do they know.

mayayana

unread,
Jan 9, 2010, 10:14:06 AM1/9/10
to
>
> Yeah, they need to feel like they made the right choice. You don't
> even see the C# folks behaving the same way the Freddites do. The
> latter are pretty damned convinced they bet on a losing horse, and
> gotta take it out on someone. Naturally, they blame us because were it
> not for "the resistence" their horse would've won. So they think, at
> any rate. So little do they know.
>

Then again, the race isn't over yet. Once Hailstorm,
SPOT watches and Windows Mobile have had a chance
to get established, you might have to eat your words.
:)


DanS

unread,
Jan 11, 2010, 8:04:29 AM1/11/10
to
>>> Provided:
>>>
>>> A: clsPOS was a typo in the second sentence above, and that you meant
>>> they each had a variable - of the same type - (clsROS)
>>
>> Yes, this was a typo.
>
> Freudian slip, it sounds more like. <g>

Could have been !!

0 new messages