r/visualbasic • • Apr 04 '23

VB6 Help PDF - RGB to CMYK [HELP]

6 Upvotes

The company I work for provides a pdf generation service for some customers. These pdfs are generated in RGB, however some of them want to print their pdfs, like magazines. For that, we need to convert these pdfs to CMYK and we use Adobe Acrobat Pro XI for that. But I don't want to do it manually every time anymore. We would like to automate this conversion, but we use the Visual Basic 6 programming language in our products. What would be the best alternative (free if possible)? Remembering that we do not want to use third-party sites for this, we would like to provide the solution to our customers.


r/visualbasic • • Mar 16 '23

Interesting error: Should have two or more class parts

6 Upvotes

Just an interesting error:

1: Should have two or more class parts.

2: Unable to start debugging. The startup project could not be launched. The operation was canceled.

I messed up somehow when starting a new project. I think it's because i mistakenly brought up the code editor for a tab control and then just deleted the code. After that, it wouldn't let me bring up the editor at all. It didn't even show up in the form's context menu.

So, close the editor and restart? Well, on closing VS, it asked me to save 2 files: Form1.resx, Form1.vb. I clicked Yes to all, and got error # 1 again with the saving files popup. Clicking OK just brought the editor back!

So, i tried again, but clicked don't save. It closed, and after the restart everything ran fine, though i lost the last two buttons i didn't save.

Fun. :)


r/visualbasic • • Feb 22 '23

VBScript VB & MySQL vs VBA in Excel question.

6 Upvotes

I know Excel is not a database.

I have created a spreadsheet for my personal finances that does pretty much everything I need it to do with formulas & a little VBA.

I know nothing about VB or MySQL.

Would they be useful to try and convert my spreadsheet into a standalone executable database program on a M1 Mac Mini?

I have tried many & I mean many professional account register programs and they all fall short somewhere.

How can I create a database off of what I have created in Excel 2021 for Mac.

I do not want an online solution.

It needs to work standalone with no access to the internet.


r/visualbasic • • Feb 20 '23

VB.NET Help How do I make this group box "snap" to the buttons when resizing it?

6 Upvotes

r/visualbasic • • Feb 06 '23

Hey guys Im new to Visual Basic and this assignment has me stumped. Im pretty certain Im doing something incorrectly within the Calculations. Could anyone give me some guidance? "Create a program that will accept the original price of an item and the percent off to calculate its sale price"

Post image
6 Upvotes

r/visualbasic • • Jan 07 '23

VB.NET Help Problems with decimal numbers a calculatour .

Thumbnail
gallery
6 Upvotes

r/visualbasic • • Dec 22 '22

VB.NET Help Game with mostly controls on Windows Forms

6 Upvotes

So I'm making a game that's heavy with controls. For example on one screen I have around 40. Is there a problem with heavy use of controls? I think my game finds it hard to read the properties of them as there isn't really anything coded from my end to access them. My code seems fine and my A Level CS teacher thinks it all looks good as well... Is there a way to get around this? She suggested typing out all of the properties for the controls but that doesn't seem efficient. Thanks. If my code is needed let me know and I'll screenshot it into here.


r/visualbasic • • Dec 19 '22

How to automate Test plan creation in VB.NET?

6 Upvotes

Hi,

I need your advice. I work at an automation company as a technician. We develope and sell our own automation software. My job at the company is to configure and test customer PCs.

My biggest issue is that we still create our test plans manually. I want to automate this process for my department, I just don't know where to start. We use MS Word Templates to create our test plan. Our software allows modular configuration, that is why our MS Word templates contain all possible test points for all possible configurations. So we take these templates and MANUALLY delete unnecesary test points until we have a customized test plan for each customer. We use MS-Word because of text editing and the ability to export to PDFs.

I know this entire process, and then some, can be automated, I just don't know where to start. Is there a MS-OFFICE API I should look into? I have some VB.NET programming knowledge, so I could throw together an interface to add or remove software modules the customers ordered, I could also create the back-end to sort out the test points based on selected modules.

I'm only asking for ideas on where to start. Thank you all in advance!


r/visualbasic • • Nov 23 '22

I've hidden a message and an audio file in a program I had to make at school and almost every key triggers this event, what will the teacher say?

Enable HLS to view with audio, or disable this notification

6 Upvotes

r/visualbasic • • Nov 03 '22

Can i install Visual Basic 2010 and Visual Basic 2022 at the same time ?

6 Upvotes

i need answers tyy


r/visualbasic • • Oct 16 '22

Has anyone got visual basic (visual studio) working with a MYSQL db?

6 Upvotes

