View Issue Details

IDProjectCategoryView StatusLast Update
0007180MediaMonkey (current)Framework: Scripts/Extensionspublic2011-05-01 10:32
Status closedResolutionfixed 
Product Version4.0 
Target VersionFixed in Version4.0 
Summary0007180: Second Web Browser control on form has serious problem with Common.Anchors property [4.x]
DescriptionOne Web Browser control on the form is fine. The first Web Browser control (if there are two or more) is also fine. All Web Browser controls are fine if all has Common.Anchors = 1 + 2 + 3, but if you add 8 -> you got problems, e.g. the control is not displayed or could disappear if the form is resized.

Tested with 1333 & 1343, skinned & non-skinned, all with same problem.

The button control (and probably other MM controls) has not the same problems, e.g. if you replace NewActiveX with NewButton in the test script, it will work fine.
Steps To ReproduceA1. Put test script in Auto folder;
A2. restart MM;
A3. choose "Test Web Browser Control" from Edit menu;
A4. resize form horizontally, i.e. increase its width -> second wb control disappear.

B1. remove comment sign ("'") from the second control's Common.Anchors property;
B2. save script and restart MM;
B3. choose "Test Web Browser Control" from Edit menu ->second wb control not displayed at all;
B4. resize form vertically, i.e. increase its height -> second wb control appears after while;
B5. decrease form's height -> second wb control disappears.
Additional InformationOption Explicit

Const bsSizeable = 2

Sub OnStartup()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = SDB.Localize("Test Web Browser Control")
    oMenuItem.UseScript = Script.ScriptPath
    oMenuItem.OnClickFunc = "Test"
End Sub

Sub Test(oItem)
    Dim frmDialog
    Dim wb1
    Dim wb2
    Dim btnCancel
    Dim iBorderWidth
    Dim iBorderHeight
    Dim iModalResult

    Set frmDialog = SDB.UI.NewForm
    frmDialog.BorderStyle = bsSizeable
    iBorderWidth = frmDialog.Common.Width - frmDialog.Common.ClientWidth
    iBorderHeight = frmDialog.Common.Height - frmDialog.Common.ClientHeight
    frmDialog.Common.SetRect 100, 100, 300 + iBorderWidth, 150 + iBorderHeight
    frmDialog.Caption = SDB.Localize("Test")

    Set wb1 = SDB.UI.NewActiveX(frmDialog, "Shell.Explorer")
    wb1.Common.SetRect 10, 10, 280, 40
    wb1.Common.Anchors = 1 + 2 + 4
    wb1.SetHTMLDocument "about:blank"

    Set wb2 = SDB.UI.NewActiveX(frmDialog, "Shell.Explorer")
    wb2.Common.SetRect 10, 60, 280, 40
    wb2.Common.Anchors = 1 + 2 + 4 '+ 8
    wb2.SetHTMLDocument "about:blank"

    Set btnCancel = SDB.UI.NewButton(frmDialog)
    btnCancel.Caption = SDB.Localize("&Close")
    btnCancel.Common.SetRect 220, 115, 70, 25
    btnCancel.Common.Anchors = 4 + 8
    btnCancel.Cancel = True
    btnCancel.ModalResult = 2

    iModalResult = frmDialog.ShowModal
End Sub
TagsNo tags attached.
Fixed in build1368



2011-02-16 11:52

updater   ~0023136

Still not resolved in 1349. Would you do something about this please? Because of this bug Magic Nodes and RegExp Find & Replace don't work as they should (and any other script which have two or more Web browser controls using Common.Anchors on the same form).


2011-02-16 16:04

developer   ~0023154

Last edited: 2011-02-16 16:05

View 3 revisions

Hard to do something about this, it seems to be a problem with the Web browser object itself that we gets as OLE automation abject too.

Did you try to put the object to a separate Group box? Maybe it could resolve the problem.


2011-02-16 16:20

updater   ~0023156

Last edited: 2011-02-16 16:21

View 2 revisions

How didn't you have the same problem with MM 2.x and 3.x? OLE automation didn't change since that version, right? How you have problem only with two or more Web browser controls, but not with single control? It seems to me like your bug, not related to OLE.


2011-04-22 06:29

updater   ~0024435

Do you have any intention to fix this bug?


2011-04-22 11:19

developer   ~0024441

We indeed haven't changed anything in this area. The only thing is that we upgraded from Delphi7 to Delphi 2010 and this most probably somehow caused this strange behaviour.


2011-04-22 16:28

updater   ~0024451

You didn't answer to my question, but knowing you I suppose it is "no, we don't have any intention to fix this bug, at least not in the near future", right? You also didn't answer to my old question: "How you have problem only with two or more Web browser controls, but not with single control?"

I really don't understand how changes in the version of the programing language could lead to something like that. I could understand your excuse if you also have problem with single control, but you don't have problem in that case. You even don't have problem with the first Web control on the form, but only with the second and any other. I could hardly believe that changed version of the programming language is reason for such behavior.

However, if you are sure that Delphi is causing that, you still could do something about it. Firstly, you could try to find and fix a bug in the source code of the ActiveX control (I suppose it is VCL component, and as far as I remember all native Delphi VCL components have included source code). If you don't have its source code, you could report the problem to the author of that component.

Although, I know that it is easiest for you to do nothing about it. I suppose I am the only one who has scripts with such strange user interface using several Web controls on the same form, so why should you care?

Well, I am sorry to say, but I am very disappointed with your reaction and attitude. As I said, my two most popular and important scripts are not functioning as they should because of your upgrade to the new version. You see, that upgrade is not important to me since I am still using MM3 and I don't need anything that you added in MM4, but that upgrade is important to other users of your program who incidentally want to use my scripts as well. If you don't care about your users, why should I?


2011-04-26 09:32

developer   ~0024466

Last edited: 2011-04-26 10:07

View 2 revisions

Fixed in build 1368.
It was indeed bug in Delphi 2010 sources.

To answer your question:
We have intention to fix all bugs, but we cannot fix them all at once and we are fixing them based on its priority although I believe that you would priotitize them differently as you are saying "I don't need anything that you added in MM4", but fortunatelly there are tons of users that appreciate the new features.


2011-05-01 10:32

updater   ~0024679

Works fine with 1368. Thank you very much.