Solved

For ARK Only!

Posted on 2000-04-22
6
235 Views
Last Modified: 2010-05-02
0
Comment
Question by:mcrider
  • 4
  • 2
6 Comments
 
LVL 27

Accepted Solution

by:
Ark earned 50 total points
ID: 2742425
Hello, mcrider
I've posted my comment at that thread not because I so need points. Answering questions is some kind of sport for me <smile>. BTW, what is KISS? (I thing, last two letters is "Simple Solution", but what is first?). I agree, that when programming, you need simple solution, but sometimes you need something special (for example, using standard MsgBox/InputBox you don't need make resource file for any locale - they use system locale). And another reason I posted message - recently (during last two weeks) I've answered three same question about customizing Msg/InputBox with this alternate way of subclassing with timer. And all three times previous messages were "impossible" with advice of using ownmade forms. And all three times questionary choose this d**n KISS solution! At the third time I can not more keep silence (I'm sorry now). If you want to make your own form, why not ask about this directly?
Programming isn't my job, it' my hobby, so IMHO more interesting is to do "light" subclassing then to draw own form. Of courese, if you need to do project quickly...
BTW, my favorite VB author is(was?) Bruce McKinney. His "Hardcore VB" turn me to API programming. And it's his phrase that there is nothing impossible in VB. But even he stop his efforts with API when triing to call modeless dialogs (Find/Replace) and draw his own forms. This is the only place I don't like in his book. I've tried to do this with API for two month and still without succeses. I'm going to post this question to EE. And if you'll answer this question, I would be glad to give you as much points as I can.
Cheers
0
 
LVL 14

Author Comment

by:mcrider
ID: 2743812
Ark,

Believe it or not, (Ripley!) K.I.S.S. stands for "Keep It Simple Stupid".

I firmly believe in using API's, But I also believe that native coding also has it's place.  There are usually at least 2 different ways to do anything in VB (if not, more ;-)

The problem I find with subclassing is the way VB handles the active hook in immediate mode... I get so irritated when I'm debugging something and walk through an event where I decide I want to stop the program, then *BOOM*, VB itself crashes! If I forgot to save before I started the debug, or made changes while stepping through the program (which i do quite a bit), they're gone.

Oh well, Like I said earlier... This was just meant to give you some points for the solution you gave earlier, so... Here you go!


Cheers!®©
0
 
LVL 27

Expert Comment

by:Ark
ID: 2745309
Hi
Yes, I agreed, subclassing isn't the best thing VB can to do, but it,s very powerfull. The solution against crashes is using 3-rd party dlls (I don't like to use them). BTW, did you see/try native MS dll for debuging while process is subclassed?
Cheers
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 14

Author Comment

by:mcrider
ID: 2746365
No, haven't seen the MS dll... What's it called, and where?


Cheers!®©
0
 
LVL 27

Expert Comment

by:Ark
ID: 2746841
The DBGWPROC.DLL (Debug Object for AddressOf Subclassing) enables you to debug normally while a subclass is active without adding any unnecessary overhead to your finished product or distributing an extra component. This file is available from the Visual Basic Owner's Area at the following location;

http://www.microsoft.com/vstudio/owner/

0
 
LVL 27

Expert Comment

by:Ark
ID: 2746846
Ooops..
There is redirect there.
http://msdn.microsoft.com/vbasic/downloads/download.asp?ID=024
Cheers
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now