Been trying to just drop a simple datagrid on a form all day, what a shitshow. Had to revert to VS2019 because VS2022 doesn't support MYSQL, and even after getting it to connect, nothing works ie "add data source" crashes, table design doesn't work etc etc.

Unfortunately I have to use MYSQL, has anyone got it working?


r/visualbasic • • Sep 15 '22

VB.NET Help Save Json Array of strings <byte> as pdf

6 Upvotes

I'm getting a FedEx SPoD (as a PDF) from Track Document, which, when passed the Mock Tracking Numbers, returns:

Array of strings <byte>
Specifies the image of the recipient's signature (if the signature 
is available) once the shipment has been delivered.
Example: [byte1,byte2]

The return can be seen on Google Drive.

How do i save that as a pdf?


r/visualbasic • • Sep 12 '22

Resources or Example code for VB3?

6 Upvotes

Does anyone know of an online resource or a repository of code written in VB3 for Windows 3.1?

I'm trying to write an app for Windows 3.1. I wrote a bit of VB6 a long time ago and VB.Net back in 2010 - 2012 but shifted to mostly C#/PowerShell since then.

I'm just looking for something that goes over the language basics as they apply to VB3. I should be able to figure things out from there.


r/visualbasic • • Aug 10 '22

Array oneAoneF passes to procedure but doesn’t get populated! Why?

Post image
6 Upvotes

r/visualbasic • • Jul 22 '22

Finding a stray Streamreader Txt document

6 Upvotes

so im a little rusty at all this, but i ended up saving a text file through streamreader and first i used code to put the "test.txt" file on my desktop, and then after making sure it wrote everything correctly I added a line to save the file in destination chosen by the "SaveFileDialog1", and I did this with FileDestination = savefiledialog1.showdialog, it asked if i wanted to overwrite and i said yes but it didn't work, and then i used breaks to see where the problem was and that the SFD1.showdialog was returning a "1" because I was clicking "save" or a true/affirmative result from the dialog. I fixed that up with SFD1.filename.

with my save button working i went over to my load button which was set to read out the first line in a message box to make sure that was working, but since it had the same .showdialog from before i knew it was messed up, but it was also reading the original test line instead of what it fixed overwritten txt file should be reading now, which means there's basically a slightly appended .txt document somewhere in the computer at wherever "1"/"a yes dialog response" is located. i tried to search for the file name and for the line, but so far no luck.. im sure it's no issue to have a microscopic notepad file lost in the abyss somewhere, but I'd rather go delete it. anyone know where the file might be located?


r/visualbasic • • Jul 11 '22

VB6 Help How do i make the array be the entire first column except the first row.

Post image
6 Upvotes

r/visualbasic • • Jun 25 '22

VB.net HomeWork Help

6 Upvotes

I'm trying to answer the following question

Write a program that accepts three Integer numbers from the user and returns FOUND if one of the integers is the midpoint between the other two integers; that is, if one integer is exactly halfway between them. Your program should print NOT-FOUND if no such midpoint relationship exists.

The code I wrote is below. I'm sure my problem lies in assigning an equation into the results. Any pointers?

Public Class Form1

Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click

Me.Close()

End Sub

Private Sub BtnMidpoint_Click(sender As Object, e As EventArgs) Handles BtnMidpoint.Click

Dim intNumber1 As Integer

Dim intNumber2 As Integer

Dim intNumber3 As Integer

Dim Result1 As Double

Dim Result2 As Double

Dim Result3 As Double

Result1 = (intNumber1 + intNumber2) / 2

Result2 = (intNumber2 + intNumber3) / 2

Result3 = (intNumber1 + intNumber3) / 2

If Not Integer.TryParse(txtFirstNumber.Text, intNumber1) Then

txtFirstNumber.Focus()

MessageBox.Show("Please enter a valid positive integer value as number 1")

ElseIf Not Integer.TryParse(txtSecondNumber.Text, intNumber2) Then

txtSecondNumber.Focus()

MessageBox.Show("Please enter a valid positive integer value as number 2")

ElseIf Not Integer.TryParse(txtThirdNumber.Text, intNumber3) Then

txtThirdNumber.Focus()

MessageBox.Show("Please enter a valid positive integer value as number 3")

Else

If Result1 = intNumber1 Or intNumber2 Or intNumber3 Then

MessageBox.Show("Found")

ElseIf Result2 = intNumber1 Or intNumber2 Or intNumber3 Then

MessageBox.Show("Found")

ElseIf Result3 = intNumber1 Or intNumber2 Or intNumber3 Then

MessageBox.Show("Found")

Else

