Sample button bar code crashes VB6

Folks

I've been wanting to add a button bar/tool bar/whatever you call it to
my utility to jazz up the interface.   Yeah, I know it's eye candy but
hey...

So I found this neat sample code which works great in the IDE.
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=71482&lngWId=1

I commissioned a set of bmp files fram a graphics person and was
happily inserting them into my program.  All works quite nicely in the
VB6 IDE.

Then I compiled it and it immediately crashes an dbrings up the VS2006
debugger.  So I downloaded a fresh copy and compiled just the sample
code.  And it crashes immediately as well.   And the clean sample code
works well in the IDE.

So how do I debug this problem?     I'll email the author but thought
I'd ask here as well.

Tony
0
Tony
6/17/2010 9:41:29 PM
vb.general.discussion 1016 articles. 0 followers. Follow

39 Replies
1613 Views

Similar Articles

[PageSpeed] 4

On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
<ttoews@telusplanet.net> wrote:
  
>Then I compiled it and it immediately crashes an dbrings up the VS2006
>debugger.  So I downloaded a fresh copy and compiled just the sample
>code.  And it crashes immediately as well.   And the clean sample code
>works well in the IDE.

And why yes I should've compiled it a while back when I first came
across this.  But it never occurred to me that something that works in
the IDE would crash when running as an exe.  

Oh well, lesson learned.

Tony
0
Tony
6/17/2010 9:47:32 PM
Tony Toews pretended :
> So how do I debug this problem?     

Executing Debuggables -- Visual Studio Magazine
http://visualstudiomagazine.com/articles/2008/11/17/executing-debuggables.aspx

