Jump to content
Xtreme .Net Talk

shizon

Members
  • Posts

    6
  • Joined

  • Last visited

shizon's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I would like to write a connection, sub, function, object maybe? Anyway, I'd like to be able to set a primary and secondary SQL server. Connect to the primary if it can, if not, connect to secondary. Also, if during operation, the primary goes down, I'd like to raise an event, prompt user to connect to secondary, then if primary comes back up, reconnect to primary and sync. I know this is a lot to ask for, I guess I'm just looking for ideas on how to raise such events. never really done any kind of object like that. Only simple user controls. Anyone have any thoughts? Impossible? Too hard? Perhaps just a tool someone else has made and I can get?
  2. I'm running it on my laptop which is 1.6 Centrino. I guess I should also add that this is being developed for a smart application so I'm running it in the ce.net emulator. Also, I stuck a msgbox at the end of the for next to show me the time and it hits the msgbox before it's done drawing the buttons. I don't think it's a code related issue, but more a factor of drawing the buttons. I'd say it takes about 1/2 a second, maybe a little more, to draw them. I also tested by creating another button that hides and then shows the buttons and I get no delay whatsoever. I also did some more research and found some other talk about .NET being slow to draw controls, especially over 50. I heard from somewhere, don't remember where, that you can use bitblt to help this somehow.
  3. Public Sub DoButtons(ByVal uplimit As Integer) Dim x As Integer Dim xx As Integer Dim y As Integer Dim mybutt As Button y = 5 xx = 1 For x = 1 To uplimit TheButs(x) = New System.Windows.Forms.Button TheButs(x).Size = New System.Drawing.Size(36, 36) TheButs(x).Font = New System.Drawing.Font("Microsoft Sans Serif", 6.75!, System.Drawing.FontStyle.Regular) xx += 1 If xx > 10 Then xx -= 10 Select Case x Case 11 y = 44 Case 21 y = 83 '44 + 39 Case 31 y = 122 '44 + 39 * 2 Case 41 y = 161 '44 + 39 * 3 Case 51 y = 200 '44 + 39 * 4 Case 61 y = 239 '44 + 39 * 5 Case 71 y = 278 '44 + 39 * 6 Case 81 y = 317 '44 + 39 * 7 Case 91 y = 356 '44 + 39 * 8 Case 101 y = 356 '44 + 39 * 8 End Select TheButs(x).Location = New System.Drawing.Point(y, 26 + ((xx - 1) * 38)) TheButs(x).Text = x Me.Controls.Add(TheButs(x)) AddHandler TheButs(x).Click, AddressOf ButtonsAll_Click Next x End Sub That's the sub that creates the buttons. For x = 1 To NumberofButtons TheButs(x).Visible = True Next x Sub that shows. Sub that hides is just that only with false obviously. I've tried show() and hide()
  4. I guess I should clarify, we only create the buttons once, then it's a show/hide ordeal.
  5. We were trying to create and destroy buttons in the usual way of a "control array" but it is too slow if trying to do about 100 buttons. Is there a better performing method than the standard way of doing it in vb.net? I thought I remember something about bit something that might work. I forget what it's called. Thanks for the help.
  6. Anyone know how to get a list of files from an http server? I want to pass a function or method a url and have it give me a list of files/directories. I know you can do it with FTP, but I'm using BITS so I have to use HTTP. Thanks
×
×
  • Create New...