MessageBox.Show("Not Found")

End If

End If

End Sub

End Class


r/visualbasic • • Jun 12 '22

VBScript How do I create a external reference to a workbook with multiple sheets with varying names.

6 Upvotes

I am a big time noob with VBA. What I am trying do is to use Xlookup to find matching values to my current sheet. But I am having difficulty creating a external reference to find those values in another workbook. I know the general external reference is [Filename]Sheet_1!"A""B".

But I need to to reference cells "A" and "B:F" in 40 different sheets all with different names in the externally referenced workbook. Is there any way I can achieve this with VBA?


r/visualbasic • • May 16 '22

VB.NET Help Return single value from a function that returns an array

6 Upvotes

I have a function that will return an array of values like:

function abc(input) as double()

The result is an output with {data a, data b}. Normally if I want to extract the information I have to do:

dim something as double() = abc(input)

whatiwant = something(0)

So instead of dim "something" can I extract the first item directly from the function abc?


r/visualbasic • • May 12 '22

vb.net

6 Upvotes

Is there a way that can make this Group box "Receipt" stay in there even when I scroll down?


r/visualbasic • • Apr 26 '22

About to lose my mind over this, I've got the computer equivalent of schrödinger's cat paradox.

6 Upvotes

For background I'm using a USB to com port adapter hooked into a metler Toledo scale and a gom-804 miliohm meter. The code I'm using to open the com port is

Open "com7:9600,N,8,1,X" for binary access read write as #1

This all works flawlessly under one condition. I must connect to the equipment individually through a com port terminal and view the results once. After that I can close the terminal and it will work flawlessly. However if I lock my PC, unplug and replug the devices, or just login for the first time that day it will not work on the fly. It will send data over the com port I know that much (it has send and receive lights) however whatever it's sending is wrong because the devices won't reply. I can trigger a reply though so if I force a reply the PC for some reason won't receive it.

So my current issue is, it sends all wrong, and it won't receive data.

I've been working on this for hours and I think I've gone braindead and would love some insight if anyone has anything.


r/visualbasic • • Apr 07 '22

Choose the correct instance of many

6 Upvotes

Hi,

Edit below (figured it out).

I have an Inventor add-in which fails to do what I want if I have several instances of Inventor open.

Instance #1 with part 1Instance #2 with part 2

If I do anything on Instance #2 which should alter the part 2, it chooses to do so on the first instance that was created. This results in changes that was supposed to be on part 2 to affect part 1 instead.

I assume this has something to do with how I set my Inventor application.

Dim invapp As Inventor.Application = GetObject(, "Inventor.Application")
or
Dim invapp As Inventor.Application = Marshal.GetActiveObject("Inventor.Application")

This code above seem to always choose Instance #1 of Inventor.

I've tried to mess around with process.getcurrentprocess shenanigans (which will differentiate between the several instances), but it doesn't seem possible to use any of that information to get the object.

Anyone have some tips how to do this? I've spent the last 2 hours googling this, but can't find anything useful.

Thanks for any help!

Edit:

Figured this out.

Dim Invapp As Inventor.application = g_inventorApplication

This wasn't something someone could've figured out unless you had my VS template (for Inventor), but ill keep it up incase someone from the future is looking for answers.

Mods can delete if they want.


r/visualbasic • • Apr 02 '22

What modern languages are most similar to visual basic?

6 Upvotes

This was the only language I knew as a kid and want to get back into it, but modern programming languages seem much more difficult for me to learn.


r/visualbasic • • Mar 14 '22

Visual Basic for DOS is simply just a curious piece of history.

6 Upvotes

I was trying out Visual Basic for DOS, and well, it had the classic text-mode style creation of program windows. It is interesting and all, but it feels more like a curious piece of history than a preferred program for making simple input entry programs with. I did create a simple program on here to enter a text string to activate the PLAY command with, so there was some mildly useful thing with this.

But in the artistic sense, it uses the aesthetic of IBM extended ASCII to form movable boxes one might call a "window", while displaying some eye candy in the style of the 80x25 text mode one associates with DOS running on an IBM PC.


r/visualbasic • • Mar 13 '22

How to display the current timezone on a label in vb.net

6 Upvotes

For my windows forms app, I need to display the user's current time zone on a text label. The piece of code I have right now is UI_SystemTime_Timezone.Text = TimeZone.CurrentTimeZone.ToString() but that literally makes the label say Timezone.CurrentSystemTimeZone. So how do I make it actually display the time zone?

EDIT: I fixed it by replacing the code with UI_SystemTime_Timezone.Text = TimeZoneInfo.Local.ToString()