I have a VB6 DLL that contains a class and a number of forms. A method
of the class shows any one of the forms modally, depending on the
method arguments. The method is called from a modal form in the host
application (also VB6).
Everything works fine when the host application and DLL are run in the
VB6 IDE as a group. However, when I refer to the compiled DLL (outside
the IDE), the forms in the DLL are displayed but 'frozen' i.e. they do
not accept mouse or keyboard input. The DLL forms appear to have focus
(active title bar) and also appear to be modal as I cannot click on
the host application form(s). The only way to close a displayed DLL
form is by entering Alt+F4.
Everything also seems OK if I call the DLL method from a non-modal
form, but the form in the Host App needs to be modal as I need to
withold subsequent code until the form is unloaded.
Any help or advice would be greatly appreciated.
Steve. 8 4599
On 3 Jun 2004 08:30:30 -0700, st************@pb.com (Steve French)
wrote: I have a VB6 DLL that contains a class and a number of forms. A method of the class shows any one of the forms modally, depending on the method arguments. The method is called from a modal form in the host application (also VB6).
Everything works fine when the host application and DLL are run in the VB6 IDE as a group. However, when I refer to the compiled DLL (outside the IDE), the forms in the DLL are displayed but 'frozen' i.e. they do not accept mouse or keyboard input. The DLL forms appear to have focus (active title bar) and also appear to be modal as I cannot click on the host application form(s). The only way to close a displayed DLL form is by entering Alt+F4.
Everything also seems OK if I call the DLL method from a non-modal form, but the form in the Host App needs to be modal as I need to withold subsequent code until the form is unloaded.
Set the Main App's Form(s) to Enabled = False
This will 'withhold' code
While SomeFlag = False
WaitMessage ' API
DoEvents
Wend
You can get the declaration for WaitMessage from the downloadable API
Guide from www.AllAPI.net
HTH er*****@nowhere.com (J French) wrote in message news:<40*************@news.btclick.com>... Set the Main App's Form(s) to Enabled = False
This will 'withhold' code While SomeFlag = False WaitMessage ' API DoEvents Wend
You can get the declaration for WaitMessage from the downloadable API Guide from www.AllAPI.net
HTH
Thanks, that seems to get around the problem by using a modeless form
in the app and treating it like a modal form. However, it still
puzzles me WHY the DLL form should act like that under these
conditions. Anybody got any ideas?
Good to see us Frenches are united. (btw folks: we are NOT related...
AFAIK)
Steve French wrote: er*****@nowhere.com (J French) wrote in message news:<40*************@news.btclick.com>... Set the Main App's Form(s) to Enabled = False
This will 'withhold' code While SomeFlag = False WaitMessage ' API DoEvents Wend
You can get the declaration for WaitMessage from the downloadable API Guide from www.AllAPI.net
HTH
Thanks, that seems to get around the problem by using a modeless form in the app and treating it like a modal form. However, it still puzzles me WHY the DLL form should act like that under these conditions. Anybody got any ideas?
Good to see us Frenches are united. (btw folks: we are NOT related... AFAIK)
Isn't your problem somewhat related to the following (found earlier in this
ng, author forgotten):
"If a popup menu on a form causes the modal display of another form,
execution of the code being processed in the original popup menu halts while
the modal form is displayed. Because of this the original popup menu's code
is still "active"[, and subsequent attempts to show a popup menu in the
second form will fail]."
How are you showing your forms exactly? I use similar technique regularly,
and had not encountered this situation yet.
--
PZ
On 4 Jun 2004 03:48:35 -0700, st************@pb.com (Steve French)
wrote: er*****@nowhere.com (J French) wrote in message news:<40*************@news.btclick.com>... Set the Main App's Form(s) to Enabled = False
This will 'withhold' code While SomeFlag = False WaitMessage ' API DoEvents Wend
You can get the declaration for WaitMessage from the downloadable API Guide from www.AllAPI.net
HTH Thanks, that seems to get around the problem by using a modeless form in the app and treating it like a modal form.
It is always worth knowing that trick
However, it still puzzles me WHY the DLL form should act like that under these conditions. Anybody got any ideas?
I am not sure, but I would strongly suggest that you cut the Form in
the DLL right back down to nothing more than a CommandButton
(note: not a MsgBox - a real Form)
My instinct is that you have some sort of 'timing/sequence' problem in
the code in the DLL's Form.
While the workaround I suggested is interesting, and should be very
useful in the future, you are absolutely right - isolate the problem.
- it may turn up elsewhere - or have peculiar side effects
The first place to start hacking is in the DLL Form's Initialize Event Good to see us Frenches are united. (btw folks: we are NOT related... AFAIK)
Who knows, my bunch are Huguenots, the earliest sighting of my
ancestors is supposed to be about 1580 in Suffolk (UK)
- it is neat to be descended from someone who was too dim to spell out
their surname to immigration.
"Steve French" <st************@pb.com> wrote in message
news:6a**************************@posting.google.c om... er*****@nowhere.com (J French) wrote in message
news:<40*************@news.btclick.com>...
Thanks, that seems to get around the problem by using a modeless form in the app and treating it like a modal form. However, it still puzzles me WHY the DLL form should act like that under these conditions. Anybody got any ideas?
If you can, you might try setting up the DLL to receive a reference to
an owner form, so it can show its form using
dllFrm.Show vbModal, Owner
and the call in the main form would pass a reference to itself:
call DLL.Method(Me)
It seems like without that, the two forms don't know about each other,
and each modal form is blocking entry to the other.
Might be worth a test. er*****@nowhere.com (J French) wrote in message news:<40***************@news.btclick.com>... Good to see us Frenches are united. (btw folks: we are NOT related... AFAIK)
Who knows, my bunch are Huguenots, the earliest sighting of my ancestors is supposed to be about 1580 in Suffolk (UK) - it is neat to be descended from someone who was too dim to spell out their surname to immigration.
Well, that's also where my roots are...or just to the south in Essex (UK).
So maybe...cousin
Lots of Hugenot family names & places in this area of UK:
Towns: Layer de la Haye
Layer Breton
Tolleshunt D'Arcy
Names: Mussett (derived from De Musset)
De Wit
De'ath (NB: apostrophe)
All the names they couldn't pronounce - they called French (lol)
"Steve Gerrard" <no*************@comcast.net> wrote in message news:<oJ********************@comcast.com>... "Steve French" <st************@pb.com> wrote in message news:6a**************************@posting.google.c om... er*****@nowhere.com (J French) wrote in message news:<40*************@news.btclick.com>...
Thanks, that seems to get around the problem by using a modeless form in the app and treating it like a modal form. However, it still puzzles me WHY the DLL form should act like that under these conditions. Anybody got any ideas?
If you can, you might try setting up the DLL to receive a reference to an owner form, so it can show its form using dllFrm.Show vbModal, Owner
and the call in the main form would pass a reference to itself: call DLL.Method(Me)
It seems like without that, the two forms don't know about each other, and each modal form is blocking entry to the other.
Might be worth a test.
OK - I will give that a go too.
Steve, I don't know if you are from UK, but if so you should be in
Portugal!!
(Steven Gerrard is a particularly good soccer star who plays in the
English National team - just about to take part in (win?) the European
Championship in Portugal)
On 10 Jun 2004 01:39:51 -0700, st************@pb.com (Steve French)
wrote: er*****@nowhere.com (J French) wrote in message news:<40***************@news.btclick.com>... > >Good to see us Frenches are united. (btw folks: we are NOT related... >AFAIK) Who knows, my bunch are Huguenots, the earliest sighting of my ancestors is supposed to be about 1580 in Suffolk (UK) - it is neat to be descended from someone who was too dim to spell out their surname to immigration.
Well, that's also where my roots are...or just to the south in Essex (UK). So maybe...cousin Lots of Hugenot family names & places in this area of UK: Towns: Layer de la Haye Layer Breton Tolleshunt D'Arcy
Names: Mussett (derived from De Musset) De Wit De'ath (NB: apostrophe)
A lot of those names could be Norman
All the names they couldn't pronounce - they called French (lol)
Yes - and 'Finch' is another corruption
My lot seem to have hung around Suffolk for generations before moving
to the East End of London
- we even have some lace hanging around somewhere, woven by a Great
Grandmother 'Bonny' - another French name
Curious to be descended from 'Asylum Seekers' ... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paul |
last post by:
Hi
I'm trying to build a standalone COM exe server using Python 2.2 +
Mark Hammond's windows extensions + Py2Exe. I've built the example
linked on the Py2Exe homepage and get this error when...
|
by: vincent wehren |
last post by:
Hi,
as a small capabilities demo I coded the piece below to show how to use
Python for cgi'ing on localhost and it more or less does the trick :-).
However, I when I freeze it with py2exe,...
|
by: Mike Kent |
last post by:
I need to deploy a Python app on both SCO Unixware and old SCO Unix
boxes. We freeze the app under Unixware, and set the compatibility
flag ('elfmark -t udk') on the resulting executable. We...
|
by: Will Stuyvesant |
last post by:
Hello all,
So Zope still lives, yay. Well, I like that they use Python.
<rant>
What amazed me is they write that they "added types to the variables
and hope that it will be added to the...
|
by: Susan Bricker |
last post by:
I think I broke something. I am developing a database. I have 13
forms, so when the database window is showing the forms there are two
columns with a scroll bar on the bottom. After I open a...
|
by: droopytoon |
last post by:
Hi,
I start a new thread (previous one was "thread timing") because I have
isolated my problem.
It has nothing to do with calling unmanaged C++ code (I removed it in a
test application).
I...
|
by: elime |
last post by:
Hi all
I have a strange behaving on some PC with my DataGrid.
It only occurs on some PC, on others it works perfectly fine. ->(same
..net version installed) it's very confusing.
starting...
|
by: geowhe |
last post by:
I am writing a VB6 application that opens with a Login form that allows the user to select one of several databases. Clicking 'OK' on the Login form opens the Main form.
Something has happened...
|
by: ronnysaid |
last post by:
Hi all,
I was wondering if there is a way to get the range from the frozen panes in excel using interop v.12??
Or is there a property associated with the range indicating its frozen or not??
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |