Comunidad GX

Go Back   Comunidad GX » Interes General » Technology » Software
Register Projects FAQ Members List Calendar Search Today's Posts Mark Forums Read


Software Aplicaciones y desarrollo en general de software.

Reply
 
LinkBack Thread Tools Display Modes
Old 21-08-2008, 16:42   #1 (permalink)
Mercedes-Benz Fan
 
erik8891's Avatar
 
Join Date: Jun 2007
Location: Argentina
Posts: 426
Question Alguien q sepa visual basic ?

Holas gente que tal,tengo una consulta y espero q alguien me pueda ayudar pliz :

Alguien me podria explicar como invocar con un comandbutton otra ventana(form).
Por ej :

En un form tengo hecho un menu ,y hay un boton.Lo que quiero es que al hacer clic en ese boton,me abra otra ventana .

Pliz alguien me podria decir como se hace eso?.
Desde ya muchas gracias .
Salu2.
__________________
erik8891 is offline   Reply With Quote
Old 22-08-2008, 00:26   #2 (permalink)
Der Meister
 
Goodness Yoshimitsu's Avatar
 
Join Date: Nov 2004
Posts: 650
Default Re: Alguien q sepa visual basic ?

Eso es...
(ojo que hace un tiempo que ya no programo ni una agenda)

Code:
Private Sub cmdBOTON_Click()
frmVENTANA.Show vbModal, Me
End Sub
Donde VENTANA es el name del formulario a mostrar y BOTON el name de TU botón.
Al ponerle modal y me estás haciendo que la ventana que abrís pertenezca a la otra ventana desde donde se invocó.

Chequealo y chiflá.
Goodness Yoshimitsu is offline   Reply With Quote
Old 22-08-2008, 10:03   #3 (permalink)
Mercedes-Benz Fan
 
erik8891's Avatar
 
Join Date: Jun 2007
Location: Argentina
Posts: 426
Default Re: Alguien q sepa visual basic ?

oki gracias ,recien el lunes puedo ir hasta la makina q tiene el vb para probarlo .
Muchisimas gracias por responerme ,salu2.
__________________
erik8891 is offline   Reply With Quote
Old 22-08-2008, 15:18   #4 (permalink)
Sh1n0cks
 
Masterlau's Avatar
 
Join Date: Feb 2005
Posts: 4,201
Default Re: Alguien q sepa visual basic ?

Private Sub cmdBOTON_Click()

dim frmVENTANA as new Form

frmVENTANA.Show()

End Sub


Form es el formulario que queres mostrar a partir del evento click del boton (cmdBOTON), creas una instancia de ese formulario (frmVENTANA) y lo mostras.


saludos.
__________________
Masterlau is offline   Reply With Quote
Old 22-08-2008, 16:06   #5 (permalink)
Der Meister
 
Goodness Yoshimitsu's Avatar
 
Join Date: Nov 2004
Posts: 650
Default Re: Alguien q sepa visual basic ?

Claro, con ela forma de masterlau generás la ventana en tiempo de ejecución, lo que yo te di tenés que "dibujar" la ventana previamente.
Goodness Yoshimitsu is offline   Reply With Quote
Old 22-08-2008, 22:49   #6 (permalink)
Mercedes-Benz Fan
 
erik8891's Avatar
 
Join Date: Jun 2007
Location: Argentina
Posts: 426
Default Re: Alguien q sepa visual basic ?

