Click here to Skip to main content
15,868,016 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Upgrading vb.net 2002 to vb.net 2005 Pin
gil_be31-Oct-07 1:15
gil_be31-Oct-07 1:15 
GeneralRe: Upgrading vb.net 2002 to vb.net 2005 Pin
Luc Pattyn31-Oct-07 2:03
sitebuilderLuc Pattyn31-Oct-07 2:03 
QuestionInsert Code tag in the webbrowser control Pin
Luay.Essa29-Oct-07 21:14
Luay.Essa29-Oct-07 21:14 
QuestionLoading a User Control onto a panel at runtime Pin
Henry Venn28-Oct-07 1:49
Henry Venn28-Oct-07 1:49 
AnswerRe: Loading a User Control onto a panel at runtime Pin
TJoe28-Oct-07 6:52
TJoe28-Oct-07 6:52 
QuestionRe: Loading a User Control onto a panel at runtime Pin
Henry Venn28-Oct-07 15:56
Henry Venn28-Oct-07 15:56 
AnswerRe: Loading a User Control onto a panel at runtime Pin
TJoe29-Oct-07 2:14
TJoe29-Oct-07 2:14 
GeneralRe: Loading a User Control onto a panel at runtime Pin
Henry Venn30-Oct-07 0:58
Henry Venn30-Oct-07 0:58 
Hey Tom
Sorry there's not much to it really - here:
<br />
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br />
        Dim myAssets As New UserControlIncome()<br />
        With myAssets<br />
            .Location = New Point(64, 40)<br />
            .Size = New Size(100, 20)<br />
            .TabIndex = 0<br />
         End With<br />
        Try<br />
            '       Original Code causing error:      <br />
             '  Me.ParentForm.Controls.Item("panelMiddle").Controls.Add(myAssets)<br />
            <br />
            Me.Controls.Item("panelMiddle").Controls.Add(myAssets)<br />
            ' this doesn't work: Me.Controls.Item("panelMiddle").Show()<br />
        Catch nrx As NullReferenceException<br />
            Debug.Print(" NULL ref putting user control on panel")<br />
<br />
        Catch ex4 As Exception<br />
            Debug.Print("Exception - plian vanilla")<br />
        End Try<br />


The user control I created using VS8 and even if it is a blank "form" it only flashes on screen for a few seconds. Like I said, if I use a text control, or listview or something, it stays. I've looked at what I can on user controls but all the doc'n I can find deals with the designer - i.e. compile time. (note: the controls work perfectly if I place them on a form, make it invisible and then show it when I need to, but this is a kludge I do not need I feel).

Thanks for your help so far - I am in a position where I am finishing uni and really need to find a team I can work with so I don't get bogged down for so long on these kinds of errors.



Regards,

Henry

ps When I use a textbox or another pre-packaged MS control it is placed correctly on the panel, however when the user control briefly flashes on screen it is out of bounds of the panel, I think at the Point (64,40) of the parent form
GeneralRe: Loading a User Control onto a panel at runtime Pin
TJoe30-Oct-07 2:01
TJoe30-Oct-07 2:01 
QuestionRe: Loading a User Control onto a panel at runtime Pin
Henry Venn31-Oct-07 17:18
Henry Venn31-Oct-07 17:18 
AnswerRe: Loading a User Control onto a panel at runtime Pin
Henry Venn31-Oct-07 17:35
Henry Venn31-Oct-07 17:35 
QuestionEmbedding an Access table into datagrid Pin
latuan13227-Oct-07 21:53
latuan13227-Oct-07 21:53 
AnswerRe: Embedding an Access table into datagrid Pin
Paul Conrad28-Oct-07 6:33
professionalPaul Conrad28-Oct-07 6:33 
GeneralHorizontally Scroll Lines of Text Pin
Brady Kelly27-Oct-07 1:40
Brady Kelly27-Oct-07 1:40 
GeneralRe: Horizontally Scroll Lines of Text Pin
Luc Pattyn28-Oct-07 7:08
sitebuilderLuc Pattyn28-Oct-07 7:08 
GeneralRe: Horizontally Scroll Lines of Text Pin
Brady Kelly29-Oct-07 3:21
Brady Kelly29-Oct-07 3:21 
GeneralRe: Horizontally Scroll Lines of Text Pin
Luc Pattyn29-Oct-07 3:27
sitebuilderLuc Pattyn29-Oct-07 3:27 
GeneralRe: Horizontally Scroll Lines of Text Pin
Brady Kelly29-Oct-07 4:02
Brady Kelly29-Oct-07 4:02 
GeneralRe: Horizontally Scroll Lines of Text Pin
Luc Pattyn29-Oct-07 4:31
sitebuilderLuc Pattyn29-Oct-07 4:31 
GeneralRe: Horizontally Scroll Lines of Text Pin
Brady Kelly29-Oct-07 4:39
Brady Kelly29-Oct-07 4:39 
QuestionAccessing multiple groups of radiobuttons Pin
Steve Landers26-Oct-07 13:25
Steve Landers26-Oct-07 13:25 
AnswerRe: Accessing multiple groups of radiobuttons Pin
Luc Pattyn26-Oct-07 14:15
sitebuilderLuc Pattyn26-Oct-07 14:15 
GeneralRe: Accessing multiple groups of radiobuttons Pin
Steve Landers27-Oct-07 10:08
Steve Landers27-Oct-07 10:08 
GeneralRe: Accessing multiple groups of radiobuttons Pin
Luc Pattyn27-Oct-07 13:25
sitebuilderLuc Pattyn27-Oct-07 13:25 
GeneralRe: Accessing multiple groups of radiobuttons Pin
Steve Landers27-Oct-07 13:56
Steve Landers27-Oct-07 13:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.