Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Easiest way is probably to use the Path class.
  2. Out of interest what version of Exchange are you using?
  3. Depending on what you need to do you can do either Session.Clear or Session.Remove all to erase the Session contents but not expire the session or alternatively Session.Abandon will expire the session immediately.
  4. Do you have code in the listboxes SelectedItemChanged event that needs to be executed when the selection changes? If so either call the event manually on the page load or don't set any item to be the default and require the user to make a choice.
  5. If you are running your app can you manually delete the file via explorer? You may want to put a breakpoint on the System.IO.File.Delete(strFileName) line and when it is reached just fire up explorer and try to delete the file - if you still can't then the error is elsewhere (are you opening this file anywhere else in code?) or somebody is using the file.
  6. Under .Net you can build resources into what are known as satelite assembles that can be dynamically loaded by the application. A simple design time containing something like error messages would be called Errors.resx If you needed to support French clients you would create a version called Errors.fr.resx which would contain the French culture neutral version of the strings, for each culture you would then create another version: Errors.fr-FR.resx Errors.fr-CA.resx etc. Each of these contain values for the specific culture. At runtime it will check the most specific resource (e.g. fr-CA if you are in Canada) for the resource item, if it isn't there it falls back to the next level (fr) and finally the resources compiled into the executable if needed. As well as simple strings there is also a tool called WinRes.exe that can be used to modify form layouts as well as just the text - the translators would require the Framework SDK but nothing else to make UI changes. This MSDN Link has a brief overview of the tools required and this article covers the issues in a lot more depth.
  7. What dll are you importing? Did this stop working once you added the import or did you add the import and also modify any code?
  8. Can't see anything that would cause the dispose method to be called in there, could you post the clsWin code as well.
  9. You are opening the file for write access and then attempting to delete it - your code itself is locking the file. If you want to delete the file you do not need to open it.
  10. What event is this code in? If you are doing this in a Page_Load event you will want to check if the page is being generated as part of a post back (Page.IsPostBack) and only build the first listbox on the initial page load. Also you may find moving from ADO to ADO.Net and using the ASP.Net controls data binding facilities could make this a lot easier (either from a dataset or possibly a data reader).
  11. Are you adding your own configuration section? If so that is probably the problem - the default web.config already has a configuration section and you may be trying to nest yours inside the existing one.
  12. Any chance you could post your existing code (or at least the bits you are having problems with). Also when you say it calls the object's destructor when you put them into a collection; could you post the collection class / object code as that sounds very unusual behavior.
  13. If you are doing this via a browser then probably the easiest way is to use a file input control on your page, if you look under the HTML section of the toolbox you should find it (I can't remember it's exact name at the moment)
  14. The component might be changing the form's SmoothingMode or similar in it's paint event. You are probably best contacting the control's developer to see if this is a known issue.
  15. How big is the panel? Is the control you are adding visible within the panel? If it is fully visible then you won't need to scroll to see it; try positioning the label outside of the visible portion of the panel.
  16. It looks as though when you are minimizing the form it is no longer the active form - hence the Nullreference exception. Rather than rely on the active form could you not create a variable to store a reference to the form and use that to redisplay the form?
  17. Depends on which of the timer classes you have used http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemtimerstimermemberstopic.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformstimermemberstopic.asp
  18. you need to set form2's mdi parent property to be the instance of form1 dim f as new Form2 f.MDIParent = me f.show()
  19. Does it give any errors when it fails to open the DB? Any chance you could post the relevant code section?
  20. Could you post the code you are using? You should be able to redisplay the form either by doing .Show or by setting .WindowState= FormWindowState.Normal
  21. IIRC there is no simple way to change how the input box works, you will probably find it easier to create your own form for requesting the information and provide a textbox on that form that uses the password characters.
  22. GUIDs are guarenteed unique across systems so if you are likely to be replicating data around then these are one way of preventing clashes. This uniqueness will also come in handy if you ever have to import data or consolodate from multiple sources. Downsides are they are slightly slower (but then just about everything is slower than an int anyway) and take up slightly more storage space. The other main downside is there is no easy way to retrieve a newely generated guid for a table entry (i.e. no straight match for the @@IDENTITY function), however if you are doing all updates via stored procs (you should) then it is an easy matter to generate the GUID, insert it and then report it back via an OUTPUT parameter or similar. All in all if the system is already working I would be reluctant to switch from GUIDs to integers as there really aren't any benefits to be gained that would justify the hassle of the conversion.
  23. Do you have any more details on the type of 'encoding' required?
  24. Are you using any of the async methods (BeginXXXXX, EndXXXXX) in your code? If so they will be creating and using threads behind the scenes.
  25. Can you run regedit on the local machine and edit a remote registry though? Also can you browse to the remote machine through the network and access it's shares?
×
×
  • Create New...