Mshflexgrid not appearing in VBA "additional components" - vba

I've registered Mshflexgrid and refer to it in VBA references, using Windows 64bits.
Unfortunately, I can't see it in the additional controls (no message). In other 64 bits desktops and in VB6 (in my computer), the component appears in additional controls.

The issue was with Office64. I downgraded to Office32, and it works now. Nothing to do with the OS itself.

Related

Placement of windows from another app inside of MS Word

My question is how to place a window belonging to our win32 application inside of MS Word, when Word has been set as the parent of that window using Windows API SetParent(HandleOfMyWindow, HandleOfWord).
The background of my question is that we have lots of code built around a system where we have installed a macro in Word that when started from a button on the ribbon sends a message to our app to tell it to create a given window and show it inside of Word. This window can then insert text etc. into Word by using Word as a OLE Automation server. This has worked fine for the most part for many years. It still is, but occasionally the window is displayed far out of the visible area of Word. For example it can be 900 pixels to the right of the right edge of Word. It can often be found by making Word very wide across multiple monitors. The problem is only there on multi monitor systems. It is often affected by how our app and Word is placed on the monitors. It might also be affected by what monitors is set as the main monitor.
Our app is made using Delphi creating standard win32 exe's. The problem might have gotten worse after we started using VCL Styles.
I have tried placing our window using Windows API SetBounds and SetWindowPos, just the top and left properties of the form, and some other things. It just never pops up where I think my code is telling it to. Most of the time it is visible and all is well, but still at another position than I set. I just can figure out any system to where it is placed.
However, when writing this I found something that might be relevant, but still no solution:
https://en.delphipraxis.net/topic/4882-a-big-and-very-strange-bug-with-high-dpi-vcl-style-and-form-constraints/
From SetParent documentation: "Unexpected behavior or errors may occur if hWndNewParent and hWndChild are running in different DPI awareness modes."

Visual Studio 2013 form control alignment issue on Windows 8

I created a Windows application in VS 2013 on W7. It's running great and no issue but recently I bought a new W8 laptop and tried to run the application on W8. All my controls are misaligned and some overlap. AutoScaleMode is set to Font for each form.
Examples:
It's not Windows 8 that's the problem, but a higher DPI setting.
The best option would be to switch over to WPF, but the problem can be mitigated with some care. You might consider a TableLayoutPanel for this application (it looks table-ish to me).
If you can't/won't use a layout panel, set the AutoScaleMode property of your form (and other containers, like Panels) to Font. If that doesn't work, try Dpi. See the MSDN page on that enum for more information.
Further StackOverflow reading (or "works cited"): "Creating a DPI-Aware Application" and "How to control the font DPI in a .NET WinForms app"

Windows-8 & Internet Explorer-10 broke my ActiveX control drawing?

