Search the Community
Showing results for tags 'visual basic'.
-
I found a Visual Basic 6 ISO image from winworldpc.com. I was wondering if vb6 is abandonware already or is this piracy and unsafe? https://winworldpc.com/product/microsoft-visual-bas Thanks!
- 4 replies
-
- vb
- visual basic
-
(and 1 more)
Tagged with:
-
i am trying to build a tabbed web browser for uni and i cant work it out, when ever i try and open a new tab, it wont have a browser object in it. i will put the code below and if someone could help it would be much appreciated Public Class Form1 Dim i As Integer Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub Private Sub btn_addtab_Click(sender As Object, e As EventArgs) Handles btn_addtab.Click Dim browse As New WebBrowser TabControl1.TabPages.Add(1, "page" & i) TabControl1.SelectedTab.Controls.Add(browse) browse.Dock = DockStyle.Fill browse.Name = "wb" i = i + 1 End Sub Private Sub btn_removetab_Click(sender As Object, e As EventArgs) Handles btn_removetab.Click If TabControl1.TabCount = 1 Then Me.Close() Else TabControl1.TabPages.RemoveAt(TabControl1.SelectedIndex) TabControl1.SelectTab(TabControl1.TabPages.Count - 1) i = i - 1 End If End Sub Private Sub btn_back_Click(sender As Object, e As EventArgs) Handles btn_back.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack() End Sub Private Sub btn_forward_Click(sender As Object, e As EventArgs) Handles btn_forward.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward() End Sub Private Sub btn_go_Click(sender As Object, e As EventArgs) Handles btn_go.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(TextBox1.Text) End Sub Private Sub btn_refresh_Click(sender As Object, e As EventArgs) Handles btn_refresh.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh() End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Stop() End Sub Private Sub btn_stop_Click(sender As Object, e As EventArgs) Handles btn_stop.Click End Sub End Class
-
Hi, I need help with something! I would like to make a program for myself. It needs to be made using visual basic, but I am a "noob" to programming and don't have much knowledge to start with I would like it to be a fillable form piece of software with database behind, so I could save all the data I put in in a database. Can anyone help?
-
I'm looking to create a basic algorithm that allocates jobs to workers based on skill level and workload. however, I'm stumped at where to start. Background Mobile phone repair store Worker qualifications stored in text files Algorithm is run as button click on the Add Repair Form (VB.net) Requirements Algorithm Reads worker files sequentially, noting the current workload value, finds the worker with at least amount of work checks if he is qualified to do the task If yes assigns job, If no, checks the next worker if 2 workers have the same amount of current jobs reads the first (sorted alphabetically) and runs checks im struggling to even get psuedocode out for this. All Help appreciated (Not asking for a full creation, just how to make this possible, pseudocode wise) Basic attempt at flow chat may help
- 11 replies
-
- job
- allocation
-
(and 3 more)
Tagged with:
-
So I downloaded this Excel thingy that generates reports for my students. I modified the file around to adjust it for myself. The funny thing is that the program stopped working properly for some reason even though I didn't touch the code. I was hoping you could help me out. I modified some stuff in excel, but I don't see anything that is interfering with the code. The modified one is the one with all the mexican names. ¡VIVA MÉXICO! Generate+Reports.xlsm Generate+ReportsVFortino.xlsm
-
- visual basic
- excel
- (and 4 more)
-
I am using Cheat Engine to get addresses to edit something in the application. But it seems like I'm doing it wrong when putting the values in Visual Studio using Read/WriteProcessMemory and Visual Basic. Here is the values I got in Cheat Engine. Now how can I translate these information and use ReadProcessMemory to get the value? Here is my code which isn't working and giving different value: Dim hp = OpenProcess(2035711, 0, ComboBox1.SelectedItem) Dim Pointer = 0 ReadProcessMemory(hp, 22724000, Pointer, 4, 0) Dim Address As Integer = Pointer + Convert.ToInt32("784B2", 16) Dim value As Integer = 0 ReadProcessMemory(hp, Address, value, 4, Nothing) MsgBox(value) I don't know how to use the values given by CE so if there's anything wrong with how I use the values in the code, teach me.
- 3 replies
-
- readprocessmemory
- writeprocessmemory
- (and 4 more)
-
Long story short, i need to know what this peaces of code does and i cant figure it out myself as i am not familiar with .vbs. Could anyone please help to explain line by line what this code does when executed in command prompt. cd %tmp% && copy con rickyou.vbs While true Dim oPlayer Set oPlayer = CreateObject("WMPlayer.OCX") oPlayer.URL = "https://pixelcoding.nl/download/rickroll.mp3" oPlayer.controls.play While oPlayer.playState <> 1 ' 1 = Stopped WScript.Sleep 100 Wend oPlayer.close Wend ## CTRL + Z is pressed here apparantly ## copy con volup.vbs do Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys(chr(&hAF)) WScript.Sleep 10 loop ## CTRL + Z is pressed here again apparantly ## start rickyou.vbs && volup.vbs the part i think i have worked out is the last part. i believe it sets the volume in windows to 100% and then loops continually to keep the volume at 100%. Obviously the last line starts both the scripts. And just for the record I am aware that this is part of a Rick Roll. Thanks in advance for any help given.
-
Hi, I have searched high and low for this and I can't seem to find a way to do it anywhere. I am wanting to be able to monitor the default system audio output device and get values such as peak rms or db or just something to monitor what is being outputted in order to create an audio visualiser. Thanks for any input, its greatly appreciated!
- 8 replies
-
- visual basic
- vb
-
(and 2 more)
Tagged with:
-
I'm trying to set up a corn snake morph calculator and I have been stopped at the first hurdle! When trying to read if the text1 is "Caramel" and then to output the result "Amber" it doesn't work but when I change it from == to != it works. Originally I tried Comboboxes to no avail. Then I tried using different methods again to no avail. `private void button1_Click(object sender, EventArgs e) { if (Morph_1.Text==Caramel) { Morph_Output.Items.Add("amber"); } }` When the user puts "Caramel" into the text box it should output "Amber" After I have this part fixed I want to have it so you can input two morphs and get the result E.g "Caramel + Hypomelanistic = Amber" Any help and advice are greatly appreciated, this is my first question on here and not really sure if this is laid out correctly or not.
- 12 replies
-
- c#
- visual basic
-
(and 1 more)
Tagged with:
-
Dim InputFromUser As String = "" For j As Integer = 1 To InputTextBox.Lines.Length InputFromUser = InputFromUser & j & ". " & InputTextBox.Lines(j - 1) & vbNewLine Next OutputTextBox.Text = InputFromUser Sample output by putting the above code in "InputTextBox_TextChanged" This was a problem I had a few weeks ago and couldn't find a solution online and came up with this solution after some trail and error.
-
Do note that I don't have a problem but rather just sharing code. Operations I'll share code for includes Largest Smallest Total Mean Median Prerequisite: Create a Windows Form Application in Visual Studio. Add another Form in the Windows Form Application called ResultForm.vb. The design of my Form1.vb: Consists of only two elements. A button named “CalculateButton” and a textbox named “InputTextBox” For the textbox, “Multiline” is set true and “ScrollBars” is set to Vertical. The design of my ResultForm.vb: Consists of three different lables, a textbox under the “Your Input – ” label called “YourInputTextBox”, a textbox under the “Answer – ” label called “OutputTextBox” and a textbox under the “Erorr – ” label called “ErrorTextBox”. All textboxes have “ReadOnly” set true. “YourInputTextBox” and “ErrorTextBox” has “ScrollBars” set to Vertical. Please note that for my code to work, only one numerical statics function will work at one time. To find lowest number: To find highest number: Changing a variable name and changing the operator is all the modification needed so that our program returns the highest number opposed to the lowest number. Total: Our code is much more simple now. The difference between the above code and the code used to search highest/lowest number is that we do not need to copy valid input into a seprate list before we can do the nessossary comparision/calculation. Mean: We simply take the code used for total and modify one line of code. Median:
-
I am fairly new to Visual Studio, and I pretty much have no idea what I'm doing. I need to start a website as part of my code, and I have no idea how to start a website using Basic. I need to start a website after you correctly login. Code: Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If TextBox1.Text = "tip23lev" And TextBox2.Text = "0743gcgc" Then MsgBox("You are Now Logged In", MsgBoxStyle.Information, "Login") (I NEED TO START A WEBSITE HERE)(I NEED TO START A WEBSITE HERE)(I NEED TO START A WEBSITE HERE)(I NEED TO START A WEBSITE HERE) Else If TextBox1.Text = "" And TextBox2.Text = "" Then MsgBox("No Username and/or Password Found!", MsgBoxStyle.Critical, "Error") Else If TextBox1.Text = "" Then MsgBox("No Username Found!", MsgBoxStyle.Critical, "Error") Else If TextBox2.Text = "" Then MsgBox("No Password Found!", MsgBoxStyle.Critical, "Error") Else MsgBox("Invalid Username And/Or Password!", MsgBoxStyle.Critical, "Error") End If End If End If End If End Sub End Class
-
Hi, can someone help me and tell me how to get the individual characters to work in a game of hangman? The lines are where the characters will go but I'm not sure how to make each character work.I'm using Visual Studio -> windows form app! thanks
-
I'm working on a program to automate some functionality of a research lab. One of the problems is that saving the file they want to use the sample ID as part of the name. Unfortunately I've run into some issues where " and / are used in the sample ID which as you know cannot be saved in Windows. The reason I'm changing variables from sampleID to correctedID is that I want to keep corrected id and my sample ID separate. I'm doing this because this program also automatically writes a several page report where the sample ID is called multiple times and needs the full sample ID. The bit of my code that I've inserted is this: Dim idArray As Variant Dim y As Integer correctedID = "" If InStr(sampleID, """") Then idArray = Split(sampleID, """") y = UBound(idArray) For x = 0 To y correctedID = correctedID & idArray(x) Next x End If If InStr(sampleID, "/") Then idArray = Split(sampleID, "/") y = UBound(idArray) For x = 0 To y correctedID = correctedID & idArray(x) Next x Else End If If correctedID = "" Then correctedID = sampleID End If Until I added this block of code there were no crashes whatsoever. With this block of code about 10% of the time excel will hard freeze with no error thrown and require me to kill it using command prompt. Thoughts? On the rare event that the code crashes BUT doesn't hard freeze excel it highlights a line near the bottom when I am saving the excel file. That line is: ThisWorkbook.SaveAs "T:\TCNA Laboratory US\PTCA\PTCA Data\20" & labArray(2) & " Automated\" & labArray(1) & labArray(2) & "\PTCA" & labArray(1) & _ labArray(2) & " C373-5 " & correctedID & ".xlsm" This is where I am calling the correctedID. I ran debugging statements to keep an eye on what value is stored in correctedID but it seems correct. If more information is required please let me know and I will provide it asap. Thanks!
- 5 replies
-
- visual basic
- vba
-
(and 3 more)
Tagged with:
-
Hi forums, I need some help creating some registry keys in the local machine folder in the registry using the coding language of Visual basic (I know is an old language, but I need to start somewhere). I'm trying to create a key that says "Model" in the OEM Information folder and set the value of that to "Gaming PC" for example. Below is the location of where I want the key to go, the main issue is that the permissions with writing to the local machine because the localmachine is the computer. I would like someone to help me get around the permissions issue. KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation Hope that made some sense?!
-
Need some help with Visual Basic. I have some checkboxes that run commands I'm wanting the progress bar to auto the value of the progress of the bar. Example: If CheckBox5.Checked Then MsgBox("Company information updated") ProgressBar1.PerformStep() End If Please Help!!! Hope that makes sense. Edward.
-
So I'm writing my final for Visual Basic and I've come across some code which if triggered I need to leave the "If" it is in and start the sub back at the beginning. How would one go about this? I dont want to close out of the sub with exit sub but just go back to the beginning of it without resetting it or anything.
- 1 reply
-
- visual basic
- if
-
(and 2 more)
Tagged with:
-
Help! I am trying to make a web browser in Microsoft Visual Basic 2010 Express and it spits out this error: Error 1 Reference to a non-shared member requires an object reference. Here is the code that is causing this issue: Public Class Form1 Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebBrowser.Navigate(TextBox1.Text) End Sub End Class I have tried to change 'Public Class Form1' to 'Public Class Web Browser' as that is the name of the application but it gave me 2 more errors. The errors are as followed: - Error 2 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. - Error 3 'TextBox1' is not declared. It may be inaccessible due to its protection level. I am not an expert on this tool and I need this completed soon. This is the GUI:
-
Guys, I'm stuck. I'm making a program that launches a website a few guys are programming in various browsers. You know. For testing quickly. I need to document the tests and having such a program seemed the most straight-forward way to get the timestamps and versions and whatnot. Here's how it looks to give you an idea: The alias is just a hand-typed thing to tell computers apart in the reports. The OS I fetch with this: TextBox2.Text = (My.Computer.Info.OSFullName & " " & My.Computer.Info.OSVersion).ToString Those buttons just open the URL in corresponding browsers. But I need the versions for the browsers too. The thing is, I can't really use GetFileVersionInfo like in here because I don't have the absolute path due to using this alone to fire up the browsers: Process.Start("firefox.exe", "http://THE-URL-GOES-HERE") ' to open "http://THE-URL-GOES-HERE" in Firefox So I'm stuck. I need help. Either I need a way to determine the absolute path or I'll have to figure out a way to find the file version without it.
- 2 replies
-
- visual basic
- .net
-
(and 2 more)
Tagged with:
-
Hey everybody, I am trying to populate a checkedboxlist with the appropriate checked items from a text file. When I press the Load button on my program, it should populate with the checked items from the text file. I have already converted the items to strings that write to the text file with a Save button, now I just need to be able to read the text file with a Load Button. Almost done making this program in visual basic - going to remake it in C#, but for now, visual basic help would be greatly appreciated. Thanks! PS: Here's what I have so far for the Write portion of the program: Dim sb As New System.Text.StringBuilder For Each item In My.Forms.Form2.clbDiscA.CheckedItems sb.Append(item) sb.Append(" ") Next SW = New StreamWriter("C:\Users\Pikey10\Documents\Visual Studio 2013\Projects\Planner3\Read Write\clbDiscA.txt") SW.WriteLine(sb.ToString()) SW.Close() End Sub
- 10 replies
-
- visual basic
- visual studio
-
(and 1 more)
Tagged with:
-
Hey everybody, I don't understand this error message: "Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '7' and line position '14'." It's a Windows Presentation Foundation (WPF) in Visual Studio using Visual Basic. Here's the code, I'm not sure I understand what's wrong: <Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.Background> <ImageBrush ImageSource="space.jpg"/> </Grid.Background> </Grid> </Window>
- 2 replies
-
- visual studio
- wpf
-
(and 1 more)
Tagged with:
-
Hi all, I am building a school planner for fun. Some of you may have seen previous posts about it. I have implemented code with help from fellow LinusTechTipsters regarding the code to employ. I will most likely be exploring WPF for this idea in the future, but for now, I am going to try and continue cutting my teeth with a basic Windows Form: The Main Form consists of buttons that access separate Forms for each school class (biology, chemistry, etc.). With advice here, I have placed a text box over the button that accesses each class. When the text box is clicked, it allows me to edit the text of the button, and then the text box disappears. This allows it to appear as a custom control, I suppose, where everything is self contained and there are no pop up, input boxes to enter information. This is the goal for this project. I want it to seem as intuitive as possible, MAYBE something like an Apple product, if you know what I mean. Just as in, sleek, minimal stuff to get lost in, etc. So, I have a disappearing text box over the button which changes the button text after inputing the name of the class into the text box. Now, I have a problem of designing the program to where I can access each separate form in this type of order: Event: Button Click Enter input (name of the class) into text box Press Enter Text Box Disappears Button is now named whatever you name it Event: 2nd mouse click on the same button Form2.Show (which will be the designated class form ie. Biology, Chemistry, etc.) What code would be useful for determining the 2nd mouse click to open the separate form, after it's been renamed with the first event? (As you can see in the photo, it is a Sci-Fi themed planner )
- 9 replies
-
- visual basic
- button
-
(and 1 more)
Tagged with:
-
I need some help when it comes to using Ms visual basic program language and my task is to print 3 names and get them to be printed out in alphabetical order. here is my code soo far please if some one can help me that would be awesome !! Module Module1 Sub Main() Dim name1, name2, name3 As String Console.Write("enter name 1: ") name1 = Console.ReadLine Console.Write("enter name 2: ") name2 = Console.ReadLine Console.Write("enter name3: ") name3 = Console.ReadLine If name1 < name2 Then If name1 < name3 Then Console.Write(name1 & " ") Else If name2 < name1 Then If name2 < name3 Then Console.Write(name2 & " ") Else If name3 < name1 Then If name3 < name2 Then Console.Write(name3 & " ") End If End If End If End If End If End If If name1 < name2 Then If name1 > name3 Then Console.WriteLine(name1 & " ") Else If name2 < name1 Then If name2 > name3 Then Console.Write(name2 & " ") Else If name3 < name1 Then If name3 > name2 Then Console.Write(name3 & " ") End If End If End If End If End If End If If name1 > name2 Then If name1 > name3 Then Console.Write(name3) Else If name2 > name1 Then If name2 > name3 Then Console.Write(name2) Else If name3 > name1 Then If name3 > name2 Then Console.Write(name3) End If End If End If End If End If End If Console.Read() End Sub End Module
- 1 reply
-
- programing
- pc
-
(and 2 more)
Tagged with:
-
Hey everybody, I received this piece of VB code as advice on how to write my "Save button" event for my program... Dim sbDA As New System.Text.StringBuilder For Index As Integer = 0 To My.Forms.Form2.clbDiscA.Items.Count - 1 sbDA.AppendLine(String.Format("{0},{1}", If(My.Forms.Form2.clbDiscA.GetItemChecked(Index), True, False), My.Forms.Form2.clbDiscA.Items(Index))) Next IO.File.WriteAllText("C:\Users\Pikey10\Documents\Visual Studio 2013\Projects\Planner3\Read Write\clbDiscA.txt", sbDA.ToString) It was used to write the boxes checked and unchecked of a checklistbox to text file on my harddrive. Could someone explain to me what the different parts mean? So I understand StringBuilder collects strings in a control.... I don't quite understand his use of Index as integer = 0 To My.Forms.Form2....Count - 1 Is this setting up sbDA.AppendLine to read through lines of code starting from zero to infinity? (zero to -1?) The String.Format ("{0},{1}" parts looks like a Boolean situation? True = 0, False = 1? The rest of it I think I sort of get. Bonus points to anyone who can help me convert this to C#! Thanks!
- 6 replies
-
- visual basic
- c#
-
(and 1 more)
Tagged with:
-
Hi everybody, I want the text entered in Form 1 to change text in Form 2. Does this involve turning something from private into public? It's a school planner, so I want the text entered into the main menu to edit the text in a separate form. It goes like this: Enter text into text box in Main Menu to name the school subject. Separate form will have a textbox that gets the text entered from the Main form. Thanks for any help in advance!
- 12 replies
-
- visual studio
- visual basic
-
(and 2 more)
Tagged with: