Page 54 of 94 FirstFirst ... 4445152535455565764 ... LastLast
Results 2,121 to 2,160 of 3726

Thread: CommonControls (Replacement of the MS common controls)

  1. #2121

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    MountainMan,

    True. The property pages are only needed for IDE or OCX.
    For the compiled Std-EXE it is not needed.

    Even the API 'OleCreatePropertyFrame' to show the property pages at run-time do work only in IDE or when compiled only when linked to a OCX.

  2. #2122
    Member LOfADay's Avatar
    Join Date
    Dec 2016
    Posts
    44

    Re: CommonControls (Replacement of the MS common controls)

    An extraordinary volume of work. Keep it up! Sad I was unable to make use of it in a VB6 reboot. I had the finance, the planning, the background, the external support, and I made the big mistake of coming here and asking for input, help and encouragement. Sadly MS has broken your colleagues here and rampant negativity, even mockery, was all I got. I now know how Elon Musk felt when he offered the Thai cave boys a submarine only to be rounded on. Maybe someone will come and make use of your fantastic work as you deserve recognition.
    www.vb64.com logo courtesy of BadAssTechnologies by permission & with thanks.

  3. #2123
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    261

    Re: CommonControls (Replacement of the MS common controls)

    Hi LOfADay. Just about everyone on this forum is contributing to not only keeping VB6 alive but improving on it. Krool's work is evidence of that but he is by no means the only one. I am not sure what your beef is about but if you want to be part of our small community please join us in a positive way. We'd love to have you and your ideas. I looked at your previous posts on this forum and couldn't see anything particularly bad but obviously something ticked you off. Every online community has some irritating people but this forum seems to have a lot less of that than almost any online community I have seen or been part of. If you want to be positive please jump in. if you don't please take the negativity somewhere else.

  4. #2124
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    First of all thanks for all your wooooork.

    in .Net it is possible to add to the toolbar (in addition to the Button) other controls like Textbox, Combo Etc.... I have even managed to put DateTime and many other Controls.


    Would this be possible to add this on your toolbar, this would save lots of coding of positioning controls on form load.


    thanks

  5. #2125

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    First of all thanks for all your wooooork.

    in .Net it is possible to add to the toolbar (in addition to the Button) other controls like Textbox, Combo Etc.... I have even managed to put DateTime and many other Controls.


    Would this be possible to add this on your toolbar, this would save lots of coding of positioning controls on form load.


    thanks
    You can use the CoolBar in combination with the ToolBar. The CoolBar can manage child controls.

  6. #2126
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    261

    Re: CommonControls (Replacement of the MS common controls)

    Krool,

    One more question. In the standard module ComCtlsBase you have a conditional compilation constant ImplementIDEStopProtection and it appears to toggle whether or not you include code for the StdEXE controls to be safely used in the IDE. If I have a project with the OCX version of your controls and I modify it to now use the StdEXE ones and then I compile that with the commandline compilation capability of VB6.exe, I believe I can set this conditional compilation constant = FALSE because the resultant executable is not going to be in the IDE. Is this correct?

  7. #2127
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by wqweto View Post
    A Repaint routine can be implemented as a stronger alternative to Refresh like this
    thinBasic Code:
    1. Private Sub pvPumpMessages(ByVal hWnd As Long, ByVal lFromMsg As Long, ByVal lToMsg As Long)
    2.     Dim uMsg            As APIMSG
    3.    
    4.     Do While PeekMessage(uMsg, hWnd, lFromMsg, lToMsg, PM_REMOVE) <> 0
    5.         Call DispatchMessage(uMsg)
    6.     Loop
    7. End Sub
    8.  
    9. Public Sub Repaint()
    10.     pvPumpMessages ContainerHwnd, WM_PAINT, WM_PAINT
    11. End Sub
    . . . or Karl77 can call pvPumpMessages in client code after batch updating the other 100s of labels on the form in question :-))

    cheers,
    </wqw>
    Just FYI, I have to admit that recently I found out that there is a win32 API function specifically for sending WM_PAINT messages (only if required/if anything is invalidated) to a hwnd and it's as simple as UpdateWindow.

    Using pvPumpMessages in Repaint above is an example of over-complication par excellance instead of a simple Call UpdateWindow(ContainerHwnd) API call.

    Sorry once again about that. . .

    cheers,
    </wqw>

  8. #2128
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    Hi!

    Is there any way to print on toobar button placeholder, I use that to put controls and I would like to print a description of the control above it.

  9. #2129
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    COMMON DIALOG QUESTION

    Using the VBCCR CommonDialog class, how can I add a button to the file dialog?
    Like this:
    Name:  vbf181121.jpg
