Portal    Foro    Buscar    FAQ    Registrarse    Conectarse


Publicar nuevo tema  Responder al tema 
Página 1 de 1
 
 
Incorporar Un Button En El Objeto MediaView Para Poder Utilizar Una Ventana...
Autor Mensaje
Responder citando   Descargar mensaje  
Mensaje Incorporar Un Button En El Objeto MediaView Para Poder Utilizar Una Ventana De Dialog 
 
El nuevo objeto "MediaView" no tiene instrumentos, objetos para abrir una ventana de la Clase ''Dialog'' que nos permita de eligir un archivo........


Brevemente, vamos a ver esto:

1) activar los componentes "gb.media" y gb.media.form ;
2) poner sobre un Formulario un objeto "MediaView";

3) probar este codigo (EL problema !):
Public Sub Form_Open()
 
 With MediaView1
   .URL = "/ruta/del/file/audio"    
 End With

End



4) despues, probar este codigo, con el cual incorporamos un Button en MediaView:
Private bt As Button


Public Sub Form_Open()
 
 Dim ob As Object
  
  ob = MediaView1.Children[0]
  ob = ob.Children[0]
  ob = ob.Children[2]
  
  With bt = New Button(ob.Children[3]) As "Abrir"
    .X = 10
    .Y = 5
    .W = 40
    .H = 20
    .Text = "Abrir"
    .Border = Border.None
  End With
  
End


Public Sub Abrir_Click()
 
  With Dialog
    If .OpenFile() Then Return
    MediaView1.URL = .Path
  End With
  
End


Public Sub Abrir_Enter()

   bt.Border = Border.Plain

End


Public Sub Abrir_Leave()

   bt.Border = Border.None

End

 



 
última edición por vuott el Jueves, 08 Marzo 2018, 19:50; editado 5 veces 
vuott - Ver perfil del usuarioEnviar mensaje privado 
Volver arribaPágina inferior
Responder citando   Descargar mensaje  
Mensaje Re: Incorporar Un Button En El Objeto MediaView Para Poder Utilizar Una Ventana De Dialog 
 
no me funciona el código

 fuera_de_limites
 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
última edición por v3ctor el Jueves, 08 Marzo 2018, 17:40; editado 1 vez 
v3ctor - Ver perfil del usuarioEnviar mensaje privadoVisitar sitio web del usuario 
Volver arribaPágina inferior
Responder citando   Descargar mensaje  
Mensaje Re: Incorporar Un Button En El Objeto MediaView Para Poder Utilizar Una Ventana De Dialog 
 
esto si pero se ve raro:


Private bt As Button


Public Sub Form_Open()
 
 Dim ob As New Object[]
  
  ob.Add(MediaView1.Children[0])
  ' ob.Add(MediaView1.Children[1])
  ' ob.Add(MediaView1.Children[2])
  ' ob.Add(MediaView1.Children[4])

  
  With bt = New Button(ob[0]) As "Abrir"
    .X = 10
    .Y = 5
    .W = 40
    .H = 20
    .Text = "Abrir"
    .Border = Border.None
  End With
  
End


Public Sub Abrir_Click()
 
  With Dialog
    If .OpenFile() Then Return
    MediaView1.URL = .Path
  End With
  
End


Public Sub Abrir_Enter()

   bt.Border = Border.Plain

End


Public Sub Abrir_Leave()

   bt.Border = Border.None

End

 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
v3ctor - Ver perfil del usuarioEnviar mensaje privadoVisitar sitio web del usuario 
Volver arribaPágina inferior
Responder citando   Descargar mensaje  
Mensaje Re: Incorporar Un Button En El Objeto MediaView Para Poder Utilizar Una Ventana De Dialog 
 
v3ctor escribió: [Ver mensaje]
no me funciona el código

Probablemente entretanto han cambiado algo en el Componente gb.media.form .

El nuovo codigo:

Private bt As Button


Public Sub Form_Open()
 
 Dim ob As Object

  ob = MediaView1.Children[0]
  ob = ob.Children[0]
  ob = ob.Children[3]
  
  With bt = New Button(ob.Children[3]) As "Abrir"
    .X = 10
    .Y = 5
    .W = 40
    .H = 20
    .Text = "Abrir"
    .Border = Border.None
  End With
  
End


Public Sub Abrir_Click()
 
  With Dialog
    If .OpenFile() Then Return
    MediaView1.URL = .Path
  End With
  
End


Public Sub Abrir_Enter()

   bt.Border = Border.Plain

End


Public Sub Abrir_Leave()

   bt.Border = Border.None

End

 



 
última edición por vuott el Jueves, 08 Marzo 2018, 19:25; editado 3 veces 
vuott - Ver perfil del usuarioEnviar mensaje privado 
Volver arribaPágina inferior
Responder citando   Descargar mensaje  
Mensaje Re: Incorporar Un Button En El Objeto MediaView Para Poder Utilizar Una Ventana De Dialog 
 
ahora si anda perfecto
 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
v3ctor - Ver perfil del usuarioEnviar mensaje privadoVisitar sitio web del usuario 
Volver arribaPágina inferior
Mostrar mensajes anteriores:    
 

Publicar nuevo tema  Responder al tema  Página 1 de 1
 

Usuarios navegando en este tema: 0 registrados, 0 ocultos y 1 invitado
Usuarios registrados conectados: Ninguno


 
Lista de permisos
No puede crear mensajes
No puede responder temas
No puede editar sus mensajes
No puede borrar sus mensajes
No puede votar en encuestas
No puede adjuntar archivos
Puede descargar archivos
No puede publicar eventos en el calendario



  

 

cron