I use a routine to display status messages on all my forms. Currently there is a copy of this code in every formclass in my project. I'm trying to figure out a way to move it to a global module and be able to reference the label on the 'sender' form and send text to it.
ex: FrmCallwasMadeFrom.lblStatus.text = "my message"
But right now this code only services the form that it lives in.
Right now the Call looks like thisCode:Public Sub myStatus(ByVal Status As String, ByVal isCritical As Boolean) 'Dispaly Status Messages If isCritical Then lblStatus.ForeColor = Color.Red lblStatus.Font = myStatusCritical Else lblStatus.ForeColor = Color.Black lblStatus.Font = myStatusNormal End If lblStatus.Text = Status.Trim Me.Refresh() End Sub
Any ideas?Code:myStatus("Your Message Here", isCritical)


Reply With Quote




Bookmarks