Results 1 to 32 of 32

Thread: how can copy contents from websites or otherapp like as unicode in IDE vb6?

  1. #1

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    how can copy contents from websites or otherapp like as unicode in IDE vb6?

    i want copy any data like as strings or contents of websites in IDE vb6
    my means is not about copy to forms or objects my means is about use contents in vb6 IDE.

    i know i can fix some fonts in editor format for example set to arabic fonts but i am talking about unicode and like this.or i changed my regional language to persian too(not to be europe).
    for example check this image :

    Name:  111.jpg
Views: 673
Size:  31.2 KB

    i copied and pasted from a website in ide but i cant see it correct or i cant use that content,how can fix it
    Last edited by Black_Storm; Jan 23rd, 2021 at 07:18 PM.

  2. #2
    Lively Member
    Join Date
    Dec 2016
    Posts
    86

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    No way

  3. #3
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    you can use a ctronl ocx for support unicode。Or like a resource file.

  4. #4

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by vb56390 View Post
    No way
    rly?

  5. #5

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by xiaoyao View Post
    you can use a ctronl ocx for support unicode。Or like a resource file.
    are you sure?!!! i am doing talk about vb6 IDE(vb6 Editor) not activex and programming!!!(i told this in description of thread!!!)

  6. #6
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    you can make a VB6 ADD-IN DLL,LIKE THIS:
    Code:
    SUB TEST()
    DIM A
    A="【#01】Chinese"
    b="【#02】arabic "
    
    addin will change A="STR1",B="STR2"
    LIKE THIS ,ADD-IN WILL create new form,with more unicode textbox control and show Unicode Str,and The form is transparent.

    In fact, we just need to see the Unicode text, the code is still in English, just to achieve a false effect.
    As long as you leave a few more lines, you can even display videos and animations in that position. You can also add any code, fold lines, arrows and other UI elements
    If we glue in an Arabic character, we can automatically save it to a file and generate a unique key, which will be replaced in the code.
    If there are five Arabic characters, we can use five Unicode controls to display them, corresponding to five key str
    When modifying, just click these five controls. The corresponding file will be saved automatically.
    Last edited by xiaoyao; Jan 24th, 2021 at 12:02 AM.

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

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    rly?
    100% sure.

    VB6 sources cannot be Unicode encoded files i.e. the compiler cannot handle any Unicode/UTF-8 encoding.

    The only option is to store your arabic texts in the source files as non-readable chunks -- direct Unicode/UTF-8, hex or base64 encoded. In every case these would need to be "decoded" to be used at run-time (e.g. w/ functions like StrConv, FromHex or Base64Decode).

    Another option is to use resource DLLs as already mentioned which do support Unicode to some extend.

    cheers,
    </wqw>

  8. #8

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    of course 0%.
    VB6 IDE does not support UTF-8 or UTF-16? so what is this

    link : https://i.postimg.cc/yNHxXVBm/1.gif

  9. #9

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    ?!!!!

  10. #10

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by xiaoyao View Post
    you can make a VB6 ADD-IN DLL,LIKE THIS:
    Code:
    SUB TEST()
    DIM A
    A="【#01】Chinese"
    b="【#02】arabic "
    
    addin will change A="STR1",B="STR2"
    LIKE THIS ,ADD-IN WILL create new form,with more unicode textbox control and show Unicode Str,and The form is transparent.

    In fact, we just need to see the Unicode text, the code is still in English, just to achieve a false effect.
    As long as you leave a few more lines, you can even display videos and animations in that position. You can also add any code, fold lines, arrows and other UI elements
    If we glue in an Arabic character, we can automatically save it to a file and generate a unique key, which will be replaced in the code.
    If there are five Arabic characters, we can use five Unicode controls to display them, corresponding to five key str
    When modifying, just click these five controls. The corresponding file will be saved automatically.
    not interested,i am doing talk about vb6 IDE and support utf-8 or utf-16 or displaying the characters not like as Windows-1252 (Western Europe) encoding ,i am not taking about programming or converting strings to unicode or like this ...,i am looking for fix vb6 ide encode problem, i did try for convert charachters with notepad++ to other encoding too and then paste in vb6 ide but not worked yet.

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

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    of course 0%.
    VB6 IDE does not support UTF-8 or UTF-16? so what is this
    I'm positive it is reading ANSI source files (in current codepage) but stores strings as Unicode in the final executable.

    Why did you get questions marks in your first post if Unicode support is available in the IDE?

    cheers,
    </wqw>

  12. #12

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    i checked that site and its not possible copy paste direct in vb6 ide,so how possible in that gif animated?

    Why did you get questions marks in your first post if Unicode support is available in the IDE?
    its clear because its a question for summary idea and find solutions.

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

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    its clear because its a question for summary idea and find solutions.
    You are waiting for some other idea/solution besides storing Unicode texts as hex/base64 encoded chunks in the source code or keeping them in a separate resource DLL?

    cheers,
    </wqw>

  14. #14
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    you can change unicode text to picture by gdi,draw on screen by gdiplus,so it's easy.
    in fact ,if len(text)=20,draw picture about width ** on a new form,if double click,you can change the text ,and re draw again.

  15. #15
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    i want copy any data like as strings or contents of websites in IDE vb6
    I'm pretty sure that VB6 IDE can only understand 8 bit ANSI Strings. Visual Studio 6 was created when Windows itself was still largely an ANSI operating system. If you want to use Unicode Strings you need to store them externally and perform all operations on them using functions that are known to be able to handle Unicode.

    May we ask why is it so important to include the Strings directly in the source code?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  16. #16
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    of course 0%.
    VB6 IDE does not support UTF-8 or UTF-16? so what is this

    link : https://i.postimg.cc/yNHxXVBm/1.gif
    It is still ANSI, it must have worked because you have your locale set to Arabic, but it is not Unicode.

  17. #17
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    One workaround is what wqweto suggested, of encoding and decoding Base64.

    I used another approach, that is setting arrays, like this:

    Code:
    Text = StrFromArray(70, 6, 53, 6, 74, 6, 32, 0, 65, 6, 42, 6, 44, 6, 57, 6, 68, 6, 71, 6, 39, 6, 32, 0, 42, 6, 40, 6, 47, 6, 72, 6, 32, 0, 40, 0, 35, 6, 74, 6, 32, 0, 39, 6, 68, 6, 35, 6, 45, 6, 49, 6, 65, 6, 41, 0, 32, 0, 72, 6, 67, 6, 35, 6, 70, 6, 71, 6, 39, 6, 32, 0, 70, 6, 53, 6, 32, 0, 69, 6, 66, 6, 49, 6, 72, 6, 33, 6, 46, 0) ' ANSI: "äÕí ÝÊÌÚáåÇ ÊÈÏæ (Ãí ÇáÃÍÑÝ) æßÃäåÇ äÕ ãÞÑæÁ."
    This Arabic text is: نصي فتجعلها تبدو (أي الأحرف) وكأنها نص مقروء.

    The auxiliary function is:

    Code:
    Private Function StrFromArray(ParamArray ByteCodes() As Variant) As String
        Dim c As Long
        Dim u As Long
        Dim iByteArray() As Byte
        
        u = UBound(ByteCodes)
        ReDim iByteArray(0 To u)
        For c = 0 To u
            iByteArray(c) = ByteCodes(c)
        Next c
        StrFromArray = iByteArray
    End Function
    I have a generator to convert the contents of the clipboard from Arabic, Chinese, Hebrew and Greek to this code. It is attached.

    If this program has to be used too frequently, it could be turned into an add-in, for easing the insertion of this Unicode array-encoded texts into VB6 code panes.

    The generator currently do not handle lines breaks ( _) when the code line gets too long. It was intended originally mostly for captions that usually are not long texts. But that feature could be added if needed to handle long texts frequently.
    Attached Files Attached Files

  18. #18

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Eduardo- View Post
    It is still ANSI, it must have worked because you have your locale set to Arabic, but it is not Unicode.
    if u read #1 i told about changing local and my local language is not arabic its persian and still not work with change local in regional language,i talked about font option too and if u can check that site i did use in gif images too,if u copy pase into vb6 ide it shown like as ???????????? , site link is : https://docs.zarinpal.com/paymentGateway/guide

    for better description about check ansi i can show this results:

    when i copy from view source of that site and paste into notepad++ ,i can see this encode utf8

    Attachment 180005

    and for ansi ,when i changed to ansi it will be changed like as :

    Attachment 180006

    so not possible to copy paste direct into vb6 ide.

  19. #19

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    any idea to can fix this problem about vb6 ide,i am waiting for any addons or ...
    Last edited by Black_Storm; Jan 25th, 2021 at 11:31 PM.

  20. #20

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Niya View Post
    I'm pretty sure that VB6 IDE can only understand 8 bit ANSI Strings. Visual Studio 6 was created when Windows itself was still largely an ANSI operating system. If you want to use Unicode Strings you need to store them externally and perform all operations on them using functions that are known to be able to handle Unicode.

    May we ask why is it so important to include the Strings directly in the source code?
    because its big help for copy paste data direct into variables or arrays or ... without retype again or converting(maybe not work) or like this ...
    for example i have a array(100) about error messages so i can copy paste fast messages from that site to my array. or any like this ...

  21. #21
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    any idea to can fix this problem about vb6 ide,i am waiting for any addons or ...
    There won't be any idea to fix that issue because it would require a new IDE.

    Did you see the sample code and project that I posted? It took me like 20 minutes to adapt that from what I had.

  22. #22

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Eduardo- View Post
    There won't be any idea to fix that issue because it would require a new IDE.

    Did you see the sample code and project that I posted? It took me like 20 minutes to adapt that from what I had.
    yes i see,its good but its need more work for fix bugs and convert to add-on type or like this for example a tools for check all strings between sub declarations and change to optioanl locals or like this or change all strings in ide or modules or classes and convert all to .... .

    and if u know any add-ons to can do that send here.
    for example Code SMART can do that(i did not check it yet)?!
    for example i am sure when 1 need work with big texts or big arrays or any like this so this is good tools and useful.

  23. #23
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    yes i see,its good but its need more work for fix bugs and convert to add-on type or like this
    What bugs?

    Quote Originally Posted by Black_Storm View Post
    for example a tools for check all strings between sub declarations and change to optioanl locals or like this or change all strings in ide or modules or classes and convert all to .... .
    I didn't understand. Try to write clearer.

    Quote Originally Posted by Black_Storm View Post
    and if u know any add-ons to can do that send here.
    for example Code SMART can do that(i did not check it yet)?!
    Can do what?

  24. #24
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    The method I invented is the best and the only one.

    IIf the current module has eight pieces of UNICODE text.
    There are only five paragraphs visible on the screen, so we create a transparent form, display these five paragraphs of text in the form of pictures, and superimpose them on the code window.
    vb6 code:
    a="【unicode1????】"
    b="【unicode2????】"
    Our character field is automatically replaced with a picture to display UNICODE text.

  25. #25
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    any idea to can fix this problem about vb6 ide,i am waiting for any addons or ...
    Look bro, if you insist on not exploring the alternate solutions suggested and you absolutely must have a Unicode IDE then download Visual Studio 2019 and use VB.Net. It's completely free and that IDE has no problems handling as much Unicode literals as you want:-


    Your other choice is to wait for TwinBasic which is a modern VB6 compatible substitute currently in development. It's highly probably that will have a Unicode IDE. I expect it would be available within the next 2 years.

    You can also check out this thread. Maybe you find something useful there.
    Last edited by Niya; Jan 27th, 2021 at 07:51 AM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  26. #26
    Member
    Join Date
    Jan 2021
    Posts
    46

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Since the problem is only with VB6 IDE, I have been using a workaround.

    I use a Unicode-aware Textbox.

    Paste the string in the textbox, during Run time.
    Use SaveSetting (in the Form_Unload) to put it in the registry.
    In Form_Load, use GetSetting to get it from registry and use it wherever you want.

    That's it.

  27. #27

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Niya View Post
    Look bro, if you insist on not exploring the alternate solutions suggested and you absolutely must have a Unicode IDE then download Visual Studio 2019 and use VB.Net. It's completely free and that IDE has no problems handling as much Unicode literals as you want:-


    Your other choice is to wait for TwinBasic which is a modern VB6 compatible substitute currently in development. It's highly probably that will have a Unicode IDE. I expect it would be available within the next 2 years.

    You can also check out this thread. Maybe you find something useful there.

    -its not about use any ide unicode support for example we can install notepad++ or visual studio code (very small size ide editor and unicode support) not like as big ide like as visual studio.net 2019 or 2020 or 2021 or ... , i want can copy content like as website page in vb6 ide because i need use in programmming for variabl or show messages or like this....

    - about other choice i can wait for publish twinbasic but need waiting for unknow time publishing.

    3- about link i readed about before send this new thread here and i searched in google so i did not find any result yet so i made new thread here(i writed about it my thread in #1 its not work change local or change font in options).

    thankd and i am still wait here for ideas or addons ...
    Last edited by Black_Storm; Jan 28th, 2021 at 02:10 AM.

  28. #28

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Yakkov View Post
    Since the problem is only with VB6 IDE, I have been using a workaround.

    I use a Unicode-aware Textbox.

    Paste the string in the textbox, during Run time.
    Use SaveSetting (in the Form_Unload) to put it in the registry.
    In Form_Load, use GetSetting to get it from registry and use it wherever you want.

    That's it.

    send sample source code and attach for better check.
    but its important to can use in vb6 ide editor.

  29. #29
    Member
    Join Date
    Jan 2021
    Posts
    46

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Black_Storm View Post
    but its important to can use in vb6 ide editor.
    IDE Editor cannot handle Unicode.
    Everyone has already said that in this thread.
    You refuse to believe that.

    Hope your dreams come true. It will help me also.

  30. #30

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by Yakkov View Post
    IDE Editor cannot handle Unicode.
    Everyone has already said that in this thread.
    You refuse to believe that.

    Hope your dreams come true. It will help me also.
    thanks for your help hahaha but i did show in that image and resolved at first time,so possible with diff ways.
    i said this too i created this thread for more idea and any samples like as addon or ... here (if you readed this thread) ,i belive you.you can help yourself more than this.

  31. #31
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    you can put unicode str ,it willbe ???,and show it by add-in。
    I've said many times that this method can certainly be implemented at a cost of maybe $200.

  32. #32

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: how can copy contents from websites or otherapp like as unicode in IDE vb6?

    Quote Originally Posted by xiaoyao View Post
    you can put unicode str ,it willbe ???,and show it by add-in。
    I've said many times that this method can certainly be implemented at a cost of maybe $200.
    its not enough,read #22.

Tags for this Thread

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