Best you can do is start by trying to guess where it's blowing up, and 
sticking markers in to narrow it down.  :-(

-- 
..NET: It's About Trust!  http://vfred.mvps.org
Customer Hatred Knows No Bounds at MSFT
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org


0
Karl
6/17/2010 10:16:30 PM
On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
<ttoews@telusplanet.net> wrote:
  
>Then I compiled it and it immediately crashes an dbrings up the VS2006
>debugger.  So I downloaded a fresh copy and compiled just the sample
>code.  And it crashes immediately as well.   And the clean sample code
>works well in the IDE.

Just for grins I added a form with a single command button which calls
the demo form with all the buttons on it and made it the startup form.
When I compiled it as an exe that form displayed but as soon as the
program executed the buttonform.show command it went to the debugger
without displaying the msgbox which is the first line in the form load
event.

Tony
0
Tony
6/17/2010 10:53:20 PM
On Thu, 17 Jun 2010 15:16:30 -0700, Karl E. Peterson <karl@exmvps.org>
wrote:
  
>Tony Toews pretended :
>> So how do I debug this problem?     
>
>Executing Debuggables -- Visual Studio Magazine
>http://visualstudiomagazine.com/articles/2008/11/17/executing-debuggables.aspx
>
>Best you can do is start by trying to guess where it's blowing up, and 
>sticking markers in to narrow it down.  :-(

It blows up before the first line of code is executed.  I put a msgbox
as the first line of code in the form load event.    I saw it in the
IDE but not in the exe.

Tony
0
Tony
6/17/2010 10:53:47 PM
Tony Toews wrote on 6/17/2010 :
> On Thu, 17 Jun 2010 15:16:30 -0700, Karl E. Peterson <karl@exmvps.org>
> wrote:
>   
>> Tony Toews pretended :
>>> So how do I debug this problem?     
>> 
>> Executing Debuggables -- Visual Studio Magazine
>> http://visualstudiomagazine.com/articles/2008/11/17/executing-debuggables.aspx
>> 
>> Best you can do is start by trying to guess where it's blowing up, and 
>> sticking markers in to narrow it down.  :-(
>
> It blows up before the first line of code is executed.  I put a msgbox
> as the first line of code in the form load event.    I saw it in the
> IDE but not in the exe.

I'm not sure whether code in a sited usercontrol executes before or 
after Form_Load, but I'd suspect before.

-- 
..NET: It's About Trust!  http://vfred.mvps.org
Customer Hatred Knows No Bounds at MSFT
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org


0
Karl
6/17/2010 10:56:49 PM
On Thu, 17 Jun 2010 15:56:49 -0700, Karl E. Peterson <karl@exmvps.org>
wrote:
  
>I'm not sure whether code in a sited usercontrol executes before or 
>after Form_Load, but I'd suspect before.

Ah, so I should start my debugging in his code.  Gotcha.   That hadn't
occurred to me.

Tony
0
Tony
6/17/2010 11:05:06 PM
Tony Toews laid this down on his screen :
> On Thu, 17 Jun 2010 15:56:49 -0700, Karl E. Peterson <karl@exmvps.org>
> wrote:
>   
>> I'm not sure whether code in a sited usercontrol executes before or 
>> after Form_Load, but I'd suspect before.
>
> Ah, so I should start my debugging in his code.  Gotcha.   That hadn't
> occurred to me.

Well, it's _your_ code now, in a manner of speaking.  And your app 
didn't blow before adding it, right?  ;-)

-- 
..NET: It's About Trust!  http://vfred.mvps.org
Customer Hatred Knows No Bounds at MSFT
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org


0
Karl
6/17/2010 11:32:13 PM
On Thu, 17 Jun 2010 16:32:13 -0700, Karl E. Peterson <karl@exmvps.org>
wrote:
  
>>> I'm not sure whether code in a sited usercontrol executes before or 
>>> after Form_Load, but I'd suspect before.
>>
>> Ah, so I should start my debugging in his code.  Gotcha.   That hadn't
>> occurred to me.
>
>Well, it's _your_ code now, in a manner of speaking.  And your app 
>didn't blow before adding it, right?  ;-)

Yeah, yeah, just a brain fart on my part.

Trouble is it's 3,000+ lines of code and I'm havnig trouble narrowing
down the failing line of code.  I thought I had it but ....

Tony
0
Tony
6/17/2010 11:51:55 PM
Tony Toews wrote:
> Folks
>
> I've been wanting to add a button bar/tool bar/whatever you call it
> to my utility to jazz up the interface.   Yeah, I know it's eye
> candy but hey...
>
> So I found this neat sample code which works great in the IDE.
>
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=71482&lngWId=1
>
> I commissioned a set of bmp files fram a graphics person and was
> happily inserting them into my program.  All works quite nicely in
> the VB6 IDE.
>
> Then I compiled it and it immediately crashes an dbrings up the
> VS2006 debugger.  So I downloaded a fresh copy and compiled just
> the sample code.  And it crashes immediately as well.   And the
> clean sample code works well in the IDE.
>
> So how do I debug this problem?     I'll email the author but
> thought I'd ask here as well.

You have some answers on how to start debugging, but out of curiosity,
what is the bit depth of the BMPs you're using? If you don't discover
anything else, might you to post a hex dump of the first 64 bytes of
one of them?

I'm not suggesting they're faulty, but I've had some interesting
difficulties with BMPs that VB didn't like.

-- 
        Jim

0
Jim
6/18/2010 12:00:51 AM
On Thu, 17 Jun 2010 20:00:51 -0400, "Jim Mack" <no-uce-ube@mdxi.com>
wrote:
  
>You have some answers on how to start debugging, but out of curiosity,
>what is the bit depth of the BMPs you're using? If you don't discover
>anything else, might you to post a hex dump of the first 64 bytes of
>one of them?
>
>I'm not suggesting they're faulty, but I've had some interesting
>difficulties with BMPs that VB didn't like.

Ahh, now that;s interesting.  

However I'm not at the point of using any BMPs.  I downloaded a new
zip file and created a form with just the single user control on it.
With nothing updated or changed including adding a BMP.  So that's not
the problem at this point.

Tony
0
Tony
6/18/2010 12:05:56 AM
On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
<ttoews@telusplanet.net> wrote:
  
>So I found this neat sample code which works great in the IDE.
>http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=71482&lngWId=1

I got the following via email.

This sounds interesting. If you don't mind people seeing the source
I'll be happy to debug it here and see what I can find. I'll agree to
any nda or non-use or whatever terms you want in an email if that's
any concern. 

And I responded:

Actually I downloaded a fresh copy of the JCButton code and made a
single form which has one JCButton user control on it.    There's no
code of mine in it.

BTW to help debug things I'm using the following subroutine as msgbox
causes wierd problems at times.

Sub LogToTextFile(Comment As String)

    Open "Q:\1_vb\Code samples\a jcButton\jcbutton\log.txt" For Append
As #1    ' Open file for output.
    Write #1, Comment
    Close #1

End Sub

Tony
0
Tony
6/18/2010 1:10:27 AM
On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
<ttoews@telusplanet.net> wrote:
  
>Then I compiled it and it immediately crashes an dbrings up the VS2006
>debugger.  So I downloaded a fresh copy and compiled just the sample
>code.  And it crashes immediately as well.   And the clean sample code
>works well in the IDE.

Just for grins I'm testing the exe in other Virtual PC OSs.  In
Windows 2000 it caused Windows Explorer and Dr Watson post mortem to
crash and the OS to become unresponsive.

Hmmm, same in Windows XP including crashing Dr Watson..   Yikes.

Tony
0
Tony
6/18/2010 4:27:37 AM
On Thu, 17 Jun 2010 22:27:37 -0600, Tony Toews
<ttoews@telusplanet.net> wrote:
  
>>Then I compiled it and it immediately crashes an dbrings up the VS2006
>>debugger.  So I downloaded a fresh copy and compiled just the sample
>>code.  And it crashes immediately as well.   And the clean sample code
>>works well in the IDE.
>
>Just for grins I'm testing the exe in other Virtual PC OSs.  In
>Windows 2000 it caused Windows Explorer and Dr Watson post mortem to
>crash and the OS to become unresponsive.
>
>Hmmm, same in Windows XP including crashing Dr Watson..   Yikes.

Ok, this time a new compile and it's working just fine in Virtual PC
Windows XP.  Fully patched.  So there's something "special" about my
system which I kinda suspected as I couldn't imagine the other 22K
downloads having this problem.

<sigh>

Tony
0
Tony
6/18/2010 4:40:46 AM
On Jun 17, 9:40=A0pm, Tony Toews <tto...@telusplanet.net> wrote:
> On Thu, 17 Jun 2010 22:27:37 -0600, Tony Toews
>
> <tto...@telusplanet.net> wrote:
> >>Then I compiled it and it immediately crashes an dbrings up the VS2006
> >>debugger. =A0So I downloaded a fresh copy and compiled just the sample
> >>code. =A0And it crashes immediately as well. =A0 And the clean sample c=
ode
> >>works well in the IDE.
>
> >Just for grins I'm testing the exe in other Virtual PC OSs. =A0In
> >Windows 2000 it caused Windows Explorer and Dr Watson post mortem to
> >crash and the OS to become unresponsive.
>
> >Hmmm, same in Windows XP including crashing Dr Watson.. =A0 Yikes.
>
> Ok, this time a new compile and it's working just fine in Virtual PC
> Windows XP. =A0Fully patched. =A0So there's something "special" about my
> system which I kinda suspected as I couldn't imagine the other 22K
> downloads having this problem.
>
> <sigh>
>
> Tony

Hi Tony:

I've used this control for over a year with a few programs and never
ran into a problem.

As an interesting test here is a link to a Free program named iQ
WordPad (a ms wordpad replacement) that uses the JC Button.  I've had
hundreds of downloads and there has never been a report of this
problem.  I personally have used this on Win XP (SP3), Vista and Win 7
and it works fine.  You can download the program at:

http://www.iqprosoft.com/freedownloads.htm

See if it runs okay.

Tom
0
Shotgun
6/18/2010 4:48:06 AM
On 6/17/2010 9:48 PM, Shotgun Thom wrote:
> On Jun 17, 9:40 pm, Tony Toews<tto...@telusplanet.net>  wrote:
>> On Thu, 17 Jun 2010 22:27:37 -0600, Tony Toews
>>
>> <tto...@telusplanet.net>  wrote:
>>>> Then I compiled it and it immediately crashes an dbrings up the VS2006
>>>> debugger.  So I downloaded a fresh copy and compiled just the sample
>>>> code.  And it crashes immediately as well.   And the clean sample code
>>>> works well in the IDE.
>>
>>> Just for grins I'm testing the exe in other Virtual PC OSs.  In
>>> Windows 2000 it caused Windows Explorer and Dr Watson post mortem to
>>> crash and the OS to become unresponsive.
>>
>>> Hmmm, same in Windows XP including crashing Dr Watson..   Yikes.
>>
>> Ok, this time a new compile and it's working just fine in Virtual PC
>> Windows XP.  Fully patched.  So there's something "special" about my
>> system which I kinda suspected as I couldn't imagine the other 22K
>> downloads having this problem.
>>
>> <sigh>
>>
>> Tony
>
> Hi Tony:
>
> I've used this control for over a year with a few programs and never
> ran into a problem.
>
> As an interesting test here is a link to a Free program named iQ
> WordPad (a ms wordpad replacement) that uses the JC Button.  I've had
> hundreds of downloads and there has never been a report of this
> problem.  I personally have used this on Win XP (SP3), Vista and Win 7
> and it works fine.  You can download the program at:
>
> http://www.iqprosoft.com/freedownloads.htm
>
> See if it runs okay.
>
> Tom

The downloaded program from PSC has a bad path to a graphic file,

Line 21: Property ToolboxBitmap in AquaButton had an invalid file reference.

Fixing this by pointing it to an existing bmp fixes the problem on my XP 
SP3.

Mike
0
Mike
6/18/2010 4:53:20 AM
On Thu, 17 Jun 2010 21:48:06 -0700 (PDT), Shotgun Thom
<tmoran4511@gmail.com> wrote:
  
>I've used this control for over a year with a few programs and never
>ran into a problem.
>
>As an interesting test here is a link to a Free program named iQ
>WordPad (a ms wordpad replacement) that uses the JC Button.  I've had
>hundreds of downloads and there has never been a report of this
>problem.  I personally have used this on Win XP (SP3), Vista and Win 7
>and it works fine.  You can download the program at:
>
>http://www.iqprosoft.com/freedownloads.htm
>
>See if it runs okay.

Yup, it runs just fine on my system.  Which is even more strongly
pointing to something "special" about my system.   Or maybe my project
settings.

BTW at first glance looks like a very useful program!

Tony
0
Tony
6/18/2010 7:04:23 AM
On Thu, 17 Jun 2010 21:53:20 -0700, Mike S <mscir@yahoo.com> wrote:
  
>> Tom
>
>The downloaded program from PSC has a bad path to a graphic file,
>
>Line 21: Property ToolboxBitmap in AquaButton had an invalid file reference.
>
>Fixing this by pointing it to an existing bmp fixes the problem on my XP 
>SP3.

But I'm not seeing that message at all.'

Tony
0
Tony
6/18/2010 7:04:55 AM
On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
<ttoews@telusplanet.net> wrote:
  
>Then I compiled it and it immediately crashes an dbrings up the VS2006
>debugger.  So I downloaded a fresh copy and compiled just the sample
>code.  And it crashes immediately as well.   And the clean sample code
>works well in the IDE.

Folks

Please download the JCButton Zip file from
http://autofeupdater.com/jcbutton.htm and try compiling the project on
your own system and see if both forms are displayed and the second
form works.  Also please try the compile by Tony Toews.exe on your
system and see if it works.  Please post here or email me with the
results at tony at autofeupdater dot com.   If both exes work on your
system then I know it's something "special" about my system.

Thanks, Tony

0
Tony
6/20/2010 2:01:50 AM
Tony Toews was thinking very hard :
> On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
> <ttoews@telusplanet.net> wrote:
>   
>> Then I compiled it and it immediately crashes an dbrings up the VS2006
>> debugger.  So I downloaded a fresh copy and compiled just the sample
>> code.  And it crashes immediately as well.   And the clean sample code
>> works well in the IDE.
>
> Folks
>
> Please download the JCButton Zip file from
> http://autofeupdater.com/jcbutton.htm and try compiling the project on
> your own system and see if both forms are displayed and the second
> form works.  Also please try the compile by Tony Toews.exe on your
> system and see if it works.  Please post here or email me with the
> results at tony at autofeupdater dot com.   If both exes work on your
> system then I know it's something "special" about my system.
>
> Thanks, Tony

Tony,

The IDE version, my compiled version and your compiled version all 
worked on my system. Win7 64 Bit, 12 gig memory i7 cpu.

Norm


0
Norm
6/20/2010 3:52:13 AM
On Sat, 19 Jun 2010 20:52:13 -0700, Norm <NormF4@Spoof.com> wrote:
  
>The IDE version, my compiled version and your compiled version all 
>worked on my system. Win7 64 Bit, 12 gig memory i7 cpu.

Thanks.   Confirms my system is "special"  and that it's not VB6 but
something in the OS.  And yet why did
http://www.iqprosoft.com/freedownloads.htm work fine on my system
then?  Now I'm getting more confused.    

Are the exes identical?   If not can you email me your compiled exe?
Not that I know how to figure out why VB6 would've created a different
file.

BTW I did do a reboot in there just in case somethnig really wierd was
going one.

Tony
0
Tony
6/20/2010 6:01:58 AM
On Jun 19, 7:01=A0pm, Tony Toews <tto...@telusplanet.net> wrote:
> On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
>
> <tto...@telusplanet.net> wrote:
> >Then I compiled it and it immediately crashes an dbrings up the VS2006
> >debugger. =A0So I downloaded a fresh copy and compiled just the sample
> >code. =A0And it crashes immediately as well. =A0 And the clean sample co=
de
> >works well in the IDE.
>
> Folks
>
> Please download the JCButton Zip file fromhttp://autofeupdater.com/jcbutt=
on.htmand try compiling the project on
> your own system and see if both forms are displayed and the second
> form works. =A0Also please try the compile by Tony Toews.exe on your
> system and see if it works. =A0Please post here or email me with the
> results at tony at autofeupdater dot com. =A0 If both exes work on your
> system then I know it's something "special" about my system.
>
> Thanks, Tony

Works fine, both IDE and compiled, on XP SP3.

Tom
0
Shotgun
6/20/2010 6:06:09 AM
On Jun 19, 11:06=A0pm, Shotgun Thom <tmoran4...@gmail.com> wrote:
> On Jun 19, 7:01=A0pm, Tony Toews <tto...@telusplanet.net> wrote:
>
>
>
>
>
> > On Thu, 17 Jun 2010 15:41:29 -0600, Tony Toews
>
> > <tto...@telusplanet.net> wrote:
> > >Then I compiled it and it immediately crashes an dbrings up the VS2006
> > >debugger. =A0So I downloaded a fresh copy and compiled just the sample
> > >code. =A0And it crashes immediately as well. =A0 And the clean sample =
code
> > >works well in the IDE.
>
> > Folks
>
> > Please download the JCButton Zip file fromhttp://autofeupdater.com/jcbu=
tton.htmandtry compiling the project on
> > your own system and see if both forms are displayed and the second
> > form works. =A0Also please try the compile by Tony Toews.exe on your
> > system and see if it works. =A0Please post here or email me with the
> > results at tony at autofeupdater dot com. =A0 If both exes work on your
> > system then I know it's something "special" about my system.
>
> > Thanks, Tony
>
> Works fine, both IDE and compiled, on XP SP3.
>
> Tom- Hide quoted text -
>
> - Show quoted text -

Just zipped up compiled and sending to you via email.  Looks to be
exact same size as your test exe.

Tom
0
Shotgun
6/20/2010 6:16:02 AM
On Sat, 19 Jun 2010 23:06:09 -0700 (PDT), Shotgun Thom
<tmoran4511@gmail.com> wrote:
  
>Works fine, both IDE and compiled, on XP SP3.

And your compiled exe pukes and dies on my system.   So my OS is
somehow "special".

Thanks, Tony
0
Tony
6/20/2010 6:25:42 AM
On Sat, 19 Jun 2010 23:16:02 -0700 (PDT), Shotgun Thom
<tmoran4511@gmail.com> wrote:
  
>Just zipped up compiled and sending to you via email.  Looks to be
>exact same size as your test exe.

Yuppers.  <sigh> 

So just what (#$@ @#$#) makes my system so special?  Oh well.

Tony
0
Tony
6/20/2010 6:27:16 AM
On Jun 19, 11:27=A0pm, Tony Toews <tto...@telusplanet.net> wrote:
> On Sat, 19 Jun 2010 23:16:02 -0700 (PDT), Shotgun Thom
>
> <tmoran4...@gmail.com> wrote:
> >Just zipped up compiled and sending to you via email. =A0Looks to be
> >exact same size as your test exe.
>
> Yuppers. =A0<sigh>
>
> So just what (#$@ @#$#) makes my system so special? =A0Oh well.
>
> Tony

Interestingly, though... the iQ WordPad exe that you downloaded runs
okay on your system.  That was compiled on the same system as your
sample program.  This is truly a mystery.
0
Shotgun
6/20/2010 6:41:04 AM
On Jun 19, 11:41=A0pm, Shotgun Thom <tmoran4...@gmail.com> wrote:
> On Jun 19, 11:27=A0pm, Tony Toews <tto...@telusplanet.net> wrote:
>
> > On Sat, 19 Jun 2010 23:16:02 -0700 (PDT), Shotgun Thom
>
> > <tmoran4...@gmail.com> wrote:
> > >Just zipped up compiled and sending to you via email. =A0Looks to be
> > >exact same size as your test exe.
>
> > Yuppers. =A0<sigh>
>
> > So just what (#$@ @#$#) makes my system so special? =A0Oh well.
>
> > Tony
>
> Interestingly, though... the iQ WordPad exe that you downloaded runs
> okay on your system. =A0That was compiled on the same system as your
> sample program. =A0This is truly a mystery.

Tony...

I just recompiled substituting my version of the jcButton control.
Probably won't make a difference but worth a shot.  Just sent it to
your email.

Tom
0
Shotgun
6/20/2010 6:58:50 AM
On Sat, 19 Jun 2010 23:58:50 -0700 (PDT), Shotgun Thom
<tmoran4511@gmail.com> wrote:
  
>I just recompiled substituting my version of the jcButton control.
>Probably won't make a difference but worth a shot.  Just sent it to
>your email.

That pukes and dies as well on my system.   And it's the same size in
bytes as the other exes.

Tony
0
Tony
6/20/2010 8:13:51 AM
That guy is using an older version Paul Caton's subclasser.
If you look on PSC (look for "Paul Caton subclass"), you will somewhere 
find a newer version. Be careful to use the latest on PSC (done by Paul 
Caton, not La Volpe) there are many different versions out there.

You have to include this new subclassing code in your usercontrol 
instead of the old version.
The old version is not safe and crashes under certain circumstances.

It's maybe tricky for your to update the old subclasser in your control, 
but that's the only way for you if you want to do it yourself.
0
Boris
6/20/2010 4:21:45 PM
Also, you see this comment in the code:

'=========================================================================
'PUBLIC ROUTINES including subclassing & public button properties

' CREDITS: Paul Caton
'======================================================================================================
'Subclass handler - MUST be the first Public routine in this file. That 
includes public properties also


This is not done in the code you are using, but it has to be.


0
Boris
6/20/2010 5:06:28 PM
On Sun, 20 Jun 2010 18:21:47 +0200, "Boris P."
<bpnotvalid@nospamhotmail.com> wrote:
  
>That guy is using an older version Paul Caton's subclasser.
>If you look on PSC (look for "Paul Caton subclass"), you will somewhere 
>find a newer version. Be careful to use the latest on PSC (done by Paul 
>Caton, not La Volpe) there are many different versions out there.
>
>You have to include this new subclassing code in your usercontrol 
>instead of the old version.
>The old version is not safe and crashes under certain circumstances.
>
>It's maybe tricky for your to update the old subclasser in your control, 
>but that's the only way for you if you want to do it yourself.

Ahhh, ok, that makes a lot of sense.  Indeed as far as I could tell it
was failing at the end of the sobroutine in which the sub classing was
being executed and before another subroutine started.

Hmm, maybe I should just send your comments to the creator of the
JCButton code and let him do the work.  <smile>

I'm in no hurry to get this implemented as it's a nice to have feature
for my uttility not a must have.

Thanks a *LOT* for the tip

Tony
0
Tony
6/20/2010 6:43:08 PM
On Sun, 20 Jun 2010 19:06:28 +0200, "Boris P."
<bpnotvalid@nospamhotmail.com> wrote:
  
>Also, you see this comment in the code:
>
>'=========================================================================
>'PUBLIC ROUTINES including subclassing & public button properties
>
>' CREDITS: Paul Caton
>'======================================================================================================
>'Subclass handler - MUST be the first Public routine in this file. That 
>includes public properties also
>
>
>This is not done in the code you are using, but it has to be.

Ahhh, also even more interesting.

Tony

0
Tony
6/20/2010 6:43:36 PM
On Sun, 20 Jun 2010 18:21:47 +0200, "Boris P."
<bpnotvalid@nospamhotmail.com> wrote:
  
>That guy is using an older version Paul Caton's subclasser.
>If you look on PSC (look for "Paul Caton subclass"), you will somewhere 
>find a newer version. Be careful to use the latest on PSC (done by Paul 
>Caton, not La Volpe) there are many different versions out there.

Is this it?  	SelfSub 2.1 updates and additions. Apr 13 
Submitted on: 4/13/2006 5:34:17 PM
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=64867&lngWId=1

Thiis one is older
 Self-subclassing Controls/Forms - NO dependencies. Updated 09/10
Submitted on: 6/1/2004 4:58:34 AM By: Paul Caton  
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=54117&lngWId=1

Submitted on: 10/30/2008 4:20:34 PM
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=71308&lngWId=1
No, This one is submitted by Sujip Maharjan 

Ah, here's the one not to use
SelfSub, SelfHook, SelfCallback by Paul Caton 
Submitted on: 7/21/2007 3:58:14 PM By: LaVolpe  
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=68737&lngWId=1

Tony
0
Tony
6/20/2010 7:22:40 PM
On Sun, 20 Jun 2010 18:21:47 +0200, "Boris P."
<bpnotvalid@nospamhotmail.com> wrote:
  
>That guy is using an older version Paul Caton's subclasser.

Sure would've been nice if the JCButton author retained Paul Caton's
version info.   Grumble, grumble.

At least he prefixed all of Paul's stuff with Subclass_

Tony
0
Tony
6/20/2010 7:42:56 PM
On Sun, 20 Jun 2010 19:06:28 +0200, "Boris P."
<bpnotvalid@nospamhotmail.com> wrote:
  
>Also, you see this comment in the code:
>
>'=========================================================================
>'PUBLIC ROUTINES including subclassing & public button properties
>
>' CREDITS: Paul Caton
>'======================================================================================================
>'Subclass handler - MUST be the first Public routine in this file. That 
>includes public properties also
>
>
>This is not done in the code you are using, but it has to be.

Hmm, Paul Cato's 2006 code doesn't state that.

Tony
0
Tony
6/20/2010 7:57:53 PM
On Sun, 20 Jun 2010 18:21:47 +0200, "Boris P."
<bpnotvalid@nospamhotmail.com> wrote:
  
>It's maybe tricky for your to update the old subclasser in your control, 
>but that's the only way for you if you want to do it yourself.

As far as I can tel the JCButton sublclass and the 2006 subclass code
I found has a very different subroutine/function/class structure.
<sigh>

Tony
0
Tony
6/20/2010 7:59:53 PM
Tony Toews wrote :
> On Sat, 19 Jun 2010 20:52:13 -0700, Norm <NormF4@Spoof.com> wrote:
>   
>> The IDE version, my compiled version and your compiled version all 
>> worked on my system. Win7 64 Bit, 12 gig memory i7 cpu.
>
> Thanks.   Confirms my system is "special"  and that it's not VB6 but
> something in the OS.  And yet why did
> http://www.iqprosoft.com/freedownloads.htm work fine on my system
> then?  Now I'm getting more confused.    
>
> Are the exes identical?   If not can you email me your compiled exe?
> Not that I know how to figure out why VB6 would've created a different
> file.
>
> BTW I did do a reboot in there just in case somethnig really wierd was
> going one.
>
> Tony

Tony,

Your exe and mine are reporting 156 kb.

Norm


0
Norm
6/20/2010 9:37:03 PM
> Is this it?  	SelfSub 2.1 updates and additions. Apr 13
> Submitted on: 4/13/2006 5:34:17 PM
> http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=64867&lngWId=1

Yes, that's it.

In "\Samples\uSelfSub\Simple" you have a sample for your usercontrol.
0
Boris
6/21/2010 4:26:41 AM
On Mon, 21 Jun 2010 06:26:41 +0200, "Boris P."
<bpnotvalid@nospamhotmail.com> wrote:
  
>> Is this it?  	SelfSub 2.1 updates and additions. Apr 13
>> Submitted on: 4/13/2006 5:34:17 PM
>> http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=64867&lngWId=1
>
>Yes, that's it.
>
>In "\Samples\uSelfSub\Simple" you have a sample for your usercontrol.

Thanks. I've forwarded the URL to the JCButton programmer.

Thanks muchly.

Tony
0
Tony
6/21/2010 9:34:00 PM
On Thu, 17 Jun 2010 21:48:06 -0700 (PDT), Shotgun Thom
<tmoran4511@gmail.com> wrote:
  
>As an interesting test here is a link to a Free program named iQ
>WordPad (a ms wordpad replacement) that uses the JC Button.  I've had
>hundreds of downloads and there has never been a report of this
>problem.  I personally have used this on Win XP (SP3), Vista and Win 7
>and it works fine.  You can download the program at:
>
>http://www.iqprosoft.com/freedownloads.htm
>
>See if it runs okay.

And today it crashes.    Whereas it worked fine a week ago.

Tony
0
Tony
6/26/2010 10:52:57 PM
Reply:

Similar Artilces:

Edit a worksheet command button
Using 2003 - I have inherited a workbook that has various command buttons on the worksheets. The buttons are attached to a macro. I need to edit the buttons but I can't seem to get the button into the edit mode. How do I do that? Glen If they're commandbuttons from the Control toolbox toolbar, then show that toolbar: View|Toolbars|Control Toolbox Then click on the Design mode icon. Do the work and click on that design mode icon once more to get back to normal. "glen.e.mettler@lmco.com" wrote: > > Using 2003 - I have inherited a workbook that has various comma...

Code Check Request
Dear all, I have two tables, POs and Orders. POs represent purchase orders from our client, and Orders represent internal orders. One PO can be related to many orders. Each order has a Sales Rep (data in a different table, ID in Orders as FK). The PO number is not a unique ID in the client order data (as one PO can cover many separate client orders). Graphically, the structure looks something like this (* indicates a unique ID): POs Orders Reps Client Order ID* ORDER ID* PO Code <---------> PO NUM SALES REP ID <------- SALES REP ID* In theory, each PO...

Error Building GDI+ Sample on VC++ 6
Hi, I downloaded GDI+ for VC++ 6 and attempted to build a sample using it. Here's the relevant code snippet: #include "GDIPlusInit.h" .... GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); When I try to build this, I get the following errors: GDIPlusInit.h(39) : error C2059: syntax error : '__stdcall' GDIPlusInit.h(39) : error C2091: function returns function GDIPlusInit.h(78) : error C2146: syntax error : missing ';' before identifier 'NotificationHook' GDIPlusInit...

Why do I have to click the send/ receive button to receive my emai
fxstc <fxstc@discussions.microsoft.com> wrote: <nothing> Ask your question in the body of the message. If you haven't defined a send/receive interval Outlook has no way to automatically poll your mail server. -- Brian Tillman "Brian Tillman" wrote: > fxstc <fxstc@discussions.microsoft.com> wrote: > <nothing> > > Ask your question in the body of the message. > > If you haven't defined a send/receive interval Outlook has no way to > automatically poll your mail server. > -- > Brian Tillman > > Ok, But OE...

If you had to move from VB6...
In another thread, someone said that compared to VB Fred, VB6 was pathetic. This low attempt to turn me from my private choice of language slid off my back like water on a duck. However, it did pique my curiosity. If I had to move from VB6, which language would I choose. Which language would most resemble it in IDE, ease of coding and, yes, RAD quality. I would accept a learning curve about the same I had to go through with VB6. About a hundred hours to get a simple database program running (from picking up the course book) and about a year or two to get moderatly proficient...

Menu Bar #2
I have lost my menu bar - how can I restore it Try the XLB File fix: http://www.officearticles.com/excel/troubleshooting_microsoft_excel.htm ************ Anne Troy www.OfficeArticles.com "mtvlgl" <mtvlgl@discussions.microsoft.com> wrote in message news:5FCD3174-7F45-4C7F-A17A-732383039F8F@microsoft.com... >I have lost my menu bar - how can I restore it Can you still see your main tool bar? If you can, select VIEW, then TOOLBARS and tick the toolbars you want to display. Tool bars , when they are docked (fixed in position at top, bottom or sides of screen) can be mo...

calendar button won't display calendar
For years, I've been pressing the "calendar" button on the left pane of my outlook home page & it displayed the calendar in month form. Then, I did a search in the calendar. Now, everytime I press the "calendar" button, it displays the search page. How can I get my calendar back???? Thanks! "derekflyer" <derekflyer@discussions.microsoft.com> wrote in message news:4588BE73-A39D-4269-ABEF-F30A3A45F803@microsoft.com... > For years, I've been pressing the "calendar" button on the left pane of my > outlook home page &...

How to turn off auto fill options button?
Hi tools / options / edit untick allow cell drag & drop .... but seriously, why would you want to disable such a useful feature? Cheers JulieD "Piedvache" <Piedvache@discussions.microsoft.com> wrote in message news:94835D2C-8699-4D14-8B1E-EA16546F03B5@microsoft.com... > ...

Excel 2000 Crashes
I can open excel spreadsheets no problem. As soon as I try to change the font, or the font size, it crashes. Anyone have any ideas? Thanks Try changing to a different printer driver to see if that helps. Or maybe a different video driver???? Jeremy Ricketts wrote: > > I can open excel spreadsheets no problem. As soon as I try to change the > font, or the font size, it crashes. Anyone have any ideas? > > Thanks -- Dave Peterson It happens with any sort of formatting. Bold, change fonts, conditional formatting. I will try new drivers. Thanks "Dave Peterson&quo...

Vary Color on one data series line
On a bar graph - is it possible to have two different colors on one bar - for example the line is red up to 100% mark and after the 100% mark the line would then be green? Hi see http://peltiertech.com/Excel/Charts/ConditionalChart2.html -- Regards Frank Kabel Frankfurt, Germany Sheridan wrote: > On a bar graph - is it possible to have two different colors on one > bar - for example the line is red up to 100% mark and after the 100% > mark the line would then be green? ...

Getting an error in my xml schema editor code.
Hi, I have an xsd file like this. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="generic" elementFormDefault="qualified" targetNamespace="generic"> <xsd:element name="bookstore" type="bookstoreType"/> <xsd:complexType name="bookstoreType"> <xsd:sequence maxOccurs="unbounded"> <xsd:element name="book" type="bookType"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="bookType&q...

Filtering a subform ( command button )
Hi: I am using Access 2003 and have a form ( Form00 ) that is just plain old blank. On that form I have a subform ( Form99 ) that lists the required information from a query. What I really need to speed things up is about 10 filters. What would be perfect would be 10 command buttons each with there own filter. This way, I can hit the command filter and get the records quick and easy. Problem is that I can't get it to work for the subform. Can anyone help me with this please. TIA Consider doing it this way ---- Base Form99 on a query. Look up QueryDef in the Help file. Qu...

VBA code required.
Hello to all !! your support is required for these question. 1) i have fram having 3 option box and i need to open 2nd form after selection. rest of the option simply save the record in table. 2) the 2nd form which after selection of the first form also have 2 more option box and after selection of one that save the record and return to the 1st form. i am using in access 2007. regards, Maaz. On Fri, 14 May 2010 04:31:00 -0700, Maaz. <Maaz.@discussions.microsoft.com> wrote: You are not providing enough information. It appears on form1 your could put a ...

Some text shows in the formula bar but not in the cell.
To anyone who can help me: Occasionally I receive an Excel attachment with an e-mail were some of the text in some cells appear in the formula bar but not in the cell itself. Would greatly appreciate assitance . . . "George M." <George M.@discussions.microsoft.com> wrote in message news:20CE2E58-492B-48A7-82B9-E60B6887F703@microsoft.com... > To anyone who can help me: Occasionally I receive an Excel attachment with > an > e-mail were some of the text in some cells appear in the formula bar but > not > in the cell itself. Would greatly appreciate assitance ...

Criteria in query <> isn't working with multiple codes
I have a query and in one field I am looking for all of the codes, except 6. There are too many codes to say I only want to see these...In the criteria I have entered it as <>AB, or <>CD, etc. I have also tried going down the rows for "or" but none of this has worked. It will only work with one code. Does anyone have any suggestions or can you tell me why this isn't working? Thanks! Hi It is working, it just isn't doing what you expected. If a code is AB it is true that it is <>AB or <>CD, because it is not CD. I think you are looking for &...

Identifying the cause of Code 12 error
I'm performing some testing with an instrumented emulation platform, but my PCIe root port (intended to emulate an Intel 5500 chipset) is generating a "Code 12: Cannot find enough free resources" error in device manager. How do I identify which resources are unavailable? ....and of course, I've now found the plug and play debugging documentation. Never mind! ...

Outlook 2003 Crashes When Replying
Hi: My outlook 2003 reboots my pc when I reply to a message!!! I've already reinstalled it but stills the same. I've installed SP1 and nothing ... Any ideas?? "Hugo Tavares" <hmt@imaginew.pt> wrote in news:uVSRHucOFHA.3144 @tk2msftngp13.phx.gbl: > Hi: > > My outlook 2003 reboots my pc when I reply to a message!!! > > I've already reinstalled it but stills the same. > > I've installed SP1 and nothing ... > > Any ideas?? Have you scanned your computer for viruses and/or spyware? -- Aloha, -Ben- Ben M. Schorr, OneNote-MV...

Removing menu bar
I have a very simple program, made as a SDI application. All the interface I need are some Toolbar buttons. It is not that the menu bar does hurt. I just don't need it so I would like to remove it. (To remove the status bar was no problem but I can not find anything about the menu bar. Not even in the CREATESTRUCT structure which to me seems a good place.) Thanks for any answer Anders ============================================== m a i l : anders d o t floderus a t swipnet d o t se "Anders Floderus" <nospam@example.com> wrote in message news:3eNgd.10397$1p.8584@nnt...

Put app and icon in task bar?
I have an MFC application that I want to be able to put in the task bar as a small icon and have it pop up the dialog when selected from the task bar. This app is intended to be run from the start up menu and be minimized in the task bar along with all the other start items... Pointers on how to please... By default app goes on the task bar. Do you mean system tray (that by default appears on the bottom right of the screen)? -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "ShipHead" <GoAway@SpamBoy.com> wrote in message news:#g1K8UgEFHA.2700@TK2MSFTNGP14.phx.gbl... > I...

outlook 2003 crashes when typing into to: line
whenever i create a new message, and type into either the to:, cc:, or bcc: line to enter the email address, outlook crashes. i don't get the microsoft crash message... and i've checked the event viewer, which shows no sign of a crash.. i've already done a clean reinstall of office 2003 any ideas? ...

Shortcut keys won't work on menu bar on specific form?
Hello, I have an unusual issue that I can't seem to resolve. I have a menu bar that has short cut keys assigned to teh menu groups (&File, &Administration, &Maintenance). The shortcut keys work fine in the database window, but when i open up one form, they don't work at all. Any ideas? Thanks! Rick Hello Rick. Rick wrote: > I have an unusual issue that I can't seem to resolve. I have a > menu bar that has short cut keys assigned to teh menu groups > (&File, &Administration, &Maintenance). The shortcut keys work > fine in the database ...

Hiding the Source code In Modified Forms
Hi, We used Modifier and VBA to modify some forms is Great Plains (Rel 7.0). New text boxes and labeles were added to the form and custom code has also been written. After modifying the forms, we exported the same into a package. This was then imported at the client's place using the Customization Maintenance option and the modified forms were installed. However, we find that when some error occured in the modified forms, the control opens the code window and comes to the line in the code where the error has occured and the all the code that we have written is visible. We have wri...

Scroll Bars #2
How can I resize the vertical scroll bar to match the active cells, having deleted all unwanted rows. I foolishly wondered how many rows excel would create - however I did stop at 33,000. email me on johnrex@vodafone.net Hi Have a look here: http://www.contextures.com/xlfaqApp.html#Unused to reset the used range. If you go to Help and look for 'specifications' it'll tell you how many rows you can have!! (65536) -- Andy. "John" <anonymous@discussions.microsoft.com> wrote in message news:a8d901c4368e$14595030$a401280a@phx.gbl... > How can I resize the v...

AUTO_OPEN MSGBOX with button to perminently stop it
Im trying to create a MSGBOX in my AUTO_OPEN macro that displays message and has the YES/NO option. If Yes is pushed the MSGBOX will po up each time the workbook is opened, if NO is pushed the MSGBOX will no open again. Does anyone know a way of doing this -- Message posted from http://www.ExcelForum.com Hello One very simple but tricky way would be to place some value in a cell of your workbook (1/0 or TRUE/FALSE for example) and then test this value in your auto_open macro to choose the relevant action. HTH Cordially Pascal "LB79 >" <<LB79.1atgtr@excelforum-nospam.c...

Outlook 2003 toolbar doesn't highlight buttons.
My "New" "Reply" "Reply to all" and "Forward" buttons do not work and I can not do any of these functions. How do I reset / fix this problem? "emailbandit" <emailbandit@discussions.microsoft.com> wrote in message news:F9B0E4F2-9EAD-42E7-A33C-9C10510FD788@microsoft.com... > My "New" "Reply" "Reply to all" and "Forward" buttons do not work and I can > not do any of these functions. How do I reset / fix this problem? Did it ever work? If so, what changed on your PC between then an...