Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is macro substitution available in .net
Message
 
To
10/07/2006 10:52:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01134885
Message ID:
01135578
Views:
14
Cetin I managed it like this....just check my code.
'In my toolbar i created a property mode and an event change_entry_mode
'and on every button click i changed the property and raised the event

Public Class UserControl1
    Public Event change_entry_mode()
    Private entry_mode As String = ""
    Public Property mode() As String
        Get
            Return entry_mode
        End Get
        Set(ByVal value As String)
            entry_mode = value
        End Set
    End Property
    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub

    Private Sub Add_Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Add_Button.Click
        entry_mode = "ADD"
        RaiseEvent change_entry_mode()
    End Sub

    Private Sub Edit_Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Edit_Button.Click
        entry_mode = "MOD"
        RaiseEvent change_entry_mode()
    End Sub


    Private Sub Delete_Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Delete_Button.Click
        entry_mode = "DEL"
        RaiseEvent change_entry_mode()
    End Sub
End Class
'This is my form where this usercontrol i.e. toolbar placed
'I just created a sub which handles change_entry_mode

Public Class Instr

    Private Sub maintoolbarclick() Handles UserControl11.change_entry_mode
        Select Case Me.UserControl11.mode
            Case "ADD"
                MsgBox("Add Button Clicked")
                Me.UserControl11.mode = ""
            Case "MOD"
                MsgBox("Edit Button Clicked")
                Me.UserControl11.mode = ""

        End Select
    End Sub
End Class
Riyaz Patanwala
I. T. Programmer
Al Jaber Energy Services L.L.C.
P.O.Box 47467
Abu Dhabi, U.A.E.
Tel - +971 2-502-1644
Fax - +971 2-554-6106
Cell - +971 50 358-0229
Email - riyaz.patanwala@ajes.ae
Website - www.ajes.ae
Previous
Reply
Map
View

Click here to load this message in the networking platform