ya agregaste todos los controles???????????????????????????????
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Option Explicit
'Estructura NOTIFYICONDATA para usar con Shell_NotifyIcon
Private Type NOTIFYICONDATA
cbSize As Long
hWnd As Long
uID As Long
uFlags As Long
uCallbackMessage As Long
hIcon As Long
szTip As String * 128
dwState As Long
dwStateMask As Long
szInfo As String * 256
uTimeout As Long
szInfoTitle As String * 64
dwInfoFlags As Long
End Type
'Variable para la estructura anterior
Private sysTray As NOTIFYICONDATA
'Constantes
Private Const NOTIFYICON_VERSION = 3
Private Const NOTIFYICON_OLDVERSION = 0
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const NIM_SETFOCUS = &H3
Private Const NIM_SETVERSION = &H4
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
Private Const NIF_STATE = &H8
Private Const NIF_INFO = &H10
Private Const NIS_HIDDEN = &H1
Private Const NIS_SHAREDICON = &H2
Private Const NIIF_NONE = &H0
Private Const NIIF_WARNING = &H2
Private Const NIIF_ERROR = &H3
Private Const NIIF_INFO = &H1
Private Const NIIF_GUID = &H4
Private Const WM_MOUSEMOVE = &H200
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Const WM_LBUTTONDBLCLK = &H203
Private Const WM_RBUTTONDOWN = &H204
Private Const WM_RBUTTONUP = &H205
Private Const WM_RBUTTONDBLCLK = &H206
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Private Sub Form_Activate()
Dim msj_txt As String
Dim msj_titulo As String
msj_txt = "Bienvenido a KeepMe. La aplicación está ahora en ejecución"
msj_titulo = "Sistema KeepMe"
With sysTray
.cbSize = Len(sysTray)
.hWnd = Me.Picture1.hWnd
.uID = vbNull
.uFlags = NIF_ICON Or NIF_INFO Or NIF_MESSAGE Or NIF_TIP
.uCallbackMessage = WM_MOUSEMOVE
.hIcon = Me.Picture1.Picture
.szTip = " Acá colocar el toolTip " & vbNullChar
.dwState = 0
.dwStateMask = 0
End With
'Notifica en el systray
Shell_NotifyIcon NIM_ADD, sysTray
With sysTray
.cbSize = Len(sysTray)
.hWnd = Picture1.hWnd
.uID = vbNull
.uFlags = NIF_ICON Or NIF_INFO Or NIF_MESSAGE Or NIF_TIP
.uCallbackMessage = WM_MOUSEMOVE
.hIcon = Me.Picture1
.szTip = "KeepMe Activado" & vbNullChar
.dwState = 0
.dwStateMask = 0
.szInfo = msj_txt & Chr(0)
.szInfoTitle = msj_titulo & Chr(0)
.dwInfoFlags = NIIF_INFO
.uTimeout = 100
End With
'Modifica el ícono con la información
Shell_NotifyIcon NIM_MODIFY, sysTray
End Sub
Private Sub Form_Unload(Cancel As Integer)
Shell_NotifyIcon NIM_DELETE, sysTray
End Sub
Private Sub Command1_Click()
Dim oXL As Object ' Excel application
Dim oBook As Object ' Excel workbook
Dim oSheet As Object ' Excel Worksheet
Dim oChart As Object ' Excel Chart
Dim iRow As Integer ' Index variable for the current Row
Dim iCol As Integer ' Index variable for the current Row
Const cNumCols = 10 ' Number of points in each Series
Const cNumRows = 2 ' Number of Series
ReDim aTemp(1 To cNumRows, 1 To cNumCols)
'Start Excel and create a new workbook
Set oXL = CreateObject("Excel.application")
Set oBook = oXL.Workbooks.Add
Set oSheet = oBook.Worksheets.Item(1)
' Insert Random data into Cells for the two Series:
Randomize Now()
For iRow = 1 To cNumRows
For iCol = 1 To cNumCols
aTemp(iRow, iCol) = Int(Rnd * 50) + 1
Next iCol
Next iRow
oSheet.Range("A1").Resize(cNumRows, cNumCols).Value = aTemp
'Add a chart object to the first worksheet
Set oChart = oSheet.ChartObjects.Add(50, 40, 300, 200).Chart
oChart.SetSourceData Source:=oSheet.Range("A1").Resize(cNumRows, cNumCols)
' Make Excel Visible:
oXL.Visible = True
oXL.UserControl = True
End Sub
Dim apexcel As Variant
Set apexcel = CreateObject("excel.application")
' hace que excel se vea
apexcel.Visible = True
'agrega un nuevo libro
apexcel.workbooks.Add
'poner titulos
apexcel.cells(1, 1).formula = "TITULO DE LA APLICACION"
apexcel.cells(1, 1).Font.Size = 18
apexcel.cells(2, 2).formula = "debe"
apexcel.cells(2, 3).formula = "haber"
apexcel.cells(2, 4).formula = "saldo"
apexcel.cells(3, 2).formula = 200
apexcel.cells(3, 3).formula = 100
' aplica formula<br>
apexcel.cells(3, 4).formula = "=b3-c3"
' hace una seleccion de celdas y pone bordes de color
apexcel.range("b3:d3").borders.Color = RGB(255, 0, 0)
Set apexcel = Nothing
Dim mun As Integer
num = FreeFile
Open "C:\bb.txt" For Append As num
Print #num, "Hola"
Close
if "existe el archivo" then
que esciba en el archivo
else
que lo cree y escriba en el archivo
end if