Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Notify icon Script Task help...!!! help...!!! Expand / Collapse
Posted Thursday, October 18, 2012 8:55 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 8, 2016 7:17 AM
Points: 6, Visits: 54
My requirement is to show a balloon as notify icon tool tip or a message or content of a variable that was why enter the code below to no longer use a msgbox in a script task but apparently need something to display the value of the message.
Attached is an image that I want to display instead of a msgbox the value of a variable in a notify icon.

Thanks in advance for your support.

Mi requerimiento es mostrar en un globo como tool tip o notify icon un mensaje o el contenido de una variable fue por eso que ingrese el código de abajo para ya no utilizar un msgbox en un script task pero al parecer falta algo para que se visualice el valor del mensaje.
Adjunto una imagen que es la que quiero que se muestre en lugar de un msgbox el valor de una variable en un notify icon.

De antemano Gracias por su apoyo.

Imports System
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Data
Imports System.Math

Imports System.IO
Imports System.Windows.Forms
Imports System.Drawing
Imports System.EventArgs
Imports System.Object
Imports System.Reflection
Imports ST_6e1db1aeb859412887e4b7e71aac20bf.vbproj

<System.AddIn.AddIn("ScriptMain", Version:="1.0", Publisher:="", Description:="")> _
<System.CLSCompliantAttribute(False)> _
Partial Public Class ScriptMain
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

Enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
End Enum

' The execution engine calls this method when the task executes.
' To access the object model, use the Dts property. Connections, variables, events,
' and logging features are available as members of the Dts property as shown in the following examples.
' To reference a variable, call Dts.Variables("MyCaseSensitiveVariableName").Value
' To post a log entry, call Dts.Log("This is my log text", 999, Nothing)
' To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, True)
' To use the connections collection use something like the following:
' ConnectionManager cm = Dts.Connections.Add("OLEDB")
' cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;"
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
' To open Help, press F1.

Dim NotifyIcon1 As NotifyIcon
Dim e As System.EventArgs
Dim sender As System.Object
Public Sub Main()
' Add your code here
'NotifyIcon1.BalloonTipIcon = ToolTipIcon.Warning

NotifyIcon1.Icon = New Icon("G:\Windows.ico")
NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info
NotifyIcon1.BalloonTipTitle = "Titulo"
NotifyIcon1.BalloonTipText = "texto"

Dts.TaskResult = ScriptResults.Success
End Sub
Post #1374629
Posted Monday, October 22, 2012 1:21 AM



Group: General Forum Members
Last Login: Today @ 7:23 AM
Points: 15,506, Visits: 13,168
Duplicate post.
Original thread with replies can be found here:

How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1375282
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse