vb.net has a steep learning curve, so please bare with me.
I am trying to create a program where you can select multiple Linux hosts, then select a bash script (which already exists on the Linux hosts), and click a button to execute the script on all the hosts. I've managed to get vb.net to...
I am trying to create an application that runs bash scripts on a remote Linux computer. The scripts already exist on the Linux computer, I just want to run them using this application. I'm using SSH NET by Renci to establish the SSH connection.
The scripts are expected to provide full...
I have a CheckedListBox and I want to use it for editing a text file. This is what I have so far.
Private Sub CheckedListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CheckedListBox1.SelectedIndexChanged
If CheckedListBox1.CheckedItems(0) = "test1" Then...
For some reason, when using the code below, when I click any of the 2 buttons to stop or start the spooler service, I get the error attached. I've googled it, but I could not find the reason why. Any ideas?
Public Class Form1
Dim Spooler As New...
So, I'm creating a form with a label, a picture box and two buttons. This form will control the Spooler service.
The label will say "Running" when the service is running and the picture box will be green. The "Start" button will be disabled and the "Stop" button will be enabled. The label will...
Ok the reading and displaying to the textbox is done
TextBox1.Text = mid(line(59),instr(line(59),"ServerAdmin")+len("ServerAdmin "),len(line(59))-instr(line(59),"ServerAdmin")+len("ServerAdmin"))
Now for writing back to the textfile if the textbox value is changed I've gotten as far as this...
I have a form with a textbox and I want that textbox to read from httpd.conf on line 162.
Line 162 reads ServerAdmin firstname.lastname@example.org
Shouldn’t this code work? Because it does not.
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles...
Sorry to be bringing this up again, but instead of checkboxes, I am now using a CheckedListBox. So now I cannot go on each checkbox and tell it to enable the button if the checkbox state changes. Now I need to somehow check all the items in the CheckedListBox and find out if any one of them...
For some reason this replaces the whole file with "LoadModule actions_module modules/mod_actions.so"
Dim apacheconf = "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf"
Dim Line() As String = System.IO.File.ReadAllLines(apacheconf)
Private Sub SaveApache_Click(sender...
Basically what I want to do is:
if ApacheCheckedListBox item mod_alias.checked = true, then
replace "#LoadModule alias" with "LoadModule alias" in httpd.conf. Basically remove the #.
or even better, if I could tell it that:
if ApacheCheckedListBox item mod_alias.checked = true...
That would actually be very helpful because the codeblock is getting very big as i continue with the apache modules. Can you provide an example of how the code would look like with your suggestion? (just getting started with vb)
Button1.Enabled = True
But how will the button know when to enable itself? if the state of the checkbox changes. Right?
But how will the button know that the state of the checkbox has changed?
I didnt get it :culpability:
I think I just answered my own question :)
Thanks for asking the...
ok, please bare with me as I'm only a few days in this vb stuff and I'm still trying to understand the logic behind it.
This, works great.
Private Sub ApacheModActions_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ApacheModActions.CheckedChanged...