Jump to content
Xtreme .Net Talk

capwrmt

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by capwrmt

  1. How would I communicate between two forms, ie sending information from form 1 to form 2, and calling a method in form2 from form1?
  2. You need to add a setup project to your solution. There, you can specify any dependencies to include, dlls, help files, ect.
  3. well, one added advantage/beneift of separate classes is the reusability of your code, and it does make it easier to maintain your code.
  4. On page load give the following: caCalendar.Visible = false private sub DropDownList1_SelectedIndexChangedByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboWeights.SelectedIndexChanged caCalendar.Visible = true End sub
  5. How would I package the .NET framework with my .net project, so that the setup installation will install .NET framework if it's not installed on the client computer?
  6. you could enable horizontal scrollbars ...
  7. cbox.checkstate="checked" should do the trick :)
  8. I'm not sure if this is applicable or do-able in ASP.NET, but in ASP i would create a single page, comprising of multiple forms (each with the same name). I had a hidden input within each form - ie. <input type="hidden" name="cycleNum" value="cycle1"> This would be like the identifier of each form. I used a select case statement to access each form based on the cycle number. Anyways, I'm not sure if you can implement it, since I don't have experience with ASP.NET, but it's worth a shot.
  9. Thanks Winston! That was so easy to add that it's unbelievable I missed it.
  10. I know that there was a way of placing the system time in the status bar in vb6, but i'm not sure how to implement it in .net
  11. How would I create a clock component in a vb.net application, ie a running clock that will be displayed in the status bar or a docked window? any suggestions would be greatly appreciated. thanks in advance.
  12. why not place the files in a folder in your application path/folder that ways, when you create the "setup" project, you can specify that the installation create the defined folder. this would be the easiest method. ie. c::\programfiles\yourApp\Data\
  13. form.closing is used when you want to display the "are you sure you want to close prompt" Private Sub frmT_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing If MsgBox("Are you sure you want to close?", MsgBoxStyle.YesNo, "Close?") = MsgBoxResult.Yes Then Application.exit else 'don't exit app e.Cancel = True end if End Sub
  14. I attempted to debug the code by first commenting out the database code. Result - the dynamic code worked fine. Therein, I discovered that I neglected to include the "objCon = new adodb.connection" constructors. So, my main problem was with the database constructors. However, I also decided that using control arrays was not necessary and were a waste of memory. So, instead I just created a loop: do until objrs.eof lbl=new label btn=new button with lbl .text="new label" ... end with with btn .text="new button" ... end with me.controls.add(lbl) me.controls.add(btn) objrs.movenext loop
  15. nevermind, i solved the problem :D
  16. ok, i tried your suggestion and I am getting a runtime error ... An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll Additional information: Error creating window handle. Here is the code that I am using: Private Sub frm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'main sub is used to initialize database connections and form objects main() addControls() 'add dynamic form controls end sub Private Sub addControls() .....database connection code .... Dim i As Integer = 1 'add a row of controls for each record Do Until objRs.EOF ''''lbl = New Label() ''''cbo = New ComboBox() ''''textFirst = New TextBox() ''''textLast = New TextBox() ReDim Preserve lbl(i) ReDim Preserve cbo(i) ReDim Preserve textFirst(i) ReDim Preserve textLast(i) With lbl(i) .Text = objRs.Fields("TeamName").Value .Location = New Point(8, 104 + i * 40) '.Size = New Size(100, 50) .Name = lbl(i).ToString End With With cbo(i) .Items.AddRange(New Object() {"Active", "Bye"}) .Text = "Active" .Location = New Point(112, 96 + i * 40) .Size = New System.Drawing.Size(121, 29) AddHandler .SelectedValueChanged, AddressOf handlercboclick .Name = cbo(i).ToString End With With textFirst(i) .Location = New System.Drawing.Point(248, 96 + i * 40) .Text = "" .Name = textFirst(i).ToString End With With textLast(i) .Location = New System.Drawing.Point(368, 96 + i * 40) .Text = "" .Name = textLast(i).ToString End With Controls.Add(lbl(i)) Controls.Add(cbo(i)) Controls.Add(textFirst(i)) Controls.Add(textLast(i)) objRs.MoveNext() i = i + 1 Loop End Sub any suggestions on how to make this work would be greatly appreciated. Thanks.
  17. Oh i see ... that's a rather neat feature.... i'm working in a team of developers of various programming backgrounds. so, this will help us out a lot.
  18. Are you able to interchangeable code in c# and vb in a .net project? is this possible?
  19. How would I dynamically create controls in vb.net when the program is running? i.e. control of location of new controls, accessing methods and properties, ect?
×
×
  • Create New...