I am adding up combo boxes to array of combobox and assigning combo boxes to them like this ComboBox[] arrSize = new ComboBox[5]; arrSize[0] = cbSize_00; arrSize[1] = cbSize_01; arrSize[2] = cbSize_02; arrSize[3] = cbSize_03; arrSize[4] = cbSize_04; I would like to know if there is a way to delegate the array as a whole instead of me delegating each combo box manually. Please help. Thanks in advance.
tiagu
Posts
-
delegate array of controls -
Access Database is omitting the very first record and it returns the rest of the recordsFor many years I have been using vb6 with Access Database as back end. In many cases while returning record sets Access is omitting the very first record and it returns the rest of the records. I am really baffled. Please help. Hi all of you, I have corrected my mistake and got the answer for this question. Here is how I got it solved. The records were stored with time field. When querying up I did not mention the begining of the starting day (like 00:01 - which implies the start time of the day) and the end of the day in the finishing date. (Thought up this solution very late.) And so I was getting a few records eliminated from the query result set. Thanks for all of you who tried to help and you can consider my question closed. Hope this helps somebody.
-
Send values to the textbox in Report section of Crystal Reports in VB.NetHi, Besides binding to dataset i am sending individual data (say report starting date) to the text box placed in report header, to which i want to send date value. Pls help. Thank you in advance.
-
Send values to the textbox in Report section of Crystal Reports in VB.NetI need to send values to the textbox in Report section of Crystal Reports in VB.Net. How do I do this dynamically (thru code) ? Someone please Help. Thank you in advance.
-
[Message Deleted]Didi, Thanks for the falsifying visible code. I want to remove it because a few domainupdown controls may not be filled with values at runtime. I want to do away with these controls alone which do not contain any values. Can they be removed ?
-
removing controls [modified]i am trying to remove a DomainUpDown control at runtime. My coding is as follows and it gives error. Dim UpDown As System.Windows.Forms.DomainUpDown For Each UpDown In Me.Controls UpDown.Dispose() Next What is the error and how do I correct it. Someone please help.
-
Is Data control or plain coding good for data accessessing in VB.Net ?Dave and Henru, in VB6 we can add a data control to the form and then write little coding to make it work effeciently. By plain codeing i meant interacting with database without using this data control. I was reading VB.Net books and still assumed data control has to be dragged to the form like in VB6. I am new to VB.Net. And I naturally assumed I had to add a data control to the form for data interaction. In the past 4 or 5 days I have learnt through VB.Net documentation (this time carefully) that with inbuilt data control (as Henry said) we can code using data adapter, dataset and so on. Now I think i am beginig to understand the answer to my own question (ofcourse with your help). Thank you both for taking time to answer my pretty vague question. Thank you once again with hearty gratitude. Thank you Henry for your encouraging and sympathetic answer. Thank you.
-
[Message Deleted][Message Deleted]
-
How to create a text box that accepts only numbers and full stop in VB.NetThank you very much Johan, Actually i wanted the box along with dots inbetween the numbers and I added IsPunctuation to your code. Thank you once again. Didi, I was trying to do it as in vb6 but it was driving me mad without an answer. Ofcourse I am a beginer in VB.Net and Johan's coding is very new to me. Danish, thanks for your reply but I needed a box with numeric values and with / without decimals to be keyed in. Thank you all. :)
-
How to create a text box that accepts only numbers and full stop in VB.Net -
Is Data control or plain coding good for data accessessing in VB.Net ?I have a couple of doubts and need clarification 1) Is Data control or plain coding good for data accessessing in VB.Net ? Books said it was not good to program using data control (back in vb6 and so I was good at plain coding). 2) If Data control is okay can I use both Data control and plain coding (seperately, ofcourse) in the same project ? It is my doubt for a long time and someone please clarify. Thank you. :suss:
-
How do I track in which line the error exactly occurs ?Thank you Dave. I was using parameterized query and it was driving me mad. As you have instructed i used straight query like this sql = "SELECT something FROM table WHERE field1 = #" & datevalue & "#" and solved the problem within no time. Thanks also to Rajdeep and Christian for your replies. :)
-
How do I track in which line the error exactly occurs ?I am adding values to a Access table (with around 25 values). A date conversion error occurs and I do not know in which line it occurs. It is practically very tedious to go line by line. How do I track this. Someone please help. Thank you in advance.
-
Structure within structure - Help needed [modified]Okay, i got it. Thank you very much for your time and help.
-
Structure within structure - Help needed [modified]Thank you very much for your help. Your code works fine. You have taught me how to do that. Previously I placed the InnerStruct inside the RootStructure and was groping around. Can it be done that way or was it a wrong approch ? Thank you once again.
-
Structure within structure - Help needed [modified]I am able to create a structure inside a structure in vb.net but i am confused as to assign values to the inner structure. I want to send the root structure (which contains the value of its own as well those of the inner structure) to another procedure. Someone please help. Thanks in advance
modified on Wednesday, May 27, 2009 6:07 AM
-
Text is getting typed into another text boxHi Johan, this is for your information. I have placed two text boxes in the user control (Design time) without any coding. Still the text i type in the second text box is getting typed in the first text box and the cursor in the second text box is moving as per the characters typed (giving out blank spaces in the first text box). Any idea what the problem could be. Do you think i should reinstall vb.net ?!
-
Text is getting typed into another text boxThank you Johan. I will try to figure out the difference between both. Thanks once again.
-
Text is getting typed into another text boxThanks for the fast reply. It happens only the first time you run the code and type into the second text box. Otherwise it works fine. I am using the arrays in order to have more rows in my control (sort of control array of vb6). This code works fine with my regular windows form in vb.net 2008. But it does not work in my user control form in vb.net 2008. Please help.
modified on Monday, May 18, 2009 7:48 AM
-
Text is getting typed into another text boxI need help with the following code. I am building a custom control. I am storing controls in arrays as I need more rows. When I type into the second text box as soon as i run the program the text is typed into the first text box. Please help. I thank you in advance. Imports System.Drawing Imports System.Windows.Forms Public Class UserControl1 Dim arrText1(1), arrtext2(1) As TextBox Public Sub SetTextBoxes() Dim text1 As New TextBox() With text1 .Name = "text1" .Left = 8 .Font = New Font(.Font.Name, 14, FontStyle.Regular, .Font.Unit) .Size = New Point(80, 30) Me.Controls.Add(text1) arrText1(0) = text1 End With Dim text2 As New TextBox() With text2 .Name = "text2" .Left = 100 .Font = New Font(.Font.Name, 14, FontStyle.Regular, .Font.Unit) .Size = New Point(80, 30) Me.Controls.Add(text2) arrtext2(0) = text2 End With End Sub Private Sub ucGrid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SetTextBoxes() End Sub End Class :confused: