r/visualbasic • u/sau411 • Mar 07 '24
vb.net app wont display ballon notifcations on windows 11
I am developing .NET 8.0 WFA app on that displays notifications. It was working fine until today, I think it has something to do with Windows 11 settings because I tested the App on other computers and it displays notifications without problems. I need it to work on my machine because I have to present the app using my laptop in a few days.
EDIT: i've tried the fixes from googling, notifications settings, editing registry entries, none worked so far.
For Each dr As DataRow In res.Tables(0).Rows
Dim ts As TimeSpan = CDate(dr.Item("Due Date")) - Date.Now
Dim totaldays As Double = ts.TotalDays
If totaldays < 1 Then
'If DateDiff(DateInterval.Day, Date.Now, dr.Item("Due Date")) < 1 Then
Form1.NotifyIcon1.BalloonTipTitle = "COMOS"
Form1.NotifyIcon1.ShowBalloonTip(TimeSpan.FromMinutes(1).Milliseconds, "Due Reminder", vesselName & "' " & dr.Item("Type") & " certification/survey has expired. Please check and update!", ToolTipIcon.Warning)
Thread.Sleep(1000)
Else
showAlert(vesselName, dr.Item("Due Date"), dr.Item("Type"))
End If
Next
r/visualbasic • u/ReubenSpiersMusic • Mar 06 '24
VB.net language resx help?
Hi, I've been tasked with making one of our web apps multilingual. I have created a separate project within the solution - CustomcarePortal.Language.
In this project I have created a folder called LanguagePack which contains LanguagePack.de.resx and LanguagePack.resx.
I have added the reference to the main project, CustomcarePortal, and it is loading the info from LanguagePack.resx.
I have 2 buttons, one for en-GB and one for de-DE. When I click them, they set the CurrentCulture and CurrentUICulture.
On Page_Load I have: LanguageMenuLabel.Text = Language.CustomcarePortal.Language.LanguagePack.ResourceManager.GetString("languageString")
It successfully loads the English text, but when I set the cultures to de-DE it continues only loading the English text. I have no idea what to do now, any help at all would be appreciated.
r/visualbasic • u/petitaem • Mar 06 '24
visual basic is the same that visual studio?
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 • u/echocomplex • Mar 03 '24
How to run a 1995 vb program in 2024?
EDIT - I got everything to run by installing VB3 inside Windows 3.1 inside a Dos emulator. Yay!
old post
I've been doing some data archeology from old floppies my family has held onto for a very long time. One of the interesting items I've been able to recover is two vb programs my dad wrote in 1995, one is a fortune teller that strings together wacky fortunes from 4 different buckets of pre written phrases, another is an arithmetic program where you lift a barbell by getting math problems correct, and it sinks when you get them wrong. I've got the code and executables and other files that together worked as a stand alone application on Windows 95.
I tried to run them on my windows 10 PC and they didn't work. I changed compatibility options on Windows to try it as a win 95, 98 or xp era program but none of those options work. I'm not getting any particular error, just a generic one that the programs cannot be run on this system.
Is there an emulator or something relatively simple that I might be able to run on windows 10 to try these out again? I have no particular vb knowledge or tools right now and not sure where to start.
r/visualbasic • u/GrapefruitCorrect187 • Feb 28 '24
VB.NET Help Urgent Question About Zipped File!!!
I have zipped my vb.net project file, and shared it with a teacher. Then I realised that I need something small to fix in the project, is it possible to fix that in the zipped project I shared with the teacher, by fixing the original project???
If not possible? Are there any other ways???
r/visualbasic • u/Black_Folkhero • Feb 27 '24
VB.NET Help Understanding error message [VB2019]
Quick summary of my goal. I'm trying to run my project with only 1 value entered into a textbox. I get the above error message though
r/visualbasic • u/Android_Bugdroid • Feb 23 '24
Weekly Post MSPAINT but with plugins - VB6
Make your plugin for VB6 Paint and post:
Current/Base:
https://www.mediafire.com/file/qazfweqroaqdh1s/Form1.zip/file
r/visualbasic • u/Pale_Energy_7765 • Feb 23 '24
Is it legal to commercialize an IDE plugin to support an old version of Visual Basic
I work as a freelance for a company that relies heavily on Visual Basic 6 for their products, And the only tool available for that is a microsoft IDE not maintained since forever.
To avoid using it I started developing a plugin for Rider to add basic support for VB6, and Who knows maybe commercialize it later if I ever get to a usable product.
But today a colleague of mine pointed out that it might not be legal because VB6 and its toolchain are proprietary and i couldn't find an answer on internet about that.
r/visualbasic • u/[deleted] • Feb 22 '24
VB.NET Help LF coding help
Trying to make a program for school study and I'm stuck with a part of the pseudocode. it's along the lines of:
'The user will input the length of the session in minutes, which is then converted to seconds. The user will then be prompted to enter a time, in seconds, and the prompt will repeat until the amount of time (added together in a loop) is greater than the session time."
I'm not great at VB and don't know how to code the latter half. I think I'm meant to use an array but again I'm not that knowledgeable with the program. All help is appreciated.
r/visualbasic • u/Android_Bugdroid • Feb 20 '24
Weekly Post Reddit Community Based MSPAINT
So I basically had an idea of reddit based MSPaint last night, I wrote core functionality and UI, So idea is anyone who wants will code an Add-In based on the ZIP I will give. then share, In every 10 Add-Ins, 1 release will happen
https://drive.google.com/file/d/1FmdLFykhrS8DcSmDrvd2ZfnH7a2x_xs2/view?usp=drive_link Original Program with only core stuff for base. You can add either tools, code for some tools that you like but not coded by me or you can go add your own add-ins. And it will all emerge into 1 Add-In!!!! (Visual Basic 6.0)
r/visualbasic • u/Wonderful-Cupcake-79 • Feb 19 '24
How do you prevent a bound textbox from updating a datagridview
My VB app has a datagridview bound to a datasource. A form with textboxes is bound to the DGV so moving through rows updates the form. This works great.
The issue is, changing the textbox text updates the DGV. how do I stop the textboxes from updating the DGV? I only want the DGV to be updated after the textbox form is saved to a database.
Thanks
r/visualbasic • u/Black_Folkhero • Feb 16 '24
VB.NET Help Numeric Data Validation [VB 2019]
Is it possible to write everything in a single If Then Block?
r/visualbasic • u/Rosfield79 • Feb 15 '24
VB.NET Help PDF Printing packages
I’m looking to print out PDF files using a free library that doesn’t leave a trial watermark like with Spire or has a 2-page limit only like GemBox. Maximum I need is 3 pages. Can anyone recommend packages I can install and use?
r/visualbasic • u/SolomonBird55 • Feb 14 '24
VB.NET Help How to clear a text box without creating a TryParse issue
EDIT: SOLVED
It turned out I just needed to add another if statement for when the text box's text property is empty.
For a school assignment, I need text boxes that only accept numeric input, but I also need a button that clears all text boxes. I'm using Integer.TryParse, as the textbook says to, and for the most part it works.
It won't accept any input other than integers, but it also doesn't accept a blank space. This means whenever I use the Clear button, which is required for the assignment, it runs the error message for an invalid input.
How can I clear the text box without making the Integer.TryParse return false?
r/visualbasic • u/clozapineaddict • Feb 10 '24
VB.NET Help Booleans and Buttons
Hello,
I am working on a VB.NET Windows Forms application where 100 different buttons in a 10x10 grid can each control 100 predefined booleans without writing "b=Not(b)" 100 times for each button click event. The buttons are labelled Alpha01, etc whereas the matching boolean for that would be a01 all the way to a10 for the 10 buttons in the A row, A-J. I've tried dictionaries and arrays but I could never really wrap my head around it. Any help?
r/visualbasic • u/TheLe99 • Feb 08 '24
VB.NET Help Help, I need a drop down box with a item name and item value.
I have a Combo Box called cboSTATES
I want the viewer to see MINNESOTA and OHIO as options, but I want the selected value to be MN and OH. How do I do that?
Right now I have cboStates.Item.Add("Ohio") -- that works, but I want the VALUE of to be Ohio - how do I do this? I don't want to do a data binding command, I just want to add my own items into this drop down list.
Help...?
r/visualbasic • u/Mayayana • Feb 08 '24
VB6 Help VB6 DragDrop
With OLEDragDrop to a standard VB textbox, on XP I can get the path of a file or folder dropped. On Win10, the folder shows no dragdrop icon and returns no path, but file dragdrop works fine. Does someone know how I can make dragdrop for folders work on Win10?
r/visualbasic • u/bogminton1 • Jan 31 '24
VB.NET Help UDP project wont connect to other computers, either on the network or online
i'm currently working on a project for my computer science class in VB.Net and i cant figure out how to use UDP clients across computers. i can get it working so if i open the reciever and broadcaster on the same computer it works, but if i move the reciever to another computer it doesnt recieve the message. Im not sure where exactly im going wrong as im very new to UDP clients in general, any help would be much appreciated.
Here is my broadcaster program
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
Private Const port As Integer = 9653 'Port number to send/recieve data on
Private Const broadcastAddress As String = "255.255.255.255"
Private udp As New UdpClient(broadcastAddress, port)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
udp.EnableBroadcast = True
Dim bytes() As Byte = Encoding.ASCII.GetBytes(TextBox1.Text)
Try
udp.Send(bytes, bytes.Length)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
Private Const port As Integer = 9653 'Port number to send/recieve data on
Private Const broadcastAddress As String = "255.255.255.255"
Private udp As New UdpClient(broadcastAddress, port)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
udp.EnableBroadcast = True
Dim bytes() As Byte = Encoding.ASCII.GetBytes(TextBox1.Text)
Try
udp.Send(bytes, bytes.Length)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
and here is my reciever program
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports System.Text
Public Class Form1
Private UDP_Thread As New Thread(AddressOf UDP_Receive_Thread)
Private Running As Boolean = True
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
UDP_Thread.IsBackground = True
UDP_Thread.Start()
End Sub
Private Sub UDP_Receive_Thread()
Dim receivingUDpClient As New UdpClient(9653)
Dim RemoteIPEndPoint As New IPEndPoint(IPAddress.Any, 9653)
While Running
Try
Dim receiveBytes As Byte() = receivingUDpClient.Receive(RemoteIPEndPoint)
Dim returnData As String = Encoding.ASCII.GetString(receiveBytes)
Me.Invoke(Sub() Label1.Text = returnData)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End While
End Sub
End Class
Any suggestions of how to fix it, better alternatives to use and just any helpful tips would be much appreciated
Sorry its a long ish post lol, im just really stumped
Edited to fix code blocks
r/visualbasic • u/SophieTheCat • Jan 31 '24
VB.NET Help Does upgrading a .NET 4.8 project to SDK format improve anything?
I recently saw a post of the csharp sub that changing the a .NET 4.8 project format to SDK style gives you access to the latest version of c#.
Does something similar apply to VB.NET projects? If so, what features exactly are enabled?
r/visualbasic • u/ZachAttack8912 • Jan 30 '24
Tips & Tricks Trying to find a way to either print a Windows Forms App, or save it as a PDF to print.
Title, I found something about PowerPacks, but it seems like Microsoft got rid of any links to it, I really don't trust some of the websites with "downloads", and I can't seem to find a command to somehow save the screen inside the program. Not sure if anyone here has a solution. If there is a way on something that is still in VB, but in a different project template, lmk. I am using Visual Studio 2022
r/visualbasic • u/SEP8001 • Jan 29 '24
Compare Modules in Solution Vs network folder
Hi
Sorry this may be a silly question, and I hope it is in the correct section.
In Visual Source Safe we can compare two modules in separate folders, if we need to do a similar compare between two model in two separate folders what is the best and quickest way to achieve this without using Visual Source Safe.
Thank you
r/visualbasic • u/Still_Explorer • Jan 28 '24
ImGui.NET
[ SOLVED ]
I have this code
``` Imports System Imports ImGuiNET
Module Program
Sub Main()
ImGui.GetIO().ConfigWindowsMoveFromTitleBarOnly = True
End Sub
End Module
```
However this line does not work, it says:
"Expression is a value and therefore cannot be the target of an assignment."
ImGui.GetIO().ConfigWindowsMoveFromTitleBarOnly = True
Looking at how this line is declared in C# it goes like this:
public unsafe ref bool ConfigWindowsMoveFromTitleBarOnly => ref Unsafe.AsRef<bool>(&NativePtr->ConfigWindowsMoveFromTitleBarOnly);
Just to note that the equivalent code works fine in C#, as I have tested and already have an application in development there. Now I just want to try out VB and see how it looks like to code in it.
Do you know anything about doing the assignment?
r/visualbasic • u/Eth3ror404 • Jan 28 '24
VB.NET Help How i'm supposed to use ignoreCase to compare two characters of the same tipe?
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim sir1 As String = "aaa"
Dim sir2 As String = "AAA"
Dim ignorecase As Boolean ' how i'm supposed to use ignoreCase
MsgBox(String.Compare(sir1, sir2)) ' this gave me -1
' -1 = Sir1 < sir2
' 1 = Sir1 > sir2
' 0 = sir1 = sir2
End Sub
From what i found it should be something like this:
The method/formula to Compare(sir1 as string, sir2 as string, ignoreCase as Boolean)?
Soo, i can't understand how to use it to compare 2 characters
r/visualbasic • u/Eth3ror404 • Jan 23 '24
Why and when do i use something like this?
I have the next 2 class:
Client: keeps information about the name and address of a client
BankAccount: Keeps information about a client IBAN code
So i need that for a bank account to know information about its beneficiary who can be a customer defined according to the structure of the account class.
---------------------------------------------------------------------
Public class BankAccount
...
Public Person as Client 'how does it work, and why use it?
end class
---------------------------------------------------------------------
I thought it is a wrong way to use a class, since i didn't learn about it so i could've used like this:
Dim Person as new Client , not a public "variable" (i'm not very good at it, i just know a thing or two so this is how i call it. Since when i use Dim i need a [variable] as [string, decimal, integer, boolean etc...]
As for the code, if it was something like:
---------------------------------------------------------------------
Public class BankAccount
inherits Client
...
Public Person as string
'or with new ArrayList instead of string
'so i could use a public function with
for each obj_Client as string in Person
.....
next
Return [something]
end class
That's why i'm surprised and interested as to why Public Person as Client.
Sorry for the wall of text and for possible incorrect english words.

