Results 1 to 14 of 14

Thread: CreateThread Sample--Vfb(Visual Freebasic),vb7,WinFBE

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    CreateThread Sample--Vfb(Visual Freebasic),vb7,WinFBE

    Code:
    Sub Form1_Command2_BN_Clicked(hWndForm As hWnd, hWndControl As hWnd)  '单击
       Dim ABC As String Ptr = New String
       *ABC = "China"
    
       'CreateThread (NULL,0,@ThreadSub,ABC,0,0)
        Threaddetach ThreadCreate(Cast(Any Ptr ,@ThreadSub) ,ABC)
    End Sub
    
    Sub ThreadSub(StrAPtr As String Ptr)
       MsgBox *StrAPtr
       Delete  StrAPtr
    End Sub
    sub ThreadSub2(Arg1 As LPVOID)
       MsgBox *Cast(String Ptr,Arg1)
       Delete  Arg1
    End Sub
    
    Sub ThreadSub3(Arg1 As Any Ptr)
       MsgBox *Cast(String Ptr,Arg1)
       Delete  Arg1
    End Sub
    VB6 has stopped updating for 25 years. We have a development tool similar to VB6. Everyone is welcome to use it together and let the VISUAL BASIC syntax last forever.

    vfb(visual freebasic),ide like vb6,vb7.support x64,createthread,asm code
    (94) Vfb IDE【Visual Freebasic】Like vb6,vb7,Update2021-2-23 - freebasic.net
    https://www.freebasic.net/forum/view...hp?f=8&t=28522
    download vfb ide:
    https://github.com/xiaoyaocode163/VisualFreeBasic
    http://www.yfvb.com/soft-48.htm (version 5.5.3,update:2021-2-23)
    Last edited by xiaoyao; Mar 11th, 2021 at 07:21 AM.

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    All Freebasic Code Sample,Vfb(Visual Freebasic),Like VB6,VB7

    VB6 has stopped updating for 25 years. We have a development tool similar to VB6. Everyone is welcome to use it together and let the VISUAL BASIC syntax last forever.

    vfb(visual freebasic),ide like vb6,vb7.support x64,createthread,asm code
    (94) Vfb IDE【Visual Freebasic】Like vb6,vb7,Update2021-2-23 - freebasic.net
    https://www.freebasic.net/forum/view...hp?f=8&t=28522
    download vfb ide:
    https://github.com/xiaoyaocode163/VisualFreeBasic
    http://www.yfvb.com/soft-48.htm (version 5.5.3,update:2021-2-23)

    ============================
    sample 1:CreateThread Sample--Vfb(Visual Freebasic),vb7,WinFBE-VBForums
    https://www.vbforums.com/showthread....68#post5513868

    sample2:vfb use Miniblink ,chromium,Chrome core only one dll-VBForums

    Sample3: Call PrintF,MessageboxW by Asm,Call windows api--Vfb(Visual Freebasic),vb7,WinFBE
    Last edited by xiaoyao; Mar 11th, 2021 at 08:24 AM.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: All Freebasic Code Sample,Vfb(Visual Freebasic),Like VB6,VB7

    CALL Printf by asm:
    Code:
    dim as string frmt = !"%s %s\n"
    dim as string hello = "Hello"
    dim as string world = "world"
    asm
          mov  eax, [world]
          push eax 
          mov  eax, [hello]
          push eax 
          mov  eax, [frmt] 
          push eax 
          call printf 
          'clean up the stack so that main can exit cleanly 
          'use the unused register ebx to do the cleanup 
          pop  ebx 
          pop  ebx 
          pop  ebx
    end asm

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Call PrintF,MessageboxW by Asm,Call windows api--Vfb(Visual Freebasic),vb7,WinFBE

    Code:
    dim as string frmt = !"%s %s\n"
    dim as string hello = "Hello"
    dim as string world = "world"
    asm
          mov  eax, [world]
          push eax 
          mov  eax, [hello]
          push eax 
          mov  eax, [frmt] 
          push eax 
          call printf 
          'clean up the stack so that main can exit cleanly 
          'use the unused register ebx to do the cleanup 
          pop  ebx 
          pop  ebx 
          pop  ebx
    end asm    
    
    Sub AsmMessageboxW()
       Dim sText as WString*50="Info"
       Dim sCaption as WString*50="TitleStr"
       Asm
          push 0
          lea edi,[sCaption]
          lea esi,[sText]
          PUSH EDI
          push esi
          push 0
          Call MessageBoxw
       End asm
    End Sub
    Code:
    Sub AsmMessageboxA()
    Dim sText as String
    sText="Info"   
    Dim sCaption as String
    sCaption ="TitleStr"        
    
       Asm
          push 0
          lea edi,[sCaption]
          lea esi,[sText]
          PUSH [edi]
          push [esi]
          push 0
          Call MessageBoxA     
       End asm
    
    End Sub
    Code:
      Sub AsmMessageboxW()
    'Need to set the properties of the project to :UNICODE mode
    ' This is the standard way of writing. Remember, the string that interacts with the API must be a zStr or wStr pointer.
    Dim sText as WString PTR 
    Dim sCaption as WString PTR
    sText=@"Info"   
    sCaption =@"TitleStr"        
    
       Asm
          push 0
          push [sCaption]
          push [sText]
          push 0
          Call MessageBoxW     
       End asm
    End Sub
    VB6 has stopped updating for 25 years. We have a development tool similar to VB6. Everyone is welcome to use it together and let the VISUAL BASIC syntax last forever.

    vfb(visual freebasic),ide like vb6,vb7.support x64,createthread,asm code
    (94) Vfb IDE【Visual Freebasic】Like vb6,vb7,Update2021-2-23 - freebasic.net
    https://www.freebasic.net/forum/view...hp?f=8&t=28522
    download vfb ide:
    https://github.com/xiaoyaocode163/VisualFreeBasic
    http://www.yfvb.com/soft-48.htm (version 5.5.3,update:2021-2-23)
    Last edited by xiaoyao; Mar 11th, 2021 at 09:08 AM.

  5. #5

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: Call PrintF,MessageboxW by Asm,Call windows api--Vfb(Visual Freebasic),vb7,WinFBE

    Quote Originally Posted by The trick View Post
    Please stop spam! You have a single thread here. Post all the related resources there.
    like call ado
    com excel.application
    all not same code sample

    LIKE YOUR CODE,Each piece of different function code is a new post page:
    Multithreading without dependencies|EXE loader|Inline assembler Add-in|Kernel-mode driver on VB6|Multithreading in StandartEXE
    Native VB6-DLL|Code injection to other process|DLL injection|DirectX9|DirectSound|TrickControls|MP3 player from memory
    Easy calling by pointer|Hash-table|Safe subclassing|Vocoder|Creation of native DLL|COM-DLL without registration|FM-synthesizer
    FFT spectrum-analyser|3D Fir-tree|Asynch waiter|Wave steganography|Fast AVI-trimmer|Windows with custom rendering
    String to integer and vice versa|Multithreading with marshaling|Owner-draw listbox mod|Advanced math|Library info|TrickSound class
    Create GIF-animation|Store data to self-EXE|Computer creates a music|Hello World in machine codes|VBPNG|Signal spectrum
    secp256k1 library - generate Bitcoin keys|VBCdeclFix - use CDECL functions in VB6

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: Call PrintF,MessageboxW by Asm,Call windows api--Vfb(Visual Freebasic),vb7,WinFBE

    It’s just to post new posts for some of the more important, main, code examples that are difficult to implement in VB. It’s not just to post one post for every question, so tens of thousands of topics are not enough to post.

  8. #8
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    Re: CreateThread Sample--Vfb(Visual Freebasic),vb7,WinFBE

    Moderator Actions - Moved thread to Codebank Other
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  9. #9
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    Re: CreateThread Sample--Vfb(Visual Freebasic),vb7,WinFBE

    Moderator Actions #2 - Merged (essentially) duplicate threads into one
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  10. #10
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: All Freebasic Code Sample,Vfb(Visual Freebasic),Like VB6,VB7

    This is not VB6, so it does not belong in the Codebank for VB6.
    The moderators have created a new thread in a different sub forum for you.
    Place in this forum your VFB samples.

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: All Freebasic Code Sample,Vfb(Visual Freebasic),Like VB6,VB7

    Visual Freebasic IDE,It's like vb6,and other code bank have only 5 pages posts,That section has no effect at all, no one will browse and view the code。

    In actual work, we generally use Freebasic to write code to achieve some work that VB6 cannot complete, such as standard DLL, cdecl call, assembly, and extension of the functions of VB6. In fact, it is equivalent to a subset of VB6, because it is too much to surpass VB6. Difficult, better than VB6 in some aspects.
    Some people are anti-editing MSVBVM60.DLL, and some people are developing a new IDE similar to vb6. It turns out that there has been almost no progress in 10-20 years.
    Only the Freebasic series has achieved a breakthrough in just two years. WinfbE editor and Vfb (Visual Freebasic), these two tools are similar to VB6 in many places. Winfbe also supports two operating systems, linux and WINDOWS. Only when more people use it together, can vb fans truly continue and develop.

    (94) WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V2.1.8 November 19, 2020) - freebasic.net
    https://www.freebasic.net/forum/view...hp?f=8&t=25215

    The author may be Canadian. I don't know how many developers in Russia use Freebasic-related IDEs.
    Microsoft has stopped updating vb.net. At present, the freebasic programming language is more promising. His compiler is free and open source. Now many IDEs (most of which are open source) have been invented, but unfortunately there are no big companies to participate in the development. . Don't you have any money? If a company dares to acquire java and mysql like oracle, Freebasic will one day be as easy to use as delphi, and it is possible to surpass VB6.
    Last edited by xiaoyao; Mar 11th, 2021 at 12:52 PM.

  12. #12
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: All Freebasic Code Sample,Vfb(Visual Freebasic),Like VB6,VB7

    Thus it’s not VB6, useful, but not VB6

  13. #13
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    Re: CreateThread Sample--Vfb(Visual Freebasic),vb7,WinFBE

    Moderator Actions #3 - Merged (essentially) duplicate threads into one... again

    Please stop making multiple threads with essentially the same content.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  14. #14

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: CreateThread Sample--Vfb(Visual Freebasic),vb7,WinFBE

    It's a pity that BASIC was the most important product of Microsoft from the beginning. Give up from VB6, then give up VB.NET, then give up IE, EDGE, and embrace Google.
    And using VBA in EXCEL is also ready to give up and switch to PYTHON. wps office supports java scripting language.
    Maybe many old VB programmers hope that VB6 can live another 50 years.
    Freebasic language is older than VB6. There is a language that is hopeful for vigorous development, but there is no company to support it, just like the previous mobile phones such as Nokia and Motorola, as well as some technology companies, all died one by one. There is always his reason

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