Page 1 of 2 12 LastLast
Results 1 to 40 of 46

Thread: VB6 UniControls Summer Release [2008-06-19]

  1. #1

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    VB6 UniControls Summer Release [2008-06-19]

    UniControls: 2008-06-19
    UniText RC3 & UniList RC1: 2008-06-14


    I've finally come to a point at which I'm happy enough to the results: my unicode controls as solid standalone one file user controls. LaVolpe's version of Paul Caton's SelfSub and SelfHook are being used to gain something that has been very hard before.

    These controls are aimed to be basic controls, with a little twist or two. UniLabel is currently the only control that is nearly polished to it's maximum, it has one remaining issue with transparent ZOrder. Other controls are still on beta level: UniMenu needs work on easing it's usage, UniText needs polishing and adding functionality, UniCommand is an non-subclassed older version which will be replaced by subclassed one once I've resolved a few issues.

    Feedback and bug reports very much appreciated!

    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Merri; Jun 19th, 2008 at 12:29 AM. Reason: New version

  2. #2
    Addicted Member
    Join Date
    May 2001
    Location
    Meeko
    Posts
    135

    Re: UniControls [2007-12-08 release]

    Thanks for the controls,

    I'm now trying the unitext,
    but once I close the form with the unitext, it appears an "invalid procedure Call or argument" at the line

    ""If thunkID <> 0 Then z_scFunk.Remove "h" & thunkID"

    But it's ok to execute the program!!

  3. #3

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: UniControls [2007-12-08 release]

    Yeah, this is a known problem. I fixed it already at one point (after the release), but after messing around the code it is back in my current source. Will see if I get it fixed for the next release.

  4. #4

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    UniControls [2007-12-15 release]

    Time for the 2007-12-15 release!



    What is new:
    • UniText and UniMenu are now editable: select control, right click, Edit.
    • UniLabel Caption is now presented in UTF-8 in the properties window.
    • Tons of code reordering, variables renamed etc.
    • Fixed lots of bugs (I don't keep a detailed list).
    • Rewrote UTF-8 <-> UTF-16 conversion code in UniMenu, UniLabel and UniText.
    • UniText's Text property has been hidden from the properties window to prevent accidental removal of Unicode text.


    Known issues:
    • You can't use arrow keys in UniText when editing in design time.
    • UniText doesn't subclass within UniMenu, thus pressing Set is required.
    • Setting KeyAscii in KeyPress event of UniText doesn't work.
    • Focus of UniText is partially lost if window focus changes.
    Attached Images Attached Images  
    Attached Files Attached Files

  5. #5

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: UniControls [2007-12-15 release]

    I have some nice news for you all: the next version of UniLabel will support Vista's themed text, meaning you can have glows, shadows and borders around text when your app runs on Vista.

    At this point I already have support for glowing text and I don't think it would be too hard to add support for the rest.

  6. #6

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: UniControls [2007-12-15 release]


    Left one with solid background, right one with transparent background. So as you can see, there is a bug remaining with the transparent background. For some reason it doesn't draw properly the first time window pops up back to being visible. I'll just have to figure out why.


    At this point...

    New properties: Border, BorderColor, Glow, Shadow, ShadowColor, ShadowX, ShadowY, UseThemeText

    New methods: SetShadow, SetShadowOffset, ThemeText


    ThemeText returns True if DrawThemeTextEx can be used. It can't be used when Vista's theming is disabled and classic theme is being used instead.
    Attached Images Attached Images  

  7. #7
    Addicted Member
    Join Date
    May 2001
    Location
    Meeko
    Posts
    135

    Re: UniControls [2007-12-15 release]

    I am not able to input chinese characters in a English OS, and some characters in the UniText1 has become "??" both in Chinese and English OS.

  8. #8

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: UniControls [2007-12-15 release]

    Could you give more details? Which version and what did you do?

    Edit!
    I tried to write some Chinese and it worked ok. Not that I understood anything of what I wrote, but the characters came out like they're supposed to. This on a Finnish Vista.
    Last edited by Merri; Dec 16th, 2007 at 11:46 PM.

  9. #9
    Addicted Member
    Join Date
    May 2001
    Location
    Meeko
    Posts
    135

    Re: UniControls [2007-12-15 release]

    I just execute the sample project in my pc, which is in Chinese XP, and type chinese in UniText2.



    I've also tried in an English Win 2000 PC.

    Last edited by Meeko; Dec 17th, 2007 at 02:58 AM.

  10. #10

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: UniControls [2007-12-15 release]

    There is one possible place when characters don't go the Unicode route, so lets rule that one out: open UniText source, locate UserControl_ReadProperties and the following line:

    If ssc_Subclass(UserControl.hWnd, , 1, , Ambient.UserMode) Then

    change to

    If ssc_Subclass(UserControl.hWnd, , 1, , Ambient.UserMode, True) Then

    This should change the subclassing of messages of the usercontrol itself (not the textbox that has been created using API) to Unicode. This may cause other problems or not, but lets see if this has any effect for the Chinese not working.

    Other than this, I don't have an idea at this point what might cause the problem.

  11. #11
    Addicted Member
    Join Date
    May 2001
    Location
    Meeko
    Posts
    135

    Re: VB6 UniControls [2007-12-15 release]

    I've tried modify the line but seems not working,
    only some part of the Japanese (Unitext1) could now be visible in the Chinese OS.

    Thanks.

  12. #12

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls [2007-12-15 release]

    See the regional settings and check if the setting for possible alternative fonts is checked. On English XP, you have to tick option "Install fonts for Far East languages" or something similar to be able to see Chinese, Japanese, Korean etc.

    I can't remember what you have to do with Windows 2000 to get the fonts.

  13. #13
    New Member
    Join Date
    Feb 2008
    Location
    Toronto, Canada
    Posts
    2

    Re: VB6 UniControls [2007-12-15 release]

    I've taken out UniTextBox user control alone for test and found it the best of all approaches I've come across so far.

    I've been able to (1) use Hand Writing Device to input Chinese characters ("Simple Chinese") and (2) paste the same from WordPad to UniTextBox alright.

    One problem encountered, however. When I wanted to change the "Project Name" property of the Project, the screen flagged "Thunk hasn't been initialized". At the end, I have to re-start the computer.

    The test was done on XP and Vista. I also tried it on ME, understandably it wouldn't work there, just a mention.

    I've meanwhile added some properties to the user control, such as FontName selection, CharSet selection (Font's Script No.), FontSize, Bold, Italic and Underline. All worked fine. If you want me to send you my test project (so that you might save some typing), I can contact you via the mail system of Plant-Soure-Code.

    Regards,
    Last edited by Herman CK; Feb 16th, 2008 at 02:56 PM.

  14. #14
    New Member
    Join Date
    Feb 2008
    Location
    Toronto, Canada
    Posts
    2

    Re: VB6 UniControls [2007-12-15 release]

    Regarding the outstanding issue on your uniTextBox (you listed the issue earlier on), it seems that if you set the ForwardFocus property of the user control to True, then you will regain focus on return after losing focus to another window such as WordPad.

  15. #15

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls [2007-12-15 release]

    Focus overall is a hard issue, the default behavior involved with how user controls behave is troublesome with controls such as a textbox that involve using keys such as tab, enter and arrows. The regular user control behavior have to be cancelled in one way or another, which isn't yet done perfectly. The only "good" solutions involve using a type library, which isn't something I'm a fan of due to a requirement of an extra file while I want it all to work from one. I have ended up to capturing keys by hooking, which isn't as clean I'd want it to be...

  16. #16
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: VB6 UniControls [2007-12-15 release]

    Merri, if you are still updating this project, here is an issue that you may want to examine. When textbox has focus, press F10 (activates menubar), try to use keyboard to navigate menu. Just trapping the F10 won't solve the problem though. If textbox has focus, click on the menu File, now try to use keyboard to navigate menu. I think the solution is to actually subclass the parent form and look for menu loop messages to determine when to allow right/left, up/down arrows to flow thru. Of course, subclassing the form by multiple usercontrols always leads to problems.

    Anyway, I got re-interested in combining VB with API Windows and have encountered this problem. I came to your post, wondering if you had a cure for it.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  17. #17
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: VB6 UniControls [2007-12-15 release]

    Merri, figured it out should you want to attack same problem. Here's what I had to do:
    1) Only on wm_setfocus, start keyboard hook and also subclass the top-level window. If wm_entermenuloop or wm_contextmenu happens, release keyboard hook and restart hook on wm_exitmenuloop or after wm_contenxtmenu returns, but only if control still has focus. Note that wm_contextmenu can occur both in the top level window and the api window too.
    2) On wm_killfocus, release keyboard hook always
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  18. #18

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls [2007-12-15 release]

    Ok, thanks, I probably get back into the project again some day, I'm very much of an on/off person when it comes to programming

    Atm reading to Helsinki university entrance test.

  19. #19

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls [2007-12-15 release]

    I'm back working on the controls. However I've made a change in how I work with the project: I've given up on hooking, it just is all too messy, instead I've included an IOLEInPlaceActivate replacement module and two different TLB files to fix the issue the correct proper way.

    This means the controls won't be as standalone as they used to be. In the other hand I'm aiming on having only one extra module. As a bonus though, I'm currently working on UniRich control to have an Unicode Richtextbox, and it'll need some extra class modules for usability's sake. I'm basing my work on Edanmo's excellent but IDE crashy RichEdit control, which I'll convert to SelfSub to gain stability and compatibility with my other controls.

    I originally started working on my IRC client, Goldpanda, but I soon noticed three different methods for subclassing between the various components only resulted in very-very-hard-to-debug crash issues. It looks like I need to write my own WinSock replacement as well, CSocketMaster just doesn't cut it anymore, so I'll convert that to SelfSub as well (and probably do some other changes when I'm at it).


    The control list is getting pretty long:
    • clsSock
    • UniCommand
    • UniLabel
    • UniList
    • UniMenu
    • UniRich
    • UniText

    Just knowing that I have to rewrite tons of code doesn't sound too fun...

  20. #20

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    VB6 UniControls: UniText Release Candidate 3, UniList Release Candidate 1

    UniText RC3 release is open for bug testing, I'd like people to check if there are any bugs or only partially done features. The control can save and load Unicode text files. UTF-7, UTF-8, UTF-16, UTF-32, big endian, little endian... all those are supported. Many codepages are also supported for loading and saving, so you can load a GB 18030 encoded text file.

    UniList RC1 is also in the package. It lacks support for checkbox style but other than that it should work pretty good.

    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Merri; Jun 13th, 2008 at 07:20 PM.

  21. #21

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    UniControls [2008-06-19]

    2008-06-19


    Finally a new UniControls main release. It isn't as polished as I'd like it to be, but I find it better to release often when I'm at it so here we are.

    Things we have here now:
    • UniCaption (Unicode caption for forms)
    • UniCommand (command button)
    • UniDialog (common dialog & browseforfolder; this one needs still a lot of work)
    • UniLabel (the most polished of these controls)
    • UniList (listbox: sorting has much more power thanks to locale selection)
    • UniMenu (ownerdrawn menu, lots of options for colors)
    • UniText (textbox with wide range of Unicode support)


    There is also some bonus code
    Attached Images Attached Images  
    Attached Files Attached Files

  22. #22
    Junior Member
    Join Date
    Sep 2008
    Posts
    26

    Re: VB6 UniControls Summer Release [2008-06-19]

    Merri, what time do you want to update your UNICODE control again? I'm waiting your next release of the updated Unicode Control pack! ^.^

  23. #23

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls Summer Release [2008-06-19]

    I have some rewriting to do thanks to some new coding techniques that I've found since the latest release, and knowing how much time I have it may take anything from several weeks to a few months.

    I'd also have to let some of the controls go, especially UniMenu, it is oldest by codebase and most likely the greatest cause of unexpected crashes (especially under IDE).

  24. #24
    New Member
    Join Date
    Feb 2009
    Posts
    4

    Thumbs up Re: VB6 UniControls Summer Release [2008-06-19]

    Can u give me a sample code of simple dropdown combobox that support unicode character.

  25. #25
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,927

    Re: VB6 UniControls Summer Release [2008-06-19]

    Welcome to VBForums

    As it has not been done already, the easiest thing to do is build your own using a combination of UniText (for the part that is usually displayed), UniList (for the drop-down list) and a command button (for the drop down button).

  26. #26

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls Summer Release [2008-06-19]

    You can find Unicode combobox over at Planet Source Code. Not done by me.

  27. #27
    New Member
    Join Date
    Feb 2009
    Location
    INDIA
    Posts
    1

    Re: VB6 UniControls Summer Release [2008-06-19]

    Quote Originally Posted by keep_touch81@yahoo.c
    Can u give me a sample code of simple dropdown combobox that support unicode character.
    You can add component "Microsoft forms 2.0 object Library". Then you will get new tool box. take combobox tool from that and apply it.

    uday phadke

  28. #28
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,927

    Re: VB6 UniControls Summer Release [2008-06-19]

    Welcome to VBForums

    You can add it to your project, but it is illegal to distribute it (so your program will only work if it is already installed).

    From Microsofts web site:
    The Fm20.dll is NOT redistributable. You must have an application such as Microsoft Office 97 on the target system that installs Fm20.dll as part of its setup. (Fm20.dll is included with the OSR2 and OSR2.5 releases of Windows 95.) You can also find this file on the Visual Basic 5.0 CD under the \TOOLS\DataTool\Datatool\Msdesign folder. This will be installed only if you run the setup for the Visual Database Tools. In any case, you may not distribute the Fm20.dll as part of your setup, even if you purchase the Microsoft Office Developer Edition product.

  29. #29
    New Member
    Join Date
    Feb 2009
    Posts
    4

    Re: VB6 UniControls Summer Release [2008-06-19]

    Hi Merri! Thanks for your reply.
    Can you help me regarding your unitooltip text project. It is not working.

  30. #30
    New Member
    Join Date
    Sep 2009
    Posts
    1

    Thumbs up Re: VB6 UniControls Summer Release [2008-06-19]

    The quality of Merri's code is brilliant Fantastic stuff.

    That said, I'd like to point out that if the UniText control has the Locked property set, then the keyboard shortcut for Copy (Ctrl-C) is not passed through in the TranslateAccel method of the UniText.ctl file.
    Last edited by pinkduck; Sep 1st, 2009 at 06:40 AM. Reason: Semantic fix

  31. #31

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls Summer Release [2008-06-19]

    There are lots of oddities still in the code, but it is more than likely they'll never end up being fixed. Now that I'm more or less successfully entered work life I don't have the time resources I used to have, and programming wise I don't know which language I should pick up now that VB6 is slowly dying away. And I do a lot of other things besides programming (game translations, game modding, websites...).

  32. #32
    Frenzied Member
    Join Date
    Jan 2009
    Location
    Watch Window(Shift+f9)
    Posts
    1,879

    Question Re: VB6 UniControls Summer Release [2008-06-19]

    Hi ,Marry why in the following code it says .Client Side Not Available???.Error is Comming at Red Line !.let me know some idea please .
    Code:
    
    Private Sub UserControl_Initialize()
        m_WINNT = (Environ$("OS") = "Windows_NT")
        On Error Resume Next
        m_ExtenderScale = UserControl.Extender.Container.ScaleMode
        If Err.Number Then
            Err.Clear
            m_ExtenderScale = UserControl.Parent.ScaleMode
            If Err.Number Then
                Err.Clear
                m_ExtenderScale = vbTwips
            End If
        End If
        On Error GoTo 0
    End Sub

  33. #33

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls Summer Release [2008-06-19]

    During UserControl_Initialize the UserControl.Extender is not yet created. You have to do the call in UserControl_InitProperties (when the control is created for the first time in IDE) and UserControl_ReadProperties (all other cases).

    In the recent EruLabel that I posted I think I had a better method for ScaleMode checking, but I'm not entirely sure. I did something better than I've done previously, I think.

  34. #34
    New Member
    Join Date
    Jan 2011
    Location
    Guangzhou
    Posts
    1

    Re: VB6 UniControls Summer Release [2008-06-19]

    "VB6 is slowly dying away"
    it can be raised up by real VB6 hobbyists,i believe,though many people think it's impossible,
    your developments are wonderful,keep enthusiasm on them Merri!! i support u!!!
    -- a VB6 hobbyist from china,don't laugh at my english,thks.

  35. #35
    New Member
    Join Date
    Jan 2011
    Posts
    2

    Re: VB6 UniControls Summer Release [2008-06-19]

    How do you do, dear Marri.
    I have looked your UniControl.
    If I shall press the keys "қ" on UniText, that he does not show them, together he shows "?".
    But if put Msgbox "" here:
    Code:
    Private Function Private_WndEventKeyboard(MF As MSGFILTER) As Long
        Dim intShift As Integer
        Dim intChar As Integer
        Select Case MF.Msg
          Case WM_KEYDOWN
              ' set the intShift parameter
              intShift = Private_GetShiftMask
              ' set the KeyCode parameter
              intChar = MF.wParam And &HFFFF&
              ' raise the event
              RaiseEvent KeyDown(intChar, intShift)
              MsgBox ""
    It is сorrect shows, problem in than can be?
    Last edited by coderx; Jan 14th, 2011 at 10:52 AM.

  36. #36

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: VB6 UniControls Summer Release [2008-06-19]

    I haven't taken a look into the source in a long time, but I think KeyDown, KeyPress & KeyUp are implemented incorrectly. They'd need a fix, but at the moment I have no interest to continue the project. A lot of these controls were written in "learn by doing" style, so there are some places where things are not done as they should've been done. I'd pretty much would like to write the controls again from nothing, using old code as reference, but I don't have the time to do that.

  37. #37
    New Member
    Join Date
    Jan 2011
    Posts
    2

    Re: VB6 UniControls Summer Release [2008-06-19]

    As possible correct it? Can be I itself shall correct.
    Last edited by coderx; Jan 14th, 2011 at 10:58 AM.

  38. #38
    New Member
    Join Date
    Aug 2011
    Posts
    4

    Re: VB6 UniControls Summer Release [2008-06-19]

    Good day!
    I downloaded unicontrold but they don't work on my computer


    I was write on kazakh language in it, but it's writing like ???? ??? (ҚҰҮҒҢӘ)

  39. #39
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: VB6 UniControls Summer Release [2008-06-19]

    You need to install the language pack for any language you want to use.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  40. #40
    New Member
    Join Date
    Apr 2009
    Posts
    1

    Re: VB6 UniControls Summer Release [2008-06-19]

    So these controls seems to be what we are looking for except I'm having an issue.

    When I open the sample project I'm able to type ALT-0156 and it shows the correct character.

    When I add a new form to the same project and add a UnitText box to it and try the same test it shows a black line intead of the expected unicode character.

Page 1 of 2 12 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