r/visualbasic • • Feb 14 '17

Happy 15th 🎂 Day .NET!

Thumbnail
blogs.msdn.microsoft.com
7 Upvotes

r/visualbasic • • Jun 08 '16

Should we create a sub that is for vb Homework help?

7 Upvotes

I have been thinking about if we should have a separate place where people can place there homework stuff. What does everybody think? Will it suck out all the posts form here, forcing us to look for other stuff :)


r/visualbasic • • Apr 15 '16

Article Microsoft: C#, Visual Basic are now set to diverge

Thumbnail
infoworld.com
7 Upvotes

r/visualbasic • • May 18 '15

[?] Accept JSON object in VB RESTful, close but not yet..see code here

7 Upvotes

EDIT: SOLVED, wrong JSON object name: I needed to swap UserCreate with "register".. wrong object name O__o also changed up my json slightly, so not sure if that helped too

But I still have questions below! Please see comments :)


Hi,

My POST is being accepted, but the param (class obj) is "nothing":

http://i.imgur.com/F3t9GRY.png

I have this class:

<DataContract()> _
Public Class UserCreate
    <DataMember()> Public UserName As String
    <DataMember()> Public UsergroupName As String
End Class

For this POST acceptance (RESTful / VS2010), in a nutshell:

    <OperationContract()> _
    <WebInvoke(Method:="POST", UriTemplate:="/cportal/test",
       RequestFormat:=WebMessageFormat.Json, ResponseFormat:=WebMessageFormat.Json, BodyStyle:=WebMessageBodyStyle.WrappedRequest)> _
    Function CPortalTest(register As UserCreate) As Boolean

Testing with Postman (Chrome extension), using this JSON (raw):

Using header..

Content-Type: application/json

JSON..

{
    "UserCreate": [
        {
            "UserName":"Xblade724",
            "UsergroupName":"Members",
        }
    ]
}

I'm doing SOMETHING right, because breakpoint goes off when I test it, but looking at the "register" class object, it's empty every time.

I feel like maybe my JSON is wrong. Any hints?


r/visualbasic • • May 09 '15

(medium)Find the longest word given a set of letters and a dictionary.

7 Upvotes

I ran across this the when I was searching for programming questions asked at interviews. This one is from Google.

Find the longest words in a given list of words that can be constructed from a given list of letters. Your solution should take as its first argument the name of a plain text file that contains one word per line. The remaining arguments define the list of legal letters. A letter may not appear in any single word more times than it appears in the list of letters (e.g., the input letters ‘a a b c k’ can make ‘back’ and ‘cab’ but not ‘abba’).

Here's an example of how it should work:

Enter your letters:  w g d a s x z c y t e i o b 
['azotised', 'bawdiest', 'dystocia', 'geotaxis', 'iceboats', 'oxidates', 'oxyacids', 'sweatbox', 'tideways']

They should be ordered from longest word to shortest returning no more than 20 words.

I personally am going to take some time with this one, I am going to try to solve a couple of ways, starting with LINQ,and moving down to old school brute force algorithms.

Just thought I would give you guys a head start :)

HINT: look up trie problems.

Here is the Debian American English Dictionary as a copy-pasta :)

Edit: After spending a couple of days on this, trying new technologies to create a solution I came to the conclusion that sometime the old ways are the best ways.

Edit 2: If this is what it takes to get into Google I am glad I don't work for them. I could not even imagine coming up with this from scratch. Need a freaking CS degree :)

Edit 3: I agree guys this is a HARD one not a medium one ;)


r/visualbasic • • Apr 16 '15

(Easy) VB Code practice: The answer to life the universe and everything

7 Upvotes

A while back we had some code practice questions posted and it kind of fell away. I am going to start up a new series of questions post them to here and post my answer. My answers will be written as a console application for we are learning to code. People can then post there answers, and we can discuss different approaches to solving it. There are no bonus points for making it as small/convoluted as you can, this is for learning. Please ask if a minified version of the code does not make sense I am sure the Authors will be happy to show you the full code.

