Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1556 > unrolled thread

Strange Win 7 behavior using ComDlg32.OCX

Started by-mhd <not_real@invalid.com>
First post2012-09-02 16:34 -0400
Last post2015-01-08 18:20 -0500
Articles 20 — 7 participants

Back to article view | Back to comp.lang.basic.visual.misc


Contents

  Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-02 16:34 -0400
    Re: Strange Win 7 behavior using ComDlg32.OCX "CoderX" <coder@x.com> - 2012-09-02 19:00 -0400
      Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-02 20:16 -0400
        Re: Strange Win 7 behavior using ComDlg32.OCX "Eduardo" <mm@mm.com> - 2012-09-03 08:44 -0300
          Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-04 21:00 -0400
            Re: Strange Win 7 behavior using ComDlg32.OCX Karl E. Peterson <karl@exmvps.org> - 2012-09-05 14:29 -0700
              Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-05 18:41 -0400
                Re: Strange Win 7 behavior using ComDlg32.OCX Karl E. Peterson <karl@exmvps.org> - 2012-09-05 16:15 -0700
                  Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-05 21:33 -0400
    Re: Strange Win 7 behavior using ComDlg32.OCX "Mayayana" <mayayana@invalid.nospam> - 2012-09-03 08:50 -0400
      Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-04 20:50 -0400
        Re: Strange Win 7 behavior using ComDlg32.OCX "Mayayana" <mayayana@invalid.nospam> - 2012-09-04 22:29 -0400
          Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-05 00:02 -0400
    Re: Strange Win 7 behavior using ComDlg32.OCX "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-09-05 11:05 +0100
      Re: Strange Win 7 behavior using ComDlg32.OCX Karl E. Peterson <karl@exmvps.org> - 2012-09-05 14:24 -0700
      Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-05 18:36 -0400
      Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-13 12:12 -0400
        Re: Strange Win 7 behavior using ComDlg32.OCX -mhd <not_real@invalid.com> - 2012-09-13 14:50 -0400
          Re: Strange Win 7 behavior using ComDlg32.OCX justineclin@gmail.com - 2015-01-08 14:22 -0800
            Re: Strange Win 7 behavior using ComDlg32.OCX "Mayayana" <mayayana@invalid.nospam> - 2015-01-08 18:20 -0500

#1556 — Strange Win 7 behavior using ComDlg32.OCX

From-mhd <not_real@invalid.com>
Date2012-09-02 16:34 -0400
SubjectStrange Win 7 behavior using ComDlg32.OCX
Message-ID<7uf74813tpaeqrtk9ujae8gd191sbbnvmt@4ax.com>
I have written an Outlook addin that uses ComDlg32.OCX to pop the Font dialog. 

A few (very few) users report that when they click the button to pop the font
dialog all they see is a flicker or flash indicating something happened but no
dialog is presented. It seems they are all Win 7 users and I believe mostly
using Outlook version 2010.

I had been using the API method sample code from Randy Birch's
http://vbnet.mvps.org/ when I initially got the bug reports and decided to
switch to the common dialog ocx in case I wasn't implementing the API method
properly. Same result - same people with the original problem.

Using ComDlg32 Version 6.01.9816

'get hDC
Printer.Print
With CommonDialog1
   .hDC = Printer.hDC
   .flags = cdlCFBoth Or cdlCFEffects
   .CancelError = True
   .ShowFont
End With
Printer.KillDoc
If Err = cdlCancel Then Exit Sub
With CommonDialog1
   AddrText.FontName = .FontName
   AddrText.FontSize = .FontSize
and so on...

In my Inno script I install the file using the following (ignore the linebreak)
Source: c:\vbfiles\sp6\ComDlg32.OCX; DestDir: {sys}; Flags: restartreplace
sharedfile regserver

Any ideas?

Thanks -mike

[toc] | [next] | [standalone]


#1557

