Jump to content
Xtreme .Net Talk

Tryster

Members
  • Posts

    12
  • Joined

  • Last visited

Personal Information

  • Occupation
    Programmer

Tryster's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I think you'd find it easier to declare a delegate, and fire the process off on a thread allocated from the thread pool: Private Delegate Sub RunProcessDelegate() Private Sub StartProcessRunning() Dim oDel As New RunProcessDelegate(AddressOf RunProcess) Dim oCallback As New AsyncCallback(AddressOf ProcessFinished) oDel.BeginInvoke(oCallback, Nothing) End Sub Private Sub RunProcess() 'This method will be called on a different thread and will run asynchronously End Sub Private Sub ProcessFinished(ByVal ar As IAsyncResult) If ar.IsCompleted Then MessageBox.Show("Process finished asynchronously!") End If End Sub
  2. This behavior is caused by the List control clearing the DisplayMember field when you set the datasource to Nothing. If you reset the DisplayMember property to it's original value after setting the DataSource property it should work fine.
  3. Why not change the HtmlImage control to be an ASP:ImageButton control? This would be a lot easier than the alternative, which would mean either extending the HtmlImage control, or implementing the postback interfaces in your custom control...
  4. You could amend your DumpData JScript function to take the button as a parameter. The you could change this line: cbDBText.Attributes("onchange") = "DumpData();" To this: cbDBText.Attributes("onchange") = String.Format("DumpData({0});", cbDBButton.ClientId) That should work...
  5. Assuming the buttons on your form are named btnDrivingRange and btnResults, the code DiverDan is proposing would look something like this: Private Sub btnDrivingRange_Click(sender as Object, e as EventArgs) Handles btnDrivingRange.Click GetValue(True) End Sub Private Sub btnResults_Click(sender as Object, e as EventArgs) Handles btnResults.Click lblDrivingRange.Text = "Driving Range: " & GetValue(False) End Sub Private Function GetValue(increment as Boolean) As Integer Static iValue as Integer If increment Then iValue += 1 End If Return iValue End Function
  6. Kids have it easier these days because the technology is cheap and readily available. I had to combine a years worth of Saturday job, paper round, birthday and christmas presents to get my first computer (Spectrum 48k). I started programming on that aged about 12 I guess, I didn't do much with it though, other than get the Currah U Speech unit to say naughty words... Those were the days...
  7. I think one ot the key things to bear in mind is that Longhorn is being build from the ground up around the .NET philosophy. Indeed, if you believe the hype the .NET FW will eventually replace the Win32 layer. Just because currently MS has chosen to implement a lot of it's classes on top of Win32 (probably for speed of development) does not mean they will continue to do so in the future. Essentially Win32 is a wrapper around calls into the kernel, so as new kernel calls are added in Longhorn and beyond, it makes sense that the associated .NET classes will make these calls direct to the kernel. As such I think we'll see (on the Windows platform at least) .NET performance getting better and better. Additionally, with longhorn and beyond the framework will become part of the operating system, (much as Win32 is now) and we should see performance gains from this...
  8. You are assigning the return value of the expression "result = False" to the variable result... When you declare the variable result, it is set to False by default. As such the expression "result = False" evaluates to True...
  9. Does anyone have any idea of how I could create a windows service that accepts configuration information? Ideally, I was hoping there would be a way to add a tab to the Serives plugin in the control panel, that would allow the user to specify some configuration information for the Service. The only other way I can think of doing it, is to provide a stand alone config program, or a MMC snap in that stors the config info in the registry for my service to retrieve, but ideally if possible I'd like to do what I've suggested above. Any help would be appreciated. Thanks Tryster
  10. Taken from Wrox Press Profession ASP.NET: On a side note, I generally only ever use server controls where I will be interacting with the control in my ASP.NET code. Tryster
  11. Personally I use DriveImage to create a machine image after an install of XP Pro, VS6, VS.NET, etc. I keep this image on my second drive (takes up about 5GB) and whenever I need it, I just do a restore. Takes about 10 - 15 mins.
  12. You want the SelectedIndexChanged Event... Remember to set the AutoPostBack property of the DropDownList to True. Tryster
×
×
  • Create New...