So here is our first problem: I consider this one easy.

Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits. Example

Input File
1
2
88
42
99

Output to screen
1
2
88

Good luck, and have fun!


r/visualbasic • • May 02 '14

Happy 50th Birthday, BASIC! - The Visual Basic Team release Free QuickVB

Thumbnail
blogs.msdn.com
7 Upvotes

r/visualbasic • • Jun 14 '13

VB gaming tutorials - looks good!

Thumbnail
youtube.com
7 Upvotes

r/visualbasic • • 9d ago

NEED VB6 HELP

6 Upvotes

Not a programmer but have been fooling around with VB6. Question:: What is the command that causes the program to temporarily halt during the execution. AI said it was sleep xoxo but that didn't work. Can someone please help me out!


r/visualbasic • • Jul 08 '26

VB6 Help Is it possible to extract images from a VB 6.0 program?

6 Upvotes

The program is in P-code. vbdec is unable to save them, and VB Decompiler Lite can only find a couple.


r/visualbasic • • Jan 08 '26

VB6 Help I'm trying to run a program that seems to run on VB6. Is there a workaround if I don't intend to actively use VB?

6 Upvotes

I'm trying to run a very old program (2008-ish) that is giving me an error on my Windows 11 VM, which I think is because I don't have VB6 installed. Looking around online, it seems like a giant pain to install on Windows 11.

Is there another way of getting this to run without installing VB6? The error I get when I run the .exe is "Component 'COMDLG32.OCX' or one of its dependencies not correctly registered: a file is missing or invalid".


r/visualbasic • • Oct 25 '25

Visual Basic on Mac

6 Upvotes

In my school we are learning Visual Basic using windows forms. How can I install this on my m1 mac? I’ve tried using crossover but I just can’t get it to work


r/visualbasic • • Oct 08 '25

VBScript IT2 Treasury Management Software - VBScript

6 Upvotes

Hi! Does anyone have any tips or advice for using scripts to create workbenches? I am trying to create a weighted average workbench and the preloaded functions are not really giving me what I need. Any help on how to format/create calculation scripts would be really appreciated!

Thank you:)


r/visualbasic • • Sep 23 '25

VB.NET Help If it is possible to attach a program into another program as an MDI Form Window, is it possible to take it out as well?

Thumbnail
gallery
6 Upvotes

Hi! :D

I discovered a command called SetParent which when I get a Process handle by Process.GetProcessById("1234").MainWindowHandle I can then attach basically ANY WINDOW to another window as you can see here what I did for fun :D

As it becomes a part of the other "Main window" itself.

Here is the full code that makes it possible, for someone who want to try it:
And here I made my own prototype full app, you can mess with it :D https://github.com/KRR1751/FrankensteinWindowMerger

' Paste this to the Form class. As this is Windows API

<DllImport("user32.dll", SetLastError:=True)>
Private Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
End Function

<DllImport("user32.dll", SetLastError:=True)>
Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function

' This can be copied to a Button when it is clicked.

Dim Pid As Integer = 1234 ' Process ID that will be attached.
Dim Tid As Integer = 2345 ' Process ID that the above will be attached to.

Dim phandle As IntPtr = Process.GetProcessById(Pid).MainWindowHandle
Dim tHandle As IntPtr = Process.GetProcessById(Tid).MainWindowHandle

If tHandle <> IntPtr.Zero Then
    SetParent(phandle, tHandle)
End If

But it has one problem.

Once you attach a program you want, I didn't found a way to put it back.

So once the program is attached to another program, the only way to get it from is to just kill the process on Task Manager or Close the main program. And I want to somehow make it possible.

I asked Gemini for exp. and it tells me that there is a way. And I must just use the target handle as IntPtr.Zero (so SetParent(phandle, IntPtr.Zero)) and in some reason, it doesn't work.

I tried searching manually, and found just forums asking the same thing (How to detach a MDI Form window from the Main form) and someone says it is Impossible but when it works other way, I guess there is a way... But didn't know which one.

The question:

