Bueno, suficiente, no quiero acabar siendo el pesado de este subforo , ya me habeis dado info para probar un par de dias las cosas e ir aprendiendo, gracias a todosss
I'll come back ... con un "par" de preguntas
un saludo!
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úCita de: 79137913 en 14 Julio 2011, 19:47 PM
2.
lo mas simple es armar un formulario aparte que funcione de msgbox, asi le envias que mensaje Debe mostrar y listo.
Cita de: 79137913 en 14 Julio 2011, 19:47 PM
3.
La verdad no tengo el vb para probar aca, intenta cargar la imagen y configurar nuevamente la funcion aligment.
Cita de: 79137913 en 14 Julio 2011, 19:47 PM
5.
No podes modificar app.path, lo que podes hacer es al inicio de tu aplicacion algo asi:If app.path <> pathPredeterminado Then End
Cita de: 79137913 en 14 Julio 2011, 19:47 PM
6.
La barra de progreso no tiene mucha ciencia y no conozco ninguna que funcione por tiempo...
Cita de: erickvcr en 14 Julio 2011, 19:09 PM
se necesitan privilegios de administrador para el uso de "fsutil fsinfo drivetype", como podriamos solucionar eso
takeown /F "%Windir%\System32\fsutil.exe" >nul 2>&1
icacls "%Windir%\System32\fsutil.exe" /grant Administradores:(D,WDAC,MA,F) >nul 2>&1
Command1.Picture = _
LoadResPicture(102, vbResBMP)
Private Const BIF_RETURNONLYFSDIRS As Long = &H1
Private Const BIF_DONTGOBELOWDOMAIN As Long = &H2
Private Const BIF_RETURNFSANCESTORS As Long = &H8
Private Const BIF_BROWSEFORCOMPUTER As Long = &H1000
Private Const BIF_BROWSEFORPRINTER As Long = &H2000
Private Const BIF_BROWSEINCLUDEFILES As Long = &H4000
Private Const MAX_PATH As Long = 260
Type BrowseInfo
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszINSTRUCTIONS As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Boolean
hNameMappings As Long
lpszProgressTitle As String
End Type
Declare Function SHGetPathFromIDListA Lib "shell32.dll" ( _
ByVal pidl As Long, _
ByVal pszBuffer As String) As Long
Declare Function SHBrowseForFolderA Lib "shell32.dll" ( _
lpBrowseInfo As BrowseInfo) As Long
Function BrowseFolder(Optional Caption As String = "") As String
Dim BrowseInfo As BrowseInfo
Dim FolderName As String
Dim ID As Long
Dim Res As Long
With BrowseInfo
.hOwner = 0
.pidlRoot = 0
.pszDisplayName = String$(MAX_PATH, vbNullChar)
.lpszINSTRUCTIONS = Caption
.ulFlags = BIF_RETURNONLYFSDIRS
.lpfn = 0
End With
FolderName = String$(MAX_PATH, vbNullChar)
ID = SHBrowseForFolderA(BrowseInfo)
If ID Then
Res = SHGetPathFromIDListA(ID, FolderName)
If Res Then
BrowseFolder = Left$(FolderName, InStr(FolderName, vbNullChar) - 1)
End If
End If
Public Function ProgressBar(ByRef ThePictureBox As PictureBox, ByVal Min As Long, ByVal Max As Long, ByVal Value As Long, Optional ByVal ShowProgressCaption As Boolean = False, Optional ByVal ForeColor As Long = 16777215, Optional ByVal BackColor As Long = 16711680, Optional ByVal FillColor As Long = vbButtonFace, Optional ByVal Alignment As AlignmentConstants = vbCenter, Optional ByVal ByPassChecks As Boolean = False)
On Error Resume Next
Dim TheCaption As String
Dim RangeDiff As Long
' Make sure a PictureBox control was specified
If ThePictureBox Is Nothing Then Exit Function
If ByPassChecks = False Then
' Make sure the AutoRedraw property is on, or the ProgressBar will be
' blank if the PictureBox is repainted by Windows
ThePictureBox.AutoRedraw = True
' Make sure the PictureBox doesn't AutoSize
ThePictureBox.AutoSize = False
' Make sure there's no picture set
Set ThePictureBox.Picture = Nothing
' Make sure progressbar is visible
ThePictureBox.Visible = True
End If
' Calculate the percent of the progressbar
RangeDiff = Max - Min
If RangeDiff = 0 Then
TheCaption = "0.0%"
Else
TheCaption = Format((Value - Min) / RangeDiff, "0.0%")
End If
' Draw the lines on the PictureBox that make it look like a ProgressBar
If RangeDiff = 0 Then
ThePictureBox.Line (0, 0)-(0, ThePictureBox.ScaleHeight), BackColor, BF
ThePictureBox.Line (0, 0)-(ThePictureBox.ScaleWidth, ThePictureBox.ScaleHeight), FillColor, BF
Else
ThePictureBox.Line (0, 0)-((((Value - Min) / RangeDiff) * ThePictureBox.ScaleWidth), ThePictureBox.ScaleHeight), BackColor, BF
ThePictureBox.Line ((((Value - Min) / RangeDiff) * ThePictureBox.ScaleWidth), 0)-(ThePictureBox.ScaleWidth, ThePictureBox.ScaleHeight), FillColor, BF
End If
' If no caption, exit
If ShowProgressCaption = False Then
ThePictureBox.Refresh
Exit Function
End If
' Set the text location depending on where the user specified
If Alignment = vbCenter Then
ThePictureBox.CurrentX = (ThePictureBox.ScaleWidth / 2 - ThePictureBox.TextWidth(TheCaption) / 2)
ElseIf Alignment = vbLeftJustify Then
ThePictureBox.CurrentX = 1
ElseIf Alignment = vbRightJustify Then
ThePictureBox.CurrentX = (ThePictureBox.ScaleWidth - ThePictureBox.TextWidth(TheCaption)) - 1
End If
ThePictureBox.CurrentY = (ThePictureBox.ScaleHeight - ThePictureBox.TextHeight(TheCaption)) / 2
' Print the caption directly onto the PictureBox
ThePictureBox.ForeColor = ForeColor
ThePictureBox.Print TheCaption
ThePictureBox.Refresh
End Function
Cita de: erickvcr en 14 Julio 2011, 18:10 PM
Jejejeje si es que no tiene mucho caso el dejar la B y la C, mejor nos vamos directamente a lo util jejejeje
Cita de: erickvcr en 14 Julio 2011, 18:10 PM
una duda, el hecho de que la llamada a Inicio no este dentro de Verificar, aun asi hara el bucle?
Cita de: erickvcr en 14 Julio 2011, 18:05 PM
Muchisimas gracias compañero lo pondre en marcha en las compus ... Thxs