Monday, January 18, 2010

VB.NET Coping with many controls?

I've come to a point in project that there are roughly 500-600 controls on one form, these are all organized into groupbox/panels/tabs. The problem I'm getting is that I've run out of space and now just moving one panel to the side is connecting with a group box in another one you cant even see, could anybody please point me in the right direction on how combat this?





Is it possible to turn automatic parenting of controls? I'm pretty happy with my layout, I just need to move things about now and again.VB.NET Coping with many controls?
That many controls? Are they all necessary? Could you not simplify your form or have more than one form?





Instead of having tabs, have another form, then on Userform1 you can insert a button to show Userform2 instead of selecting a tab?





Then you could have multiple tabs (you can have more than one tab-page-book on one form) on multiple forms.





There's more than one way to skin a cat. Is the way you're doing it now the best/easiest way?

Type controls list in vb.net?

I'm sorry, can you clarify your question? Are you asking for a list of controls in vb.net, what type is a control list in vb.net, or list of type controls in vb.net?





what version of visual studios and framework are you wanting to know about?





here's the new controls in the VS2005:


http://visualbasic.about.com/od/usingvbn鈥?/a>

Custom Controls in VB.net?

I am working in Visual Studio 2008 (VB.Net) on a Bingo game for my wife. The game will have 18 faces (individual bingo cards) and I am using individual labels (25 per face) and writing the label value from arrays of random numbers. This is great but, the individual naming of all the labels gets to be a bit tedious after a while. IE f1_bp1, f1_bp2 where f1 means face 1 and bp1 and 2 would be B row Position 1 and 2.


My question is this, is there a way that I can take my first finished card and make it into a custom control and then just add 18 of them onto my form, perhaps loading the labels with a couple arrays? Any help would be great, as I've been promising her this for 6 months now.Custom Controls in VB.net?
Okay. If I understand you correctly your're writing the same code 18 times? You can use a custom control.





In visual studio go to new, and select WebUserControl ( or something like it ). It will have an extension of .ascx.





Create you're entire bingo card within the .ascx page.





Now on the page you want to use the custom bingo card control put this at the top...(my syntax may be wrong)





%26lt;%@ Register TagPrefix=';UC'; TagName=';TestControl'; Src=';test.ascx'; %%26gt;';





now anywhere you want to use this control you'll be able to insert similar to any asp:Label control but you'll have to use you're custom code...like the following





%26lt;UC:TestControl id=';MyBingoControl'; runat=';Server'; /%26gt;





Well I hope that helps....





Check out this page.


http://support.microsoft.com/kb/893667

Resize Controls in VB.NET on Form Resize?

How would I automatically have a tab container resize to take up all but 20 pixels of each side of the form when the form resizes and then have a web browser inside the tab container resize to take up the entire container on resize?





Thank you.Resize Controls in VB.NET on Form Resize?
Set the tab container's anchors to all four sides. Do the same for the browser.


The anchors can be found in the Properties pane on the form designer.Resize Controls in VB.NET on Form Resize?
On form resize, do your calculations (40 pixels less than the form width, for example) then resize and position the control (the tab container, in this case).

What are the controls for VB.net?

i already know about the WebBrowser and UserControl controls but there are more that i do not know.What are the controls for VB.net?
Controls are anything that you see in the tools menu. There are hundreds of controls. buttons, labels, textbox's...ect ect.What are the controls for VB.net?
There are an almost unlimited number of controls for most .Net languages. Trying to get a list of them to work through is a thoroughly pointless task - particularly as 99% of controls that exist you will never need in your life as a programmer.


Learn these things as you go - there's too much to know to try and learn it all before you start.

Where can i get good visual basic (6.0 not vb.net) user controls?

i need it for my thesis.. . .





:pWhere can i get good visual basic (6.0 not vb.net) user controls?
Check out happyhippo.net, you can get tons of free programs there.Where can i get good visual basic (6.0 not vb.net) user controls?
You search in:


1) http://download.com


2) http://pscode.com





For free VB codes, visit: http://smartcoder.awardspace.com








KaBalweg


http://smartcoder.awardspace.com
The code project is good source of free code, controls, tutorials etc -





http://www.codeproject.com
  • topical cream
  • I want to handle events in Vb.net when controls are added with arrays?

    It's pretty easy to do. Here is a piece of code that creates an array of buttons each with a click event handler:





    Dim buttons(4) As Button





    For i As Integer = 0 To 3


    buttons(i) = New Button


    buttons(i).Top = i * 50


    buttons(i).Height = 40


    buttons(i).Width = 100


    buttons(i).Text = ';Button';


    AddHandler buttons(i).Click, AddressOf Button1_Click


    Me.Controls.Add(buttons(i))


    Next





    The AddHandler command will cause each button to call the event function Button1_Click when it is clicked.





    I want to handle events in Vb.net when controls are added with arrays?
    You can't handle events of objects in arrays.