Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mikefly95

Pages: 1 ... 4 5 [6]
76
Open Discussion / Re: Best way to select a drink for an automated bar
« on: April 24, 2014, 09:31:44 AM »
Little more complex but if something like this would work could make adding drinks debugging etc a bit easier in the long run

Main Form

Public Class MainForm
    Private DrinkName As String

    Private Sub Drink1_Click(sender As System.Object, e As System.EventArgs) Handles Drink1.Click
        DrinkName = "Drink 1"
        LoadStartStop(DrinkName)
    End Sub

    Private Sub Drink2_Click(sender As System.Object, e As System.EventArgs) Handles Drink2.Click
        DrinkName = "Drink 2"
        LoadStartStop(DrinkName)
    End Sub

    Private Sub Drink3_Click(sender As System.Object, e As System.EventArgs) Handles Drink3.Click
        DrinkName = "Drink 3"
        LoadStartStop(DrinkName)
    End Sub

    Private Sub LoadStartStop(ByVal DrinkName As String)
        Dim oForm As New StartStop
        oForm.SetDrinkName = DrinkName
        oForm.Label1.Text = DrinkName
        oForm.ShowDialog()
    End Sub
End Class

StartStop Form

Public Class StartStop
    Private DrinkName As String = ""

    Public WriteOnly Property SetDrinkName As String
        Set(value As String)
            DrinkName = value
        End Set
    End Property

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Select Case DrinkName
            Case "Drink 1"
                'bit address here
            Case "Drink 2"
                'bit address here
            Case "Drink 3"
                'bit address here
        End Select
    End Sub
End Class

Im not on a computer with AdvancedHMI at the moment thats why its just a VB button on the startstop form.

77
Support Questions / Re: Form load on startup
« on: April 13, 2014, 11:51:52 AM »
Why not use a single form with multiple panels with the visible value set to FALSE?
Then instead of loading a form set your Size and location and visible to TRUE on the panel you need?

78
Tips & Tricks / Don't Fear the Geek
« on: April 11, 2014, 08:37:01 AM »
A couple of years ago i attended an AB seminar on Benefits of Plant Wide Ethernet. Pretty much just a product demo with really great food(as a fat guy the food was the best part!!). One of the few things they pointed out is that PLC programmers and Enterprise developers should learn to work together.  I have been reading a lot of posts on here and seen things that you guys are struggling with i.e.  System.IO.StreamWriter SMTP and getting your info into a database that someone like me deals with every day.  We are not all Khaki's and pocket protectors some of us fly out tattoos proudly and play guitar in a good ol fashioned rock band on the weekend!!

79
Support Questions / Re: Form load on startup
« on: April 10, 2014, 01:00:37 PM »
what happens if you start your forms off with Public Sub init()call all your subs on that form and from your main form load event call a Private sub LoadForms() and then call all of your forms
Dim tForm as new TempForm
tFrom.init()
Dim aForm as new AlarmForm
aForm.init()
so on and so on

then on your button click event just use TempForm.Show AlarmForm.show etc

80
Open Discussion / VB.net/SQL/SSRS developer willing to trade
« on: April 10, 2014, 11:08:29 AM »
Hello All :)
I am an advanced VB.net/SQL/SSRS developer with minimal PLC training.  I would be willing to trade my services for help in becoming  better with PLC's and HMI development.  Pretty much if you need it done in VB.net inserted into a database and turned into a report i can do it.

Pages: 1 ... 4 5 [6]