Views: 1569
Size:  17.5 KB

    And let some code work from this button?
    The goal is to set a predifined folder to browse.

    Thank you

  10. #2130

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by MountainMan View Post
    Krool,

    One more question. In the standard module ComCtlsBase you have a conditional compilation constant ImplementIDEStopProtection and it appears to toggle whether or not you include code for the StdEXE controls to be safely used in the IDE. If I have a project with the OCX version of your controls and I modify it to now use the StdEXE ones and then I compile that with the commandline compilation capability of VB6.exe, I believe I can set this conditional compilation constant = FALSE because the resultant executable is not going to be in the IDE. Is this correct?
    Correct

  11. #2131
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    COMMON DIALOG QUESTION
    Using the VBCCR CommonDialog class, how can I add a button to the file dialog?
    I now see this is easily possible with this:
    http://www.vbforums.com/showthread.p...t-Another-One)
    It seems I can easily use this one instead of the VBCCR solution.
    Means: Solved.

  12. #2132
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: CommonControls (Replacement of the MS common controls)

    On the LinkLabel control, is it possible to expose the Link forecolor property to the developer? It's currently outside of the developer's ability to control (there's no property for this on the control). I imagine that it's reading some system value for this. In my app I use a slightly different shade of blue for links and I'd like to set the LinkLabel.LinkForeColor to this same app-wide link color.

    Thanks for the consideration.

  13. #2133
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: CommonControls (Replacement of the MS common controls)

    Also, I'd like to use the LinkLabel control as a replacement for the current Label control when the caption requires an embedded hyperlink. Therefore, it should have much of the same functionality as the Label control where possible to allow for easiest drop in replacement. For example, the Alignment options for LinkLabel should be vbLeftJustify, vbCenterJustify, and vbRightJustify just the Label control. But currently only Left and Right are offered. Is there a reason for this?

    Other "missing" LinkLabel properties which would be useful are:
    Appearance
    AutoSize
    EllipsisFormat
    VerticalAlignment
    WordWrap


    Of all of these discussed, the two which are preventing me from using this control in my project are the LinkForeColor and Alignment = vbCenter
    Last edited by AAraya; Nov 30th, 2018 at 11:43 AM.

  14. #2134

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by AAraya View Post
    On the LinkLabel control, is it possible to expose the Link forecolor property to the developer? It's currently outside of the developer's ability to control (there's no property for this on the control). I imagine that it's reading some system value for this. In my app I use a slightly different shade of blue for links and I'd like to set the LinkLabel.LinkForeColor to this same app-wide link color.
    There is a Event for it:
    Code:
    LinkForeColor(ByVal Link As LlbLink, ByRef RGBColor As Long)
    The param RGBColor is preset with system value but there you can override the value.
    You may use the 'Visited' and/or 'Hot' property of the LlbLink object to finetune further the RGBColor.

  15. #2135
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    There is a Event for it:
    Code:
    LinkForeColor(ByVal Link As LlbLink, ByRef RGBColor As Long)
    The param RGBColor is preset with system value but there you can override the value.
    You may use the 'Visited' and/or 'Hot' property of the LlbLink object to finetune further the RGBColor.
    Not an obvious place to set a ForeColor property but it works well. Thanks!

  16. #2136

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by AAraya View Post
    For example, the Alignment options for LinkLabel should be vbLeftJustify, vbCenterJustify, and vbRightJustify just the Label control. But currently only Left and Right are offered. Is there a reason for this?
    Yes there is a reason. Left is by default and Right is achieved by LWS_RIGHT style. There is no native way by comctl32.dll (e.g. LWS_CENTER) to make center alignment.

  17. #2137
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: CommonControls (Replacement of the MS common controls)

    There appears to be a bug with Tooltips for the LabelW control. The label caption displays Unicode text but the tooltip does not. See screenshot. Is this a known issue? Let me know if you need more details.

    Name:  VBCCR Label bug - Tooltips can't display unicode.png
Views: 1304
Size:  4.4 KB

  18. #2138
    Addicted Member
    Join Date
    Jun 2009
    Location
    C:\Windows\SysWOW64\
    Posts
    227

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by AAraya View Post
    There appears to be a bug with Tooltips for the LabelW control. The label caption displays Unicode text but the tooltip does not. See screenshot. Is this a known issue? Let me know if you need more details.

    Name:  VBCCR Label bug - Tooltips can't display unicode.png
Views: 1304
Size:  4.4 KB
    If you use the ToolTipText property, it is normal because it does not support unicode.

  19. #2139
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Cube8 View Post
    If you use the ToolTipText property, it is normal because it does not support unicode.
    Is this a limitation of the VBCCR.LabelW control or of the underlying Windows APIs which it's built on?

    Is there a way around this? One of the reasons I replaced all of the controls in my project to the VBCCR ones was for Unicode support.

  20. #2140
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: CommonControls (Replacement of the MS common controls)

    Old age has set in... sigh...

    I posted this same issue but with a Listbox about a year and half ago. Completely forgot about that. The response was that the TooltipText property does not support Unicode. Man, that's a small nuisance. Any thoughts about adding a TootipTextW property to these controls which can handle Unicode?

    In the meanwhile I'll look into implementing my own using this code:
    http://www.vbforums.com/showthread.p...iCode-ToolTips
    Last edited by AAraya; Dec 10th, 2018 at 09:46 AM.

  21. #2141
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    Maybe we should consider overriding VBs tooltips engine like Merri had figured out.

    Not sure how you would get around the IDE properties window. Maybe a TooltipW on a property page?
    Last edited by DEXWERX; Dec 10th, 2018 at 10:19 AM.

  22. #2142
    Fanatic Member DrUnicode's Avatar
    Join Date
    Mar 2008
    Location
    Natal, Brazil
    Posts
    631

    Re: CommonControls (Replacement of the MS common controls)

    Not sure how you would get around the IDE properties window. Maybe a TooltipW on a property page?
    Several options here:

    1. Add 7 Properties to each control for full control of ToolTips.
    ToolTipTextW, ToolTipTitleW, ToolTipIcon, ToolTipStyle, ToolTipBackColor, ToolTipForeColor, ToolTipMaxWidth
    You will need a PropertyPage for ToolTipTextW and ToolTipTitleW so you can add Unicode at design time.
    The PropertyPage will need a Unicode aware TextBox to do this.
    This seems a bit excessive if you have dozens of controls.

    2. Raise an Event via MouseEnter at runtime to request ToolTipTextW and ToolTipTitleW.

    3. Set the Unicode via Public Sub InitTooltip at runtime.

    Code:
    Public Sub InitTooltip(Text As String, Optional Title As String, Optional Icon As ToolTipIcon, Optional Style As ToolTipStyle = ttsBalloon, Optional BackColor As OLE_COLOR = vbInfoBackground, Optional ForeColor As OLE_COLOR = vbInfoText, Optional MaxWidth As Long = 260)
      mToolTipText = Text
      mToolTipTitle = Title
      mToolTipIcon = Icon
      mToolTipStyle = Style
      mToolTipBackColor = BackColor
      mToolTipForeColor = ForeColor
      mToolTipMaxWidth = MaxWidth
    End Sub
    Unicode Tooltips are handled via a class which is instantiated when necessary for each control.
    Specifically, start the ToolTip during MouseEnter Event and stop (destroy class) via MouseLeave Event.
    Last edited by DrUnicode; Dec 10th, 2018 at 01:23 PM. Reason: Typo

  23. #2143

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    TOOLTIP APPEARANCE QUESTION

    The tooltips on TabStripW, ToolbarW and some more are fine, and they support even multiline.
    Also the appearance is fine.

    Other controls like CommandButtonW, FrameW etc. show different looking tooltips.
    Here is an example:
    Attachment 162595

    Is there any chance to get the same tooltips as with TabStripW etc. in any control?

    Thanks.
    This topic was already raised several times.
    The ToolTipText property of a UserControl is in-built and can't be overrided. Thus a ToolTipTextW property would be needed.
    Again, this is only an issue directly on the control.
    For example, TabStrip1.Tabs(1).ToolTipText (and other similaries) can handle unicode and multiline text.

  24. #2144
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: CommonControls (Replacement of the MS common controls)

    Here there is a way to hook the tooltips, but I don't know if that can be of help.

  25. #2145

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Minor update for the VisualStyles.bas module.
    It could happen when having a vbGraphical style CommandButtonW and calling Unload Form on the Click event to cause a crash. (run-time error 438)
    Reason was that the internal 'RedirectButton' function in VisualStyles.bas calls the .Refresh method of the button object on WM_LBUTTONUP.
    WM_LBUTTONUP causes a WM_COMMAND and the corresponding Click event and if that Click event unloads the form (and ultimately destroys the button object) the following .Refresh method in 'RedirectButton' failed with a crash.
    This issue (and possibly other potential messages) got now resolved in VisualStyles.bas.

  26. #2146
    Addicted Member
    Join Date
    Jul 2017
    Posts
    233

    Re: CommonControls (Replacement of the MS common controls)

    hi krool ,
    I am using textboxw in a usercontrol . It is a custom textbox .

    problem info :
    1- this problem happens occasionally in the same circumstances every time . I mean sometimes it happens and sometimes it does not .
    2- it happens only in a manifested IDE .
    3- It happens When I try to click the usercotrol .

    In the video link is a description of the scenario .

    https://www.youtube.com/watch?v=Jwhs...ature=youtu.be

  27. #2147
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool -

    2 questions about the TabStrip control:

    1) The TabStrip TabBeforeClick event passes a TabItem parameter. I would expect this to be the TabItem of the tab you have clicked (so you can decide whether or not to Cancel the operation based on conditions related to the new tab), but it appears the be a reference to the currently selected tab. Is this by design or is it a bug?

    2) Perhaps I'm missing something, but I don't see a way to Disable individual tabs. Is this currently possible, and if not would you consider this for a future feature enhancement?

    Thanks, and Happy New Year!

  28. #2148
    Addicted Member
    Join Date
    Jul 2017
    Posts
    233

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Hosam AL Dein View Post
    hi krool ,
    I am using textboxw in a usercontrol . It is a custom textbox .

    problem info :
    1- this problem happens occasionally in the same circumstances every time . I mean sometimes it happens and sometimes it does not .
    2- it happens only in a manifested IDE .
    3- It happens When I try to click the usercotrol .

    In the video link is a description of the scenario .

    https://www.youtube.com/watch?v=Jwhs...ature=youtu.be
    the link above no longer works . here is the new link
    https://www.youtube.com/watch?v=laFr...ature=youtu.be

  29. #2149

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by jpbro View Post
    2 questions about the TabStrip control:

    1) The TabStrip TabBeforeClick event passes a TabItem parameter. I would expect this to be the TabItem of the tab you have clicked (so you can decide whether or not to Cancel the operation based on conditions related to the new tab), but it appears the be a reference to the currently selected tab. Is this by design or is it a bug?

    2) Perhaps I'm missing something, but I don't see a way to Disable individual tabs. Is this currently possible, and if not would you consider this for a future feature enhancement?
    First of all, compared to other comctl32 controls the SysTabControl32 is poor developed with not much possibilities.

    TCN_SELCHANGING (TabBeforeClick) provides no way to determine which tab is about to be selected. It is a common issue you will find when googling about it.

    So there are only two ways to use it:

    1. (error in current tab, prevent change)
    The TabItem in TabBeforeClick is the item which currently is selected (and not the new one; as not possible)
    So you can make a check for the current tab if the content of the shown page panel (or whatever else you display with this tab) is valid. If error/invalid in your app then set Cancel parameter to True and prevent the change. (no flicker)

    2. (disabled tab feature = cumbersome workaround with flicker)
    Code:
    Private LastTabItem As TbsTab
    
    Private Sub TabStrip1_TabBeforeClick(ByVal TabItem As TbsTab, Cancel As Boolean)
    Set LastTabItem = TabItem
    Cancel = False ' Not applicable to use in this scenario as no way to know new selected tab. (blame MS)
    End Sub
    
    Private Sub TabStrip1_TabClick(ByVal TabItem As TbsTab)
    If TabItem.Index = 2 Then ' Index 2 is our sample disabled Tab
        TabStrip1.SelectedItem = LastTabItem ' If LastTabItem is Nothing then no tab will have focus.
    End If
    End Sub

  30. #2150
    Addicted Member
    Join Date
    Jul 2017
    Posts
    233

    Re: CommonControls (Replacement of the MS common controls)

    #2148

    http://www.vbforums.com/showthread.p...=1#post5345409

    Is there something I could be missing here ?
    Last edited by Hosam AL Dein; Dec 31st, 2018 at 05:53 PM.

  31. #2151
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    First of all, compared to other comctl32 controls the SysTabControl32 is poor developed with not much possibilities.

    TCN_SELCHANGING (TabBeforeClick) provides no way to determine which tab is about to be selected. It is a common issue you will find when googling about it.

    So there are only two ways to use it:
    Understood, and thank you very much for the workaround code examples.

    PS: I'm providing a link to an earlier post of mine because I didn't hear anything back from you about it. If you don't think the proposed changes are worthwhile/correct that's OK of course, I just wanted to make sure you didn't miss the post: http://www.vbforums.com/showthread.p...=1#post5330725

  32. #2152

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Hosam AL Dein View Post
    #2148

    http://www.vbforums.com/showthread.p...=1#post5345409

    Is there something I could be missing here ?
    In the form with code it crashes and same controls (copy & paste) to the test form without code it does not crash.
    I suggest the problem is in your form code. Please check as this was not visible shown in your video. (Only UserControl was all code excluded by commenting)

    Quote Originally Posted by jpbro View Post
    PS: I'm providing a link to an earlier post of mine because I didn't hear anything back from you about it. If you don't think the proposed changes are worthwhile/correct that's OK of course, I just wanted to make sure you didn't miss the post: http://www.vbforums.com/showthread.p...=1#post5330725
    Oops. I forgot it. Will take a look soon when time is available.

  33. #2153
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool, I'm using VBCCR16 (1.6.0.12) and have the following problem: during compilation of my EXE the following error message pops up:

    VBCCR16
    Run-time error '0'
    I've pasted a screenshot of this below.

    There have been NO problems when running from the IDE, and in fact VBCCR has been in use for quite some time without ever seeing this before during compilation.

    Any ideas? It is preventing builds...

    Thanks!
    Dave

    Name:  Untitled.png
Views: 866
Size:  6.3 KB

  34. #2154

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by DaveInCaz View Post
    Hi Krool, I'm using VBCCR16 (1.6.0.12) and have the following problem: during compilation of my EXE the following error message pops up:



    I've pasted a screenshot of this below.

    There have been NO problems when running from the IDE, and in fact VBCCR has been in use for quite some time without ever seeing this before during compilation.

    Any ideas? It is preventing builds...

    Thanks!
    Dave

    Name:  Untitled.png
Views: 866
Size:  6.3 KB
    With this information I can't dream the solution.
    Please try to bundle this in a demo to isolate the problem.
    Do you use any kind of add-ins that might interfere during compilation?

  35. #2155
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    With this information I can't dream the solution.
    Please try to bundle this in a demo to isolate the problem.
    Do you use any kind of add-ins that might interfere during compilation?
    I totally understand that... I was mainly hoping you might already have familiarity with this. I will try to narrow down what is going on. The build environment hasn't changed in years so I doubt it is an add-in or other tool.

    For a long time we used VBCCR14, and more recently updated to VBCCR16. This may have been the first build since that was done.

    In the ordinary course of a VB6 build is there any code inside an OCX which would be run during compilation? If so maybe that could provide a hint where to look further. I can see in VBCCR16 source code there is a custom MsgBox function, and from the look of that dialog it seems like it might be displayed using that code (maybe).

    Thanks

  36. #2156
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    @Dave

    Did you try to compile using the command line?
    Like so:

    Code:
    "C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE" /make YourProject.VBP
    Just as a test.

  37. #2157
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    @Dave

    Did you try to compile using the command line?
    Like so:

    Code:
    "C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE" /make YourProject.VBP
    Just as a test.
    I use Kinook Visual Build Pro to run the VB6 build, and I believe that is what it does, yes. The same error messagebox popped up when that was running as when I build from the IDE (the screenshot I showed).

    Thanks

  38. #2158
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    @Dave

    Did you try to compile using the command line?
    Like so:

    Code:
    "C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE" /make YourProject.VBP
    Just as a test.
    I use Kinook Visual Build Pro to run the VB6 build, and I believe that is what it does, yes. The same error messagebox popped up when that was running as when I build from the IDE (the screenshot I showed).

    Thanks

  39. #2159
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: CommonControls (Replacement of the MS common controls)

    During compile-time custom UserControls are instantiated and read/write properties are fired which might lead to subclassing being setup etc. complications.

    I'm using following code to filter compile-time from run-time&design-time and skip subclassing in my custom UCs

    thinBasic Code:
    1. Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    2.     With PropBag
    3.         AutoSize = .ReadProperty("AutoSize", True)
    4.         ...
    5.     End With
    6.     If Ambient.UserMode And Not IsCompileTime(Extender) Then
    7.         SubClass m_uSubclass, hWnd, ObjPtr(Me), AddressOf RedirectWndProc
    8.     End If
    9. End Sub
    10.  
    11. Private Function IsCompileTime(Extender As Object) As Boolean
    12.     Dim oTopParent      As Object
    13.     Dim oUserControl    As UserControl
    14.    
    15.     On Error GoTo QH
    16.     Set oTopParent = Extender.Parent
    17.     Set oUserControl = AsUserControl(oTopParent)
    18.     Do While Not oUserControl Is Nothing
    19.         If oUserControl.Parent Is Nothing Then
    20.             Exit Do
    21.         End If
    22.         Set oTopParent = oUserControl.Parent
    23.         Set oUserControl = AsUserControl(oTopParent)
    24.     Loop
    25.     Select Case TypeName(oTopParent)
    26.     Case "Form", "UserControl"
    27.         IsCompileTime = True
    28.     End Select
    29. QH:
    30. End Function
    31.  
    32. Private Function AsUserControl(oObj As Object) As UserControl
    33.     Dim pControl        As UserControl
    34.  
    35.     If TypeOf oObj Is Form Then
    36.         '--- do nothing
    37.     Else
    38.         Call CopyMemory(pControl, ObjPtr(oObj), 4)
    39.         Set AsUserControl = pControl
    40.         Call CopyMemory(pControl, 0&, 4)
    41.     End If
    42. End Function
    It's a bit hacky and probably can be further simplified.

    cheers,
    </wqw>

  40. #2160
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    With this information I can't dream the solution.
    Please try to bundle this in a demo to isolate the problem.
    Do you use any kind of add-ins that might interfere during compilation?
    Additional detail - this error occurs on our build environment (a Win7-32 virtual machine), but not on another developer's PC.

    So there is something environmental which is somehow influencing when the error occurs. I believe i have ruled out disk space (made sure there was at least 20 GB free during the compile).

    Could it be some missing dependency? AFAIK both environments have all the same files related to VBCCR.

Page 54 of 94 FirstFirst ... 4445152535455565764 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width