From"CoderX" <coder@x.com>
Date2012-09-02 19:00 -0400
Message-ID<k20oef$5gi$1@dont-email.me>
In reply to#1556
FWIW, I've been using the API version from vbAccelerator for years, and 
works under w7.  www.vbaccelerator.com


"-mhd" <not_real@invalid.com> wrote in message 
news:7uf74813tpaeqrtk9ujae8gd191sbbnvmt@4ax.com...
I have written an Outlook addin that uses ComDlg32.OCX to pop the Font 
dialog.

A few (very few) users report that when they click the button to pop the 
font
dialog all they see is a flicker or flash indicating something happened but 
no
dialog is presented. It seems they are all Win 7 users and I believe mostly
using Outlook version 2010.

I had been using the API method sample code from Randy Birch's
http://vbnet.mvps.org/ when I initially got the bug reports and decided to
switch to the common dialog ocx in case I wasn't implementing the API method
properly. Same result - same people with the original problem.

Using ComDlg32 Version 6.01.9816

'get hDC
Printer.Print
With CommonDialog1
   .hDC = Printer.hDC
   .flags = cdlCFBoth Or cdlCFEffects
   .CancelError = True
   .ShowFont
End With
Printer.KillDoc
If Err = cdlCancel Then Exit Sub
With CommonDialog1
   AddrText.FontName = .FontName
   AddrText.FontSize = .FontSize
and so on...

In my Inno script I install the file using the following (ignore the 
linebreak)
Source: c:\vbfiles\sp6\ComDlg32.OCX; DestDir: {sys}; Flags: restartreplace
sharedfile regserver

Any ideas?

Thanks -mike 

[toc] | [prev] | [next] | [standalone]


#1558

From-mhd <not_real@invalid.com>
Date2012-09-02 20:16 -0400
Message-ID<iht74852oid4vq49u67rc9tro8btmcs9os@4ax.com>
In reply to#1557
"CoderX" <coder@x.com> wrote:

>FWIW, I've been using the API version from vbAccelerator for years, and 
>works under w7.  www.vbaccelerator.com

I have many users on Win7 as well and I have Win7 for testing and don't get the
issue either which is what baffles me. However there have been enough users
reporting the problem I can't write it off as some random hosed system issue.

-mike

[toc] | [prev] | [next] | [standalone]


#1559

From"Eduardo" <mm@mm.com>
Date2012-09-03 08:44 -0300
Message-ID<k2256h$fqv$1@speranza.aioe.org>
In reply to#1558
"-mhd" <not_real@invalid.com> escribió en el mensaje
news:iht74852oid4vq49u67rc9tro8btmcs9os@4ax.com...
"CoderX" <coder@x.com> wrote:

> >FWIW, I've been using the API version from vbAccelerator for years, and
> >works under w7.  www.vbaccelerator.com

> I have many users on Win7 as well and I have Win7 for testing and don't
> get the
> issue either which is what baffles me. However there have been enough
> users
> reporting the problem I can't write it off as some random hosed system
> issue.

Do you know whether it was on Windows 7 32 bits or 64 bits or other 
information that
could help to identify the environment that is causing the problem?


[toc] | [prev] | [next] | [standalone]


#1562

From-mhd <not_real@invalid.com>
Date2012-09-04 21:00 -0400
Message-ID<ff8d481msccg6sdhvhiu429frjlupofopi@4ax.com>
In reply to#1559
"Eduardo" <mm@mm.com> wrote:

>"-mhd" <not_real@invalid.com> escribió en el mensaje
>news:iht74852oid4vq49u67rc9tro8btmcs9os@4ax.com...
>"CoderX" <coder@x.com> wrote:
>
>> >FWIW, I've been using the API version from vbAccelerator for years, and
>> >works under w7.  www.vbaccelerator.com
>
>> I have many users on Win7 as well and I have Win7 for testing and don't
>> get the
>> issue either which is what baffles me. However there have been enough
>> users
>> reporting the problem I can't write it off as some random hosed system
>> issue.
>
>Do you know whether it was on Windows 7 32 bits or 64 bits or other 
>information that
>could help to identify the environment that is causing the problem?
>
>