Haber tuve probando y no me funca de ninguna manera =S ,es porke yo soy manko obviamente.
Yo supongamos q tengo un form hecho y al q llamare form1 .
Ahora creo otro q se llame form2 ,kiero hacer q cuando haga clic en un boton del form2 se habra el form1 ,como hago?.
Hice el q dice Goodness Yoshimitsu pero me tira runtime error "424" "object required".
Probe con el q dice Masterlau pero tampoco me ba =( .
Alguna idea?.
Salu2

Edit : ahi lo descubri ,yo taba poniendo frmVENTANA.Show vbModal, Me y habia q poner VENTANA.Show vbModal, Me.

Bueno muchisimas gracias por la ayuda amigos ^^.
salu2 .
__________________

Last edited by erik8891; 22-08-2008 at 23:02.
erik8891 is offline   Reply With Quote
Old 23-08-2008, 00:09   #7 (permalink)
~ echo
 
Redempt's Avatar
 
Join Date: Dec 2005
Location: ¬¬ trola
Posts: 3,045
Send a message via MSN to Redempt
Default Re: Alguien q sepa visual basic ?

No es más simple con un...

Private Sub Command2_Click()
Principal.Hide
Chau.Show
End Sub

Nunca fui a clase de ningún tipo, así que algo me habré perdido, ¿qué cambia el vbmodal...?
Redempt is offline   Reply With Quote
Old 23-08-2008, 02:52   #8 (permalink)
Der Meister
 
Goodness Yoshimitsu's Avatar
 
Join Date: Nov 2004
Posts: 650
Default Re: Alguien q sepa visual basic ?

Quote:
Originally Posted by Redempt View Post
Nunca fui a clase de ningún tipo, así que algo me habré perdido, ¿qué cambia el vbmodal...?
Que si podes seguir interactuando con el formulario de debajo o no.

Y en tu ejemplo estas ocultando el form principal y cargando y mostrando el form chau. Se asemeja a mi ejemplo. Lo de "modal" y "me" es opcional.

Quote:
Originally Posted by erik8891 View Post
Haber tuve probando y no me funca de ninguna manera =S ,es porke yo soy manko obviamente.
Yo supongamos q tengo un form hecho y al q llamare form1 .
Ahora creo otro q se llame form2 ,kiero hacer q cuando haga clic en un boton del form2 se habra el form1 ,como hago?.
Hice el q dice Goodness Yoshimitsu pero me tira runtime error "424" "object required".
Probe con el q dice Masterlau pero tampoco me ba =( .
Alguna idea?.
Salu2

Edit : ahi lo descubri ,yo taba poniendo frmVENTANA.Show vbModal, Me y habia q poner VENTANA.Show vbModal, Me.

Bueno muchisimas gracias por la ayuda amigos ^^.
salu2 .
Claro "frmVENTANA" es todo el name, lo de "frm" es una forma de trabajar más prolija y mientras estás escribiendo code se te hace más facil a vos y alguien más que quiera leer tu code saber qué tipo de objeto es el propietario de ese name.

Releyendo mis posts, me doy cuenta que te expliqué mal en esto:
"Donde VENTANA es el name del formulario a mostrar y BOTON el name de TU botón."
Y debió decir:
"Donde frmVENTANA es el name del formulario a mostrar y cmdBOTON el name de TU botón."

Fe de erratas :O

Last edited by Goodness Yoshimitsu; 23-08-2008 at 03:01.
Goodness Yoshimitsu is offline   Reply With Quote
Old 23-08-2008, 12:36   #9 (permalink)
Mercedes-Benz Fan
 
erik8891's Avatar
 
Join Date: Jun 2007
Location: Argentina
Posts: 426
Default Re: Alguien q sepa visual basic ?

Bueno muchisimas gracias por sus respuestas .Me ba de 10 .
Salu2
__________________

Last edited by erik8891; 23-08-2008 at 12:40.
erik8891 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual basic L_i_n_x Software 9 18-09-2006 12:20
Alguien que sepa pls... XaNNtUs Bugs/Errores 2 24-06-2005 13:32
XML+Visual Basic 6.0 ¿Cómo? Lyvien Software 0 24-01-2005 12:52
Alguien que sepa!!!! Morpheo Elwyn 8 24-12-2004 19:00


All times are GMT -3. The time now is 20:02.


Copyright ©2008 Gxzone Argentina
Powered by SKServers.net
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
 

Page generated in 0.06482 seconds with 9 queries

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299