Cannot get the OpenFileDialog and ColorDialog controls in the component tray
-
domingo, 1 de abril de 2012 18:31I hane followed all step as described in chapter 4 pages 108 through 112. I can not get the OpenFileDialog or the ColorDialog into the component tray. I am using VB2008 Express. I have redone my work mant times and connot get this solved. What can I do to solve this. I have seen where others have asked this same question. Please help
Todas as Respostas
-
domingo, 1 de abril de 2012 19:21
Hi Gary
I haven't had that happen to me.
if you add one from the toolbox,does it show in the list in the Properties pane at all?
But unless you really need it in the component tray, why not just create one in code?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cbd As New ColorDialog If cbd.ShowDialog = Windows.Forms.DialogResult.OK Then Button1.BackColor = cbd.Color End If End Sub
“This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.”
- Editado jwavilaMVP segunda-feira, 2 de abril de 2012 04:35
- Sugerido como Resposta Mark Liu-lxfModerator terça-feira, 3 de abril de 2012 04:28
- Marcado como Resposta Mark Liu-lxfModerator terça-feira, 10 de abril de 2012 05:44
-
segunda-feira, 2 de abril de 2012 17:16
It still did not work. I deleted the project and than rebuilt it still cannot get then to the tray
When I did try to copy and paste the code it didnot show in the tray and when I reviewed the code I receive an error that Button1 was not declared. Thanks
-
segunda-feira, 2 de abril de 2012 18:10
it won't show in the tray if you do it in code.
so, create a new WinForms app and add a button from the toolbox to the form. Then add the code above and run it
“This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.”

