Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Not sure why it isn't working for you, just tried it here and it worked no problems. Dim result As DialogResult result = MessageBox.Show("Message", "caption", MessageBoxButtons.OKCancel) If result = DialogResult.OK Then StatusBar1.Text = "OK" Else StatusBar1.Text = "Cancel" End If and it displayed OK and cancel correctly. What values are you passing in for the buttons argument? If you step through the code in the debugger does it work as expected?
  2. If you are searching in a loop you could put an Application.DoEvents in there somewhere to allow the application to process windows messages and redraw itself. If you look under System.Threading you could drop the priority of the current thread so at least it doesn't hog the CPU. System.Threading.Thread.CurrentThread.Priority=Threading.ThreadPriority.BelowNormal
  3. Rather than statusbar1.Show("OK") which shouldn't even compile as show simply displays the control and doesn't accept arguments try StatusBar1.Text = "OK". This should work as long as ShowPanels is set to false. If you are displaying panels then you would have to set the text via the panels collection. edit: another typo
  4. would a confirm box (yes / no) be any use here? http://www.w3schools.com/js/tryit.asp?filename=tryjs_confirm
  5. Are you using Private f As New frmAdmin from within frmAdmin? If so it will keep creating a new instance every time it creates a new instance (recursion is a nasty thing at times).
  6. Is there any code if the event handler for the yes button? edit: really bad typo
  7. Lateral thinking!! Should be in every developers toolbox.
  8. 'getting rid of the win32 AIPs' (APIs) would not just invalidate vb6 programs but nearly every program written for windows (.Net / Java would be unaffected as long as they didn't make API calls) - this is not going to happen in the near future. However the APIs are being depreciated in favour of .Net as a more consistant development framework for most applications.
  9. not sure if it's the easiest but Dim c As Char = "A"c Dim b() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(c) MessageBox.Show(b(0).tostring)
  10. What kind of sensitive information are you storing? Could you not encrypt the values and just store them in a binary file?
  11. sorry you use the range object not the cell but something similar to Range("a1").NumberFormat = "£#,##0.00" should work.
  12. After you have done the .DataBind try DropDownList1.Items.FindByText("Turnip").Selected = True
  13. Doesn't the cell have a .Format property?
  14. PlausiblyDamp

    xml

    ASP.net applications run under the local account ASPNET, this account would need to have permissions to the share. You may want to investigate impersonation - this would allow you to run web apps as if they were a different user.
  15. If you have a look on http://www.gotdotnet.com there is a VB.Net addin which allows you to use a similar syntax in VB. Can't remember the url at the moment but a search for VBCommenter.exe should get some results.
  16. Finalize will be called sooner or later - however garbage collection is lazy by design. If you want more control search in MSDN for info on IDisposable.
  17. As the messge says if you want to develop and test locally yes. If you are developing on a remote machine that meets these requirements then no.
  18. I'd go for an array of bitmaps - that way the sprite class itself can handle things like timings, sequences etc internally without the client application having to understand the internal workings of the sprite. The sprite can then be given methods like RotateClockwise, RotateAnticlockwise, DisplayExplosion etc.
  19. You could implement a reference counting scheme in the class itself. Add a shared (vb) or static (C#) variable to the class and in the constructor (Sub New) increment it and in the Desctructor (Finalize method) decrement it. The shared variable will then be the number of objects created that haven't yet been garbage collected.
  20. response.redirect requires the full url if redirecting to another site. e.g. response.redirect("welcome.aspx") redirects to the relative path response.redirect("http://www.b3ta.com") redirects to the absolute url.
  21. myVector += 10 is just shorthand for myVector=myVector + 10 and as such the operator+ should be doing the adition and returning a new instance of the Vector class. Overloaded operators need to be declared static anyway so they couldn't change any instance variables and IIRC they do not allow parameters to be declared ref.
  22. If you want to edit the original then operator overloading wouldn't make much sense syntax wise... e.g int i,j; i=0; j=i+4; j would equal the value of i with 4 added to it - it would not affect the value of i itself however. If i've missed the point (quite possible - been awake too long today) could you give a code (or pseudo code) example of what you are trying to do / would like to do ?
  23. If you read down the article it mentions the outputcache directive
  24. MD5 isn't an encryption algorithm it's a hash - designed to be one way. Not being able to decrypt them is more secure anyway. Is there any reason why comparing hashes is a problem?
  25. Should be able to do it - just override the sub new for each of them
×
×
  • Create New...