Jump to content
Xtreme .Net Talk

hog

Avatar/Signature
  • Posts

    1011
  • Joined

  • Last visited

Everything posted by hog

  1. This is the first time I have tried this and am having difficulty doing it. I have run through a book exercise, on line help etc and get the same result. .NET Framework not installed. I know I need dotnetfx.exe present which I include in my solution but it still does not work. Does this mean I have to inform target users to run dotnetfx.exe first, then setup.exe? Is there not a way to have the whole thing automated?
  2. yes I do. But these controls appear not to have a readonly property? Setting enabled to false works OK but the text is too dim
  3. So is this method of accessing registry keys better than using SaveSetting and GetSetting?
  4. I notice that if I set a textbox to readonly the font appears bold on a grey background making it easy to read. But the datetimepicker and combox do not have a readonly property. If I set enabled to false the text is faint on a grey background making it hard to read. Does anyone know of a work around for this? I have tried setting font to bold but that makes no difference.
  5. Hi, what I did was to create a new constructor which has two parameters passed to it from objectA which allows for the identification of each row, this creates six new objects using each seperate row within objectA. Not sure if this is the most efficient way to go about it......but it works!
  6. Hi, if object A has six rows of data within it and I want to create six new objects each using one row from object A is there a way to do it? If I use object1 = objectA I obviously get all rows returned in objectA. If I move to each row within objectA then try the same line I get all rows.......obviously I need to modify each row as a single entity..... Might be being dump here but ADO and objects are fairly new to me as VB.Net so forgive what might be a stupid question :-(
  7. I have a dll I created which I call when an error occurs. It displays to the user where the error occured and the text of the error. The form displays the application name which called the dll. The form also includes a button to which send the error details to the user name(s) passed to the dll. Works a treat for me :-)
  8. Yup.....that makes sense.....ta :-)
  9. Is it more efficient to store the value of an objects property to a form level variable and use the variable rather than continually calling the objects property to get the value?
  10. Aha, I have solved this at last, taken me all afternoon! There was no code in the constructor that would cause an error, however I had not included a line to declare a table object, a requirement for my particular setup. Two things I have learned from this: 1. Check my code thoroughly before posting 2. A handy tip on how to test which constructor is being access, I'm sure this help snippet will be useful.....thanks
  11. Does your reply mean you want me to explain further?
  12. I have an object which has two contructors, one which requires a parameter and one which does not. I call the parameter contructor first and following recordcount and internal error checking if the object contains no data I call the unparameterised constructor. Problem is although my forms text changed events all appear assign data to my new instance they are infact going to the original. ie m_objJob = new job(customerid) yadda yadda m_objJob = nothing m_objJob = new job() the line assiging nothing was an attempt to get around it, but all I get now is m_objJob not instantiated? Even through I step through the new() contructor code with no error? Any ideas welcome
  13. hog

    Hanging IDE

    OK, thanks.....maybe I'll just have to live with it and save very often!
  14. hog

    Hanging IDE

    Hi, does anyone experience the IDE hanging resulting in a ctrl-alt-del to get out? This was happening virtually every time I used the IDE, so wiped the laptop and reinstalled everything, but last night it happened again. I have just intstalled SP2 and have not had a chance to check it yet, but does anyone know if any of these could be to blame: Many of my forms have 32x40 animated gifs, disk save, delete etc. One form has a tab control with 13 pages with 12 controls on each page, plus the main form has 3 animated gifs. When each form is closed I set all objects to nothing in order to aid garbage collection, however what happens if the app bombs as they do in development and I select quit to go back to the IDE. Does the memory free up or am I experiencing a cumulative memory leak? I have read the other thread re slow IDE, I have 32 items in solution explorer and if I click to view a form in design mode there is a considerable delay before it opens. Is this the norm? Phew.....done....all help gratefully received....
  15. Thanks........... Hog
  16. Sorted! Ta muchly
  17. I messed about changing the view of my TabControl so that the tabs appeared as buttons. On doing this TabPage 12 now appears next to Tabpage 1 then 2 follows. This has not happened before no matter how many times I opened the form I have read the section in the Windows Forms FAQ referred to by Divil which says to delete them then recreate them on form startup! Anyone got a better idea??
  18. Can some explain in laymans terms the difference between the to convertion keywords please. I think I have it but just want to be sure. The help says Dim Q As Object = 2.37 Dim I As Integer = CType(Q,Integer) Dim J as Integer = DirectCast(Q,Integer) I succeeds as 2.37 converts to an Integer... J fails as Q was declared as an Object not an Integer so DirectCast fails. Question is why use DirectCast instead of CType Apologies incase this is a stupid question
  19. Try this: Dim myDBConnectionInfo as New CrystalDecisions.Shared.ConnectionInfo() With myDBConnectionInfo .ServerName = ..... .DatabaseName = ..... .UserID = ..... .Password = .... End With Dim my TableLogonInfo as New CrystalDecisions.Shared.TableLogonInfo() Dim myDatabase = myReport.Database Dim myTables as myDatabase.Tables Dim myTable as CrystalDecisions.CrystalReports.Engine.Table For Each myTable in myTables myTableLogonInfo = myTable.LogonInfo myTableLogonInfo.ConnectionInfo = myDBConnectionInfo myTable.ApplyLogonInfo(myTableLogonInfo) Next
  20. look at the TableLogonInfos within the crystalDecisions.shared namespace. There you will find the ConnectionInfo class
  21. AT LAST!!!! For those of you how are interested, probably not but here you go: Dim htHash As New Hashtable() Dim pnlPanel, tbcTabControl, tbpTabPage, ctlControl As Object Dim intX As Integer For Each pnlPanel In Me.Controls For Each tbcTabControl In pnlPanel.Controls For Each tbpTabPage In tbcTabControl.Controls For Each ctlControl In tbpTabPage.Controls htHash.Add(ctlControl.Name, ctlControl) Next Next Next Next For intX = 1 To 12 DirectCast(htHash("txtDueDate" & intX), Control).Text = "HELLO" Next THANX Divil :-)
  22. Mmm helps if I type correctly !!!! Missed the New statement.....DOH. However I now get the same error on the directcast line?
  23. Oh by the way, Messagebox.Show(Controls.IndexOf(Me.txtDueDate)) returns -1, control not found!
  24. Thanks, you sample of a hashtable makes more sense than the stuff I read on it last night. However, when I run the VB snippet above all I get at the h.add line is 'object referenc not set to an instance of an object'
  25. I still favour the array approach, however MS is making my life hell at the moment due to this reference by index only!! I can cycle through all the controls and display the name of each control, but am unable to obtain their index??? If I messagebox a textbox for example using: Messagebox.Show(me.txtDueDate1.Text) I get the text. If I then try any number of ways to get the index of this control I get -1, control not found! Messagebox.Show(Me.Controls(Me.Controls.IndexOf(Me.txtDueDate1)) HELP!!! Anybody.....
×
×
  • Create New...