Jump to content
Xtreme .Net Talk

torisch

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by torisch

  1. Thanks a lot! Looks like just what I was looking for. Will try this soon!
  2. Hi. I have some icon libraries in form of icl-files. Is there a way I can extract the icons directly from the icl-files to use on buttons and forms in my winforms applications? I'm programming in VB.NET, but solutions for C# is OK too. __ Tor Inge
  3. torisch

    Linecount

    Is there a way I can get Visual Studio to tell me how many lines of code there is in a project/solution, or do I have to check each file my self, and sum the linecount for each file? -- Tor Inge
  4. Hi! I have made a windows service application. I try to put a NotifyIcon in the system tray when the service is running, but it does not display. I have the following code in my OnStart Sub: Protected Overrides Sub OnStart(ByVal args() As String) ' Add code here to start your service. This method should set things ' in motion so your service can do its work. Dim trayItem As System.Windows.Forms.NotifyIcon = New System.Windows.Forms.NotifyIcon() trayItem.Icon = System.Drawing.SystemIcons.Question trayItem.Visible = True End Sub The service is installing and starting OK, but the icon never appear in my system tray. I'm not very in to services, so if anyone can tell me what I'm doing wrong I will be a happy man! Thanx! __ Tor Inge
  5. Tanks! End worked fine for me! -- Tor Inge
  6. I have tried to do it this way: 'This goes in form load mainform.vb Do While Not Authenticate(PubVar.BrukerNavn.ToString, PubVar.BrukerPassord.ToString) Dim b As New frmLogin(Db) b.Owner = Me b.ShowDialog() Loop 'This goes in frmLogin Cancel button click handler Private Sub btnLoginCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoginCancel.Click Me.Owner.Close() End Sub But then I only get a System.ObjectDisposedException Any clues? __ Tor Inge
  7. Hi! There is probably a simple solution to this question, but i have not been able to make it out. I have an application that runs in mainform.vb. To log in to it, the user have to authenticate with username and passwd, which I ask for in a separate form called from form load. This form will be called again and again until the user types a correct user/passwd combination. My trouble is how I can close the entire application from the cancel button on the loginform. Now the user have to kill the application in Windows if he does not have the right user/passwd combination. -- Tor Inge Schulstad
  8. Hi! I have a form where I display the contents from a table in a database. For each record in the database i dynamically generate a textbox and a button. The textbox contains the content of the record in the database and my intention is to give the user the possibility to delete the databasereccord by hitting the button. I put the dynamically generated textboxes and buttons in two arraylists, and adds them to a panel like this. Dim tb as New ArrayList() Dim btns as New ArrayList() With rdr Dim i As Integer = 0 While rdr.Read 'Adding TextBox tb.Add(New TextBox()) tb(i).text=rdr.item(1).ToString Me.Panel1.Controls.add(tb(i)) 'Adding Button btns.Add(New Button()) btns(i).text="Delete this record" Me.Panel1.Controls.add(btns(i)) i = i + 1 End While .Close() End With This is a little simplified, but I manage to generate the form as I want it to look. My problem is how to respond to a click event from the buttons. I reccon it has to be dynamically generated events for the buttons too, so that I can find which button the user have clicked. Anybody has a clue about how I can solve that? I'm using VB.NET by the way.. -- Tor Inge Schulstad NORWAY
  9. I have a ListView (in details view) with multiple columns. Is it possible to add a unike tool tip for each element in each row? E.g. if i hold the pointer ower row3 col3 I want to show an other tool tip than if I hold the pointer over row3 col4. -- Tor Inge
  10. Thaks! I think so too! Will try it tomorrow and see.. -- Tor Inge
  11. Hi! Have tried to find the answer to this question in the forum, but I have not found what I'm looking for, so I'm posting my problem hoping someone can help me. I have this table in a MSSql database: Category(catID, catName, catParentID) The database can contain Categories(rootcategories), which can again contain an infinite number and levels of subcategories (althoug rearly more than five sublevels..) A rootcategory is indicated by a row in the Category table with catParentID=0, and a subcategory is indicated with a row where catParentID=catID from its parent category. What I want to do is to reflect the content of this table in the database in a TreeView control in VB.NET. I think it would be possible to do this with a recursive procedure, but when i try i get into trouble adding the subCategory nodes to the right place in the tree. Does anyone have any suggestions how to do this an effective way? -- Regards Tor Inge (Pardon my English, it's just my second language...)
×
×
  • Create New...