Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. Nerseus - those dialogs never have their tabs removed. The api tabbed dialog is such that I would bet money that those tabs are just never added in the first place.
  2. No, because I don't know how your data is structured. To add a child node to the one you're making, varTVItem.Nodes.Add("blah")
  3. It's not unfortunate, it's just not the way the thing is supposed to work. Nowhere in Windows or any other app have I seen people either disabling tabs, or removing individual ones. The tabbed dialog control is supposed to group together similar sets of controls, where they wouldn't all fit on to one form. Nothing more, nothing less. Bearing that in mind, you might want to re-think how your interface works.
  4. You would just define the property as StructA: Public Property blah() As StructA Get Return VarA End Get Set(ByVal Value As StructA) VarA = Value End Set End Property
  5. He's refusing to keep the icons in icon format, as they were intended. If he would just do this, no quality loss would occur.
  6. You use it in your own derived controls, if you want your control to be able to have transparent or translucent areas in. If you set both those styles on, then when the time comes to paint your control you can do so using colors with an alpha component. Microsoft URL on the topic Windows Forms FAQ on the topic
  7. The thread just needs a point of reference to the instance of your main class that it needs. You could do this any number of ways, including a shared field of the main class which returns the instance (if you're only having one).
  8. Each Node is an object in itself, of type TreeNode. Every Node has a Nodes collection, of all its children. So to add a child node, use myNode.Nodes.Add().
  9. Well, both assemblies will need to reference a common assembly where you will define the delegate function that accepts the percentage parameter. There has to be a common point of reference because delegates are type-safe. Then, you can make a method in your host application which has the correct signature and pass that, as the type of the delegate, to your plugin (or whatever the external assemblies are).
  10. How far have you got so far? Is there a reason you can't pass a handle to the Progress Bar itself to the assembly you're loading?
  11. Dim f As Form2 = New Form2() f.Show() Should do it, assuming this code is placed in Form1.
  12. PictureBox.Image = New Bitmap("c:\mybitmap.bmp")
  13. The solution is to pass it as the type of the form you actually need, not just Form. You say you want it to be as generic as possible, but how can it be generic if you need to update something on a specific form? The other solution is to cast your variable to the right type when you need to, e.g. DirectCast(myStoredForm, frmMain).Blah = "blah"
  14. divil

    Timing

    You could start a thread and then make it sleep for the time remaining until it should resume again.
  15. I'd skip over Brinkster and find something a little more professional.
  16. Brinkster does .NET hosting as standard (not sure about in their free account though). Whether or not I'd recommend them depends on what the site is for, really.
  17. divil

    Split

    You posted some code above with the beginning of a loop, I assumed you would put it in that one. Just above that, with the other declarations you would declare t as type textbox, then go through adding them. Something like this, maybe? Dim items() As String Dim s As String = nreader.ReadToEnd items = s.Split(New Char() {"|"c}) Dim anItem As String Dim t As TextBox For Each anItem In items t = New TextBox() t.Text = anItem t.Location = New Point(100, 20 * items.IndexOf(anItem)) 'Would have to vary throughout the loop Controls.Add(t) Next
  18. divil

    Split

    Are these textboxes already set up? If not, you could initialize, populate and display textboxes on-the-fly in your loop, like so: t = New TextBox() t.Text = "the text for this item" t.Location = New Point(100, 100) 'Would have to vary throughout the loop Controls.Add(t)
  19. Once you have your bitmap object, you can turn a colour in to a transparent section by calling the MakeTransparent method: b.MakeTransparent(Color.White)
  20. There doesn't appear to be a way to do this using the arguments passed to the Popup event of the context menu, so I guess you'll have to set a flag. I guess MS didn't think of people wanting to use the same context menu on different controls. I guess on some controls, you could check their .Focused property and that might be a way to tell if the user just clicked on them.
  21. Not if there wasn't one on the site. I believe there are some free web C# to VB translators out there though, could be worth searching.
  22. All arrays are of type System.Array. Why don't you declare it in the usual fashion? Dim itemids() As String ReDim itemids(x) Gives you an array with x + 1 elements.
  23. I guess you could attempt to call the .Close method. It's not something I've ever had to do so I don't know. I guess if you closed the socket and disposed it, the callback wouldn't fire.
  24. No, you specify all that stuff in the AssemblyInfo.vb file. That's what it's there for, you should see all the blank spaces waiting for be filled in if you haven't already.
  25. Dim a As Reflection.AssemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName() You can then use the various methods of a to find out the version of your assembly easily. As for company name and product name, Application.CompanyName Application.ProductName Will do the job. You can ignore the AssemblyInfo.vb file, that's just where you specify them for the compiler, not how to retreive them back at runtime.
×
×
  • Create New...