I have gone through all support emails and best I can determine it happens with
both 32bit and 64bit versions of windows 7.

Also Outlook 10 seems to be the common host for my addin as well.

I have gone back to an all API method again using Karl Peterson's code
http://vb.mvps.org/samples/Dialogs/

I also removed the flag for printer fonts so it can't be blamed on offline
printers.

Same users report nothing has changed on their end - just a flicker or flash
when they click the button font choose button.

I don't think the killbits issue can be involved either so I am totally
mystified.

-mike

[toc] | [prev] | [next] | [standalone]


#1567

FromKarl E. Peterson <karl@exmvps.org>
Date2012-09-05 14:29 -0700
Message-ID<k28g7m$u2l$1@dont-email.me>
In reply to#1562
-mhd submitted this idea :
> I have gone through all support emails and best I can determine it happens 
> with both 32bit and 64bit versions of windows 7.
>
> Also Outlook 10 seems to be the common host for my addin as well.

2010, you mean?  No chance it's the 64-bit version, is there?

> I have gone back to an all API method again using Karl Peterson's code
> http://vb.mvps.org/samples/Dialogs/
>
> I also removed the flag for printer fonts so it can't be blamed on offline
> printers.
>
> Same users report nothing has changed on their end - just a flicker or flash
> when they click the button font choose button.

Crap.  Well, I liked Mike's idea of a dirt-simple EXE that did nothing 
but pop the font dialog on those machines, to take Outlook out of the 
mix.

Another thought for debugging would be to use OutputDebugString to 
capture what, if any, return codes that failed dialog call is offering.

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

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

[toc] | [prev] | [next] | [standalone]


#1569

From-mhd <not_real@invalid.com>
Date2012-09-05 18:41 -0400
Message-ID<r0lf481qmshvm4h6er0uv2k4048ghqv2u5@4ax.com>
In reply to#1567
Karl E. Peterson <karl@exmvps.org> wrote:

>2010, you mean?  No chance it's the 64-bit version, is there?

No or else my 32bit addin wouldn't even load.

>Crap.  Well, I liked Mike's idea of a dirt-simple EXE that did nothing 
>but pop the font dialog on those machines, to take Outlook out of the 
>mix.
>
I have one waiting for my tester to agree to use - just waiting for a reply
before I start sending him attachments.

>Another thought for debugging would be to use OutputDebugString to 
>capture what, if any, return codes that failed dialog call is offering.

That will be the next step if I'm still not getting anywhere.

-mike

[toc] | [prev] | [next] | [standalone]


#1570

FromKarl E. Peterson <karl@exmvps.org>
Date2012-09-05 16:15 -0700
Message-ID<k28me9$5ut$1@dont-email.me>
In reply to#1569
It happens that -mhd formulated :
> Karl E. Peterson <karl@exmvps.org> wrote:
>
>> 2010, you mean?  No chance it's the 64-bit version, is there?
>
> No or else my 32bit addin wouldn't even load.

Yeah, that's what I thought.  I believe it's possible to call out of 
process, but probably not as an add-in.

>> Crap.  Well, I liked Mike's idea of a dirt-simple EXE that did nothing 
>> but pop the font dialog on those machines, to take Outlook out of the 
>> mix.
> 
> I have one waiting for my tester to agree to use - just waiting for a reply
> before I start sending him attachments.

Cool.

>> Another thought for debugging would be to use OutputDebugString to 
>> capture what, if any, return codes that failed dialog call is offering.
>
> That will be the next step if I'm still not getting anywhere.

Yeah, if the VB6 thing is popping them outside of Outlook, there's 
something pretty hinky going on.  I used to know a couple Outlook 
add-on devs, I might be able to ask if they've ever seen anything like 
that.

You probably don't know if it happens with any of the other common 
dialogs, do you?  That font one isn't used by anywhere near as many 
apps as, say, the File one.

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

[toc] | [prev] | [next] | [standalone]


#1571

From-mhd <not_real@invalid.com>
Date2012-09-05 21:33 -0400
Message-ID<34vf489sbb2jdfo9cj1f504mljlijeacmn@4ax.com>
In reply to#1570
Karl E. Peterson <karl@exmvps.org> wrote:

>It happens that -mhd formulated :
>> Karl E. Peterson <karl@exmvps.org> wrote:
>>
>>> 2010, you mean?  No chance it's the 64-bit version, is there?
>> No or else my 32bit addin wouldn't even load.
>
>Yeah, that's what I thought.  I believe it's possible to call out of 
>process, but probably not as an add-in.

True, an out of process 32bit app can still refer to the Outlook object in 64bit
Office.

>Yeah, if the VB6 thing is popping them outside of Outlook, there's 
>something pretty hinky going on.  I used to know a couple Outlook 
>add-on devs, I might be able to ask if they've ever seen anything like 
>that.

That would be nice if they could relate to any similar experience.

>You probably don't know if it happens with any of the other common 
>dialogs, do you?  That font one isn't used by anywhere near as many 
>apps as, say, the File one.

Unfortunately the Font dialog is the only one I use.

-mike

[toc] | [prev] | [next] | [standalone]


#1560

From"Mayayana" <mayayana@invalid.nospam>
Date2012-09-03 08:50 -0400
Message-ID<k22937$ots$1@dont-email.me>
In reply to#1556
>
A few (very few) users report that when they click the button to pop the 
font
dialog all they see is a flicker or flash
>

 Are you sure they have a printer installed? I once had a
program that wouldn't start at all because I was enumerating
fonts on-load. That stopped it if there was no printer
installed, with no error. I'm assuming that referencing a
printer as you've done also won't work when no printer is
installed.

   If that turns out to be the problem you might want to
switch to screen fonts. There's no reason to assume that
someone using Outlook has a printer hooked up.

[toc] | [prev] | [next] | [standalone]


#1561

From-mhd <not_real@invalid.com>
Date2012-09-04 20:50 -0400
Message-ID<vc8d485n3acu1eri24colcu4i6ejg8mct6@4ax.com>
In reply to#1560
"Mayayana" <mayayana@invalid.nospam> wrote:

>   If that turns out to be the problem you might want to
>switch to screen fonts. There's no reason to assume that
>someone using Outlook has a printer hooked up.

It's a printing app :-)

However see my follow up message I'm posting after this,

-mike

[toc] | [prev] | [next] | [standalone]


#1563

From"Mayayana" <mayayana@invalid.nospam>
Date2012-09-04 22:29 -0400
Message-ID<k26dek$u5c$1@dont-email.me>
In reply to#1561
>   If that turns out to be the problem you might want to
>switch to screen fonts. There's no reason to assume that
>someone using Outlook has a printer hooked up.

| It's a printing app :-)

Woops. Another thought might be to try running Filemon
or Procmon. There may be a clue, like an operation that
suddenly quits after failing to find a file, or something
like that.


[toc] | [prev] | [next] | [standalone]


#1564

From-mhd <not_real@invalid.com>
Date2012-09-05 00:02 -0400
Message-ID<psgd48hp6dlm4c0hle88ekdlnsala4nlpi@4ax.com>
In reply to#1563
"Mayayana" <mayayana@invalid.nospam> wrote:

>
>>   If that turns out to be the problem you might want to
>>switch to screen fonts. There's no reason to assume that
>>someone using Outlook has a printer hooked up.
>
>| It's a printing app :-)
>
>Woops. Another thought might be to try running Filemon
>or Procmon. There may be a clue, like an operation that
>suddenly quits after failing to find a file, or something
>like that.
>
>

From a quick Google I see that Procmon has replaced Filemon and Regmon

Problem is not only can I not reproduce the problem on my PC, but I also don't
have any experience with Procmon and wouldn't be able to give a willing user a
quick tutorial on setting filters. I'm not even sure if I even have a user
willing to go that far.

I've downloaded Procmon and I'll see if I can get an understanding on how to
filter only my addin dll.

-mike

[toc] | [prev] | [next] | [standalone]


#1565

From"Mike Williams" <Mike@WhiskyAndCoke.com>
Date2012-09-05 11:05 +0100
Message-ID<k2784r$op9$1@dont-email.me>
In reply to#1556
"-mhd" <not_real@invalid.com> wrote in message 
news:7uf74813tpaeqrtk9ujae8gd191sbbnvmt@4ax.com...
> I had been using the API method sample code from Randy Birch's
> http://vbnet.mvps.org/ when I initially got the bug reports and decided
> to switch to the common dialog ocx in case I wasn't implementing the
> API method properly. Same result - same people with the original
> problem.

Both the API method and the common dialog method work under Win7 here, but 
that's when using them in a standard VB6 project and not as an addin for 
Outlook. Have you tried creating a simple quick stand alone VB project which 
does nothing other than pop up the font dialog (perhaps using the API 
method) and which has no error checking and send it to your own users who 
have the problem and ask them to run it for you as a simple test. At least 
then you'll have an idea as to whether it is an Outlook problem or not.

Alternatively, how about sending a new version of your DLL (purely for test 
purposes) to the users with the problem, one in which you create a simple 
font dialog yourself in code and populate the list using EnumFontFamiliesEx, 
just to see if it works okay. Check it first at your own end of course.

Mike


[toc] | [prev] | [next] | [standalone]


#1566

FromKarl E. Peterson <karl@exmvps.org>
Date2012-09-05 14:24 -0700
Message-ID<k28fv6$skf$1@dont-email.me>
In reply to#1565
Mike Williams wrote on 9/5/2012 :
> "-mhd" <not_real@invalid.com> wrote in message 
> news:7uf74813tpaeqrtk9ujae8gd191sbbnvmt@4ax.com...
>> I had been using the API method sample code from Randy Birch's
>> http://vbnet.mvps.org/ when I initially got the bug reports and decided
>> to switch to the common dialog ocx in case I wasn't implementing the
>> API method properly. Same result - same people with the original
>> problem.
>
> Both the API method and the common dialog method work under Win7 here, but 
> that's when using them in a standard VB6 project and not as an addin for 
> Outlook. Have you tried creating a simple quick stand alone VB project which 
> does nothing other than pop up the font dialog (perhaps using the API method) 
> and which has no error checking and send it to your own users who have the 
> problem and ask them to run it for you as a simple test. At least then you'll 
> have an idea as to whether it is an Outlook problem or not.

Interesting thought!

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

[toc] | [prev] | [next] | [standalone]


#1568

From-mhd <not_real@invalid.com>
Date2012-09-05 18:36 -0400
Message-ID<ltkf48llo72qgg1e5jmpbudamgd30e2829@4ax.com>
In reply to#1565
"Mike Williams" <Mike@WhiskyAndCoke.com> wrote:

>"-mhd" <not_real@invalid.com> wrote in message 
>news:7uf74813tpaeqrtk9ujae8gd191sbbnvmt@4ax.com...
>> I had been using the API method sample code from Randy Birch's
>> http://vbnet.mvps.org/ when I initially got the bug reports and decided
>> to switch to the common dialog ocx in case I wasn't implementing the
>> API method properly. Same result - same people with the original
>> problem.
>
>Both the API method and the common dialog method work under Win7 here, but 
>that's when using them in a standard VB6 project and not as an addin for 
>Outlook. Have you tried creating a simple quick stand alone VB project which 
>does nothing other than pop up the font dialog (perhaps using the API 
>method) and which has no error checking and send it to your own users who 
>have the problem and ask them to run it for you as a simple test. At least 
>then you'll have an idea as to whether it is an Outlook problem or not.
>
>Alternatively, how about sending a new version of your DLL (purely for test 
>purposes) to the users with the problem, one in which you create a simple 
>font dialog yourself in code and populate the list using EnumFontFamiliesEx, 
>just to see if it works okay. Check it first at your own end of course.
>
>Mike
>
>

I have emailed my client who is working with me and offered him a test stand
alone project and am awaiting a reply.

-mike

[toc] | [prev] | [next] | [standalone]


#1572

From-mhd <not_real@invalid.com>
Date2012-09-13 12:12 -0400
Message-ID<m60458lu1n994e2dkflrdk6ovicj2kj05o@4ax.com>
In reply to#1565
"Mike Williams" <Mike@WhiskyAndCoke.com> wrote:

>Both the API method and the common dialog method work under Win7 here, but 
>that's when using them in a standard VB6 project and not as an addin for 
>Outlook. Have you tried creating a simple quick stand alone VB project which 
>does nothing other than pop up the font dialog (perhaps using the API 
>method) and which has no error checking and send it to your own users who 
>have the problem and ask them to run it for you as a simple test. At least 
>then you'll have an idea as to whether it is an Outlook problem or not.
>Mike


I have finally got the results back from a single tester to whom I sent the same
project modified to run outside of Outlook. This is with using the API and not
the common dialog control.

The font dialog pops just fine. Running inside Outlook it just gives a brief
flash/flicker.

I cannot Google any reference to Outlook 2010 causing this behavior to com
addins.

It only happens to a few users (that bother to tell me - maybe they just move on
to another product) and I cannot replicate the behavior on my PC. Other than
knowing it happens only with Outlook 2010 32bit running on Win 7 32 or 64 bit.

-mike

[toc] | [prev] | [next] | [standalone]


#1573

From-mhd <not_real@invalid.com>
Date2012-09-13 14:50 -0400
Message-ID<4da458lhpr2rrcdjggvtgl0n43kdrl1g43@4ax.com>
In reply to#1572
I am testing a new theory based on the fact the user saw a flicker. I pass
Me.Hwnd to the dialog function and I'm not sure what Outlook hosting my form can
do to affect that value so I changed the "Me" reference to the form name
instead. Sure would be nice if its that simple.

I guess I'll just have to wait until my user gets back to me.

-mike

[toc] | [prev] | [next] | [standalone]


#2220

Fromjustineclin@gmail.com
Date2015-01-08 14:22 -0800
Message-ID<73dbd628-8a98-4a94-aac0-de57472d0333@googlegroups.com>
In reply to#1573
On Thursday, September 13, 2012 at 2:50:04 PM UTC-4, -mhd wrote:
> I am testing a new theory based on the fact the user saw a flicker. I pass
> Me.Hwnd to the dialog function and I'm not sure what Outlook hosting my form can
> do to affect that value so I changed the "Me" reference to the form name
> instead. Sure would be nice if its that simple.
> 
> I guess I'll just have to wait until my user gets back to me.
> 
> -mike

Hi Mike,

I'm having a similar issue, except it's with an ActiveX control that should pop up the font dialog in the browser.  It was working in Windows XP with IE 6, and possibly even working in Win 7 up until this year, then it stopped working.  The symptoms are just as you described - a flash, then nothing happens.

Did you manage to come up with a solution?  I've tried all I could to no avail so far.

Regards,
Justin

[toc] | [prev] | [next] | [standalone]


#2221

From"Mayayana" <mayayana@invalid.nospam>
Date2015-01-08 18:20 -0500
Message-ID<m8n38o$bn3$1@dont-email.me>
In reply to#2220
>
On Thursday, September 13, 2012 at 2:50:04

Did you manage to come up with a solution?
>

 Who do you think you're talking to? The post you
answered is more than two years old. If you
get off of Google Groups and get a real newsreader
you could see current posts, and ask your own
question.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.basic.visual.misc


csiph-web