I am experiencing a very weird behavior while running my Active-X control on “Windows 8” OS, and browser “Microsoft Internet-Explorer 10”.
The control:
My Active-X control is very stable product that my company is already distributing for several years between hundreds of happy customers. The control is an ATL custom-draw control, written in C++, and built with “Visual Studio 2008”.
The problem – the drawing disappears:
While I press the link that opens my control for the first time, I can see that my control is being painted gradually (as my data loading is sometimes slow), but eventually all the drawing disappears, leaving a blank white background color where the controls is located.
Using ‘Spy++’ I can see that my control is really there, but all its painting disappear.
If I move the browser or change its size the control will be re-painted, but otherwise it is simply not visible.
I tried to debug this problem and find out who is erasing my drawing.
I came up with the following technique:
Using WinDBG I added breakpoints at ‘user32.dll’ DLL on the following methods: user32!InvalidateRect, user32!InvalidateRgn, user32!FillRect,
I defined these methods to only show stack and continue with to run,
I ran the above problematic scenario,
When the problem happens I am trying to view who called ‘Invalidate’ or ‘FillRect’,
Since all this happens very quickly I am using the ‘Print Screen’ button to freeze the moment
After doing this several times I find that exactly at the time my control disappears the following stack calls ‘user32!FillRect’:
user32!FillRect
MSHTML!memcpy+0x9805
MSHTML!COmWindowProxy::SwitchMarkup+0x468
MSHTML!CMarkup::SetInteractiveInternal+0x428
MSHTML!CMarkup::RequestReadystateInteractive+0x98
MSHTML!CMarkup::BlockScriptExecutionHelper+0xde
MSHTML!CHtmPost::Exec+0x794
MSHTML!CHtmPost::Run+0x1c
MSHTML!PostManExecute+0x5f
MSHTML!PostManResume+0x7b
MSHTML!CHtmPost::OnDwnChanCallback+0x3a
MSHTML!CDwnChan::OnMethodCall+0x19
MSHTML!GlobalWndOnMethodCall+0x169
MSHTML!GlobalWndProc+0xd7
user32!InternalCallWinProc+0x23
user32!UserCallWinProcCheckWow+0x100
user32!DispatchMessageWorker+0x3ef
user32!DispatchMessageW+0x10
IEFRAME!CTabWindow::_TabWindowThreadProc+0x981
IEFRAME!LCIETab_ThreadProc+0x378
iertutil!CIsoWinMsg::PostQueuedMessagesToComponent+0x4b
IEShims!NS_CreateThread::DesktopIE_ThreadProc+0x66
KERNEL32!BaseThreadInitThunk+0xe
ntdll!__RtlUserThreadStart+0x72
ntdll!_RtlUserThreadStart+0x1b
This is consistent.
When examining this stack I found that this message belongs to a window of class Internet Explorer_Hidden, which is window of size zero (0x0), but with a WS_VISIBLE style. This window belongs to the browser.
Does anyone know this phenomenon?
Is it possible that the browser hidden window is causing this problem?
Could you recommend on other approach to try and hunt the stack that is erasing my drawing?
Many thanks for any hint!
Paz Offer
Conclusion:
The bug was in Microsoft Internet Explorer 10
I used Microsoft Support service to farther investigate this problem. Enclosed here are the findings:
Microsoft Support viewed the version of my IE (Internet Explorer) and suggested to first upgrade IE to its latest patch.
As it happens, the machine I was working on was not setup to be automatically updated by the Windows Update service for some time. As part of upgrading IE I had to first update windows using Windows Update service to its latest patches.
During the process of Windows Update the Microsoft Internet Explorer 10 was automatically updated to its latest patch.
Once IE updated the problem disappeared.
In addition, the ActiveX GUI load process became much faster.
The old version of Microsoft Internet Explorer 10, which caused the problem:
Version: 10.0.9200.16384
Update Versions: RTM (KB2718695)
The new version of Microsoft Internet Explorer 10, which solved the problem:
Version: 10.0.9200.16635
Update Versions: 10.0.7 (KB2846071)
Now all is working as expected.
Thanks, Pazo

where i can find input panel, i can't find it in toolbox?

I want to handle SIP. So i have gone through the article http://www.christec.co.nz/blog/archives/42
. I don't find Microsoft.WindowsCE.Forms.dll in the references. Then i downloaded the dll and tried to add it to the project, then it gives an error that it can't be added because its not build in Microsoft.Phone.Runtime environment.
So how can i get the dll and input panel.
That dll is for Windows CE, which is NOT the same as Windows Phone 7. The SIP for WP7 is handled by the operating system and is displayed automatically when a text input control receives focus (TextBox, PasswordBox, etc).
There is an article that discusses creating a Bulgarian keyboard, but it requires a custom input control, too.

How can I include Flash in VB.NET?

I would like to create a .exe wrapper for a Flash Player using VB.NET. I am having a few problems.
1.I seem to remember being able to import Flash Player as a control into Visual Studio (2008 Pro). For some reason, I can't seem to VS to import it anymore. (I tried using the OCX from Visual Studio) Perhaps I'm looking for the wrong file. What file am I looking for?
2.Is including Flash inside of a VB program legal?
3.When a control is included in a VB.NET program (such as Flash) does the control need to be distributed in a separate file, or will the compiled application contain it in the ".exe"?
Thanks.
edit:
I was able to import the control as the Flash10b.ocx from c:\Windows\System32\Macromed directory as a COM component. Question 2 and 3 still remain.
Edit 2:
Is there documentation on the ActiveX control? I am trying top figure out the API for ExternalInterface. Any tips on that?
Using flash inside a VB program is perfectly legal, it is just an activeX control.
You will need to distribute the interop library with your application (it will be in your output directory) and the ActiveX object (flash10b.ocx) will need to be installed on the system, it wont package it all up for you.