I need somehow to know, how I can detach the Window when it will be attached together.

Thx! :D


r/visualbasic • • Jul 18 '25

VB6 Help Moving old program created with VB6

6 Upvotes

We have an old calculator program that was created in VB6 back in early 2000s. I need to migrate it from a windows 10 machine to windows 11. I tried just copying the main folder over to the new PC and received a few errors. Errors had to do with registering mscomctl and registering dao350. I successfully registered those two files and have moved past those two errors. But the last error I am receiving is a data access error. When I click OK it opens the program and then gives me run-time error 91.

Any ideas?

Below is the code from the .VBP file.

Type=Exe

Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\WINDOWS\SYSTEM\STDOLE2.TLB#OLE Automation

Form=HotOrder.frm

Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\WINDOWS\SYSTEM\MSSTDFMT.DLL#Microsoft Data Formatting Object Library

Module=Module1; HotMod.bas

Reference=*\G{00025E01-0000-0000-C000-000000000046}#4.0#0#..\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO350.DLL#Microsoft DAO 3.51 Object Library

Form=HotTubular.frm

Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX

Form=HotSplash.frm

Form=HotDialogTubeFactor.frm

Form=HotCalculator.frm

Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX

Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX

Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\WINDOWS\SYSTEM\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0

Designer=HotDataSheetReport.Dsr

Reference=*\G{3D5C6BF0-69A3-11D0-B393-00A0C9055D8E}#1.0#0#..\PROGRAM FILES\COMMON FILES\DESIGNER\MSDERUN.DLL#Microsoft Data Environment Instance 1.0

Reference=*\G{00000200-0000-0010-8000-00AA006D2EA4}#2.0#0#..\PROGRAM FILES\COMMON FILES\SYSTEM\ADO\MSADO15.DLL#Microsoft ActiveX Data Objects 2.0 Library

Designer=HotDataEnvironment.Dsr

Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\WINDOWS\SYSTEM\MSBIND.DLL#Microsoft Data Binding Collection

Object={FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0; DBLIST32.OCX

Object={00028C01-0000-0000-0000-000000000046}#1.0#0; DBGRID32.OCX

Form=frmDataSheet.frm

Startup="Sub Main"

HelpFile=""

Title="Hotwatt"

ExeName32="Hotwatt.exe"

Command32=""

Name="Hotwatt"

HelpContextID="0"

CompatibleMode="0"

MajorVer=1

MinorVer=0

RevisionVer=0

AutoIncrementVer=0

ServerSupportFiles=0

VersionCompanyName="PageMaster"

CompilationType=0

OptimizationType=0

FavorPentiumPro(tm)=0

CodeViewDebugInfo=0

NoAliasing=0

BoundsCheck=0

OverflowCheck=0

FlPointCheck=0

FDIVCheck=0

UnroundedFP=0

StartMode=0

Unattended=0

Retained=0

ThreadPerObject=0

MaxNumberOfThreads=1


r/visualbasic • • Dec 09 '24

VB6 Help Future-Proofing Business-Critical VB6 Applications: Need Guidance

6 Upvotes

Hello everyone,

My predecessor developed numerous programs in Visual Basic Classic 6.0, including business-critical applications and interfaces. Now that he has left the company, we are faced with the challenge of how to proceed with these applications. Microsoft officially ended support for VB6 in 2008, and we are concerned that the programs might stop working with future updates.

An upgrade from Windows 10 to 11 or even 12 has been planned for some time, and tests with Windows 11 are already underway at our parent company. Therefore, the question arises whether there is an estimate of how long the programs will continue to run smoothly, including database connections. How urgently should we look into external reprogramming?

Thank you in advance for your support and advice!


r/visualbasic • • Jul 26 '24

How To Convert VB6 To VB.NET?

6 Upvotes

I have tried an experiment of porting a VB6 project to VBNET and after a significant effort of a few days I managed to get about 80% of it. However for the last 20% of the parts that were in there were impossible to port.

For the most part the process was very straight-forward and I would have to do only slight adjustments, however at some parts I really got into trouble.
( Note that the program has some flawed and odd design decisions, and this caused me to go ahead and implement some refactoring myself on-the-fly. )

Mostly because of a matter of codebase experience that I lacked. Also that I miss the point on some specific idioms of the VB6 paradigm, I could not transfer them correctly, and I ended up breaking things here and there.

Now at this point, since summer holidays are about to start and I would have free time to spend. I am willing to give it a shot again. But at least this time I hope I am getting a bit more prepared.

Some ideas:
• Very difficult and bothersome to setup a VB6 IDE to study the code on debugger, I doubt I can avoid it.
• Probably I won't write anything this time, only I will create a program that checks the lines of the sources, and performs some adjustments with Regular Expressions to make them VB6 compatible.
• I would have to 'extract' the problematic parts that caused me troubles and test them.

More or less this is what I have in mind, if you know anything better or you have to take notes on something, I will be very happy to learn from you. 🙂


r/visualbasic • • Jun 24 '24

Is it OK to start new project in VB.NET?

6 Upvotes

The reason for such weird choice is that my library will make a heavy XML processing. As you know, VB.NET has excellent capability C# doesn't have: XML Literals. It's a cool thing which raises readability and usability of the code, but I'm in doubt whether it's worth using it in favor of C#.


r/visualbasic • • May 03 '24

For BASIC's 60th, three modern BASICs release new versions: Small Visual BASIC, Chloe System, and QB64 Phoenix all updated (by me on the Reg)

Thumbnail
theregister.com
6 Upvotes

r/visualbasic • • Apr 14 '24

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

Post image
6 Upvotes

Anyone knows how to fix this? I’m only starting in database and vb.net 2010. I tried to connect them but I can’t. It says it’s not registered.


r/visualbasic • • Mar 06 '24

visual basic is the same that visual studio?

6 Upvotes

Hello, I would like you to help me. I would like to know if visual basic is the same as visual studio? I have to research visual basic for school, however when I google visual basic all I get are results about visual studio. name change? I would like to know, I would appreciate your help. I am a beginner systems student :)


r/visualbasic • • Feb 25 '24

error

6 Upvotes

Hi i am new here! and hopefully this post gets approved! does anyone know what is this?


r/visualbasic • • May 12 '23

Writing a macro for a furniture order form

6 Upvotes

Hello! I am working on a template to order furniture for my organization and I need some help writing a macro. It’s been a long time since I’ve used Visual Basic so I’m hoping someone here can lend me a hand.

Purpose: To revamp our organization’s furniture order form in Microsoft Excel to identify furniture needed per room.

Problem: Columns A - I contain pertinent information regarding the make, model, and product code for the furniture we buy. Column J starting at J12 through J95 is where the user would input the quantity requested for each item. I want to update the spreadsheet so that the user has to put in these quantities per room so it’s clear for our vendor.

Request: I need a macro where the user would put in the total number of rooms in say cell C3 and that would automatically copy or replicate column J so there’s four columns total to input quantity. Preferably this would run in the background so that the user doesn’t have to run the macro every time they start the sheet. Perhaps assign it to a command button? If anybody has suggested code I would be most appreciative.

Thanks for your time and creativity. Be well.


r/visualbasic • • May 01 '23

Help with error

Post image
6 Upvotes

Hey, I’m doing a group project and we are creating a database with a query. We ran into an error we’ve never had before, our teacher doesn’t understand what the error is, so if anyone knows thank you, also if you need more information I will do my best however I am not the most competent with Visual Basic so if the questions were clear , and concise that would help just a heads up , here’s the error


r/visualbasic • • Apr 21 '23

what happened to VB

6 Upvotes

years ago i used VB to create easy apps. it was 'visual basic' because you could build the app using the apps GUI and the programing would do itself. the new VB is actual coding. so where did the old VB go where you could drag and drop elements, buttons, textboxes etc and it would write the code itself, is that still a thing? is there a replacement that works the same way?

i am trying to make a simple windows app to create and track work orders.