Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. The filter is only used to restrict the files displayed in the dialog box - not to alter the final name entered by the user. The DefaultExt property is only applied to the file name if the user provides a filename without specifying an extension as documented in MSDN.
  2. If you made your original question clearer then you may have got the answer you were after, saying that DiverDan's suggestion of just using the Dialog's .FileName property should also include the extension.
  3. Did he give any timings for how long they took to timeout? What are the settings in web.config regarding sessions? Is he manually clearing the session anywhere in code? We really need a bit more information to identify the problem.
  4. Do any of these applications have anything in common (same 3rd party components etc - are you using the Zip component in any of the others for example)?
  5. What kind of phone are we talking about? Is this a standard phone that could be wired through a modem attached to the PC or a USB phone?
  6. Does this exception get thrown everytime you close the form? If so does a particular line generate the error? Is there any information to indicate which component raised this exception?
  7. Didn't get time to have a proper look unfortunately, however I noticed that in the routine Public Shared Sub ExtractAll(ByVal lstFiles As ListView, ByVal ExtractPath As String) Dim lvi As ListViewItem Dim ze As C1.C1Zip.C1ZipEntry For Each lvi In lstFiles.Items ze = lvi.Tag Zip.Entries.Extract(lvi.Index, ExtractPath) 'Declarations.Zip.Entries.Extract(lvi.Index, txtPath.Text) Next End Sub you are extracting just to a path and IIRC you need to specify a full path and filename to extract to. Also check you are using the correct listviewitem to generate the file name. Also you are using an awful lot of legacy VB6 syntax - you may want to consider converting to the newer .Net syntax.
  8. in the line RRSS.Open("select inventory_category from inventorycategory where function_id = '" + a + "' and devicecategory = '" + b + "'", CNN, 1, 2) you are trying to add a string to the variable a - presumably a is a double, you should use & to concatenate and also convert the double to a string before concatenating. try something like RRSS.Open("select inventory_category from inventorycategory where function_id = '" & a.ToString() & "' and devicecategory = '" & b.ToString() & "'", CNN, 1, 2) above code assumes b is also a numeric type.
  9. Have you looked here for a sample in how to dynamically load classes via a standard interface?
  10. Does the remote computer (the one hosting the ASP.Net app) have the framework installed?
  11. Is the ZipFile part of the VB Resource Kit? If so I can download it and have a look tomorrow.
  12. http://www.xtremedotnettalk.com/showthread.php?t=83882&highlight=delete+picturebox may be worth a look, also try to avoid calling GC.Collect() if at all possible - it can adversely affect performance.
  13. What is Folderb? If that is the FolderBrowseDialog why are you declaring another variable of the same type called fbd? The reason you are getting the crash is that you are never instantiating fbd but are trying to access it. You probably need code more like Me.Folderb.ShowDialog() savelocation.Text = Folderb.SelectedPath
  14. Are you getting these errors on all attempts to open a file (I can't test it here as I don't have the component 1 dlls installed for the C1ZipFile stuff). What OS are you running on?
  15. Both AndAlso and OrElse (that sounds weird read out loud) give a performance benefit by only evaluating the minimum number of arguments. e.g. given the following 2 simple functions Private Function Test1() As Boolean MessageBox.Show("Test1") Return False End Function Private Function Test2() As Boolean MessageBox.Show("Test2") Return True End Function if called from an if statement like If Test1() And Test2() Then MessageBox.Show("Both true") End If you should get both the messageboxs from Test1 and Test2 displayed - despite the fact that because Test1 returns false the overall result can never be true. Changing the if statement to If Test1() AndAlso Test2() Then MessageBox.Show("Both true") End If you only get the first messagebox as it realises the result will always be false so there is no reason to even evalute the second condition. However if Test2 performed some required functionality then that would also be skipped - this is the only time you would need to avoid AndAlso; however I would personally class that as a bad coding style anyway - relying on side-effects like that to get required code to execute is hard to debug / maintain and gives no real benefit.
  16. And above shows you how to encrypt and decrypt a file...
  17. Under IIS the virtual folder needs to allow anonymous access.
  18. In the frmMain.vb you have the line Friend WithEvents Zip As C1.C1Zip.C1ZipFile but you do not initialise it anywhere - this will effectively shadow the other declaration of Zip. If you comment out the above line does it make a difference?
  19. If you cast the class to the interface you should be able to access .Value
  20. I'm not aware of any tutorials on creating a browser there are a few open source ones out there - Mozilla or Amaya are two that spring to mind. However these are written in C/C++ rather than .Net. Creating a browser from scratch is not a trivial task though, as well as simple HTML parsing and rendering you will also need to conform to several RFC, implement client side scripting, support several 'flavours' of HTML and DHTML, deal with image display (in several formats), possibly Java / Flash (or a general plugin format) support and CSS handling. This is not an exhaustive list but just the features that are expected of a modern browser. Is there a particular reason you need to create a web browser or is this more of a learning exercise? If a learning exercise then you could probably trim the feature set back a bit to simplify the learning experience.
  21. A good technique is to use both. Inheritance is a good tool when you not only have similar functional requirements but also code reuse within the class hierarchy. Interfaces on the other hand give no code reuse within the classes that implement them but do allow those classes to expose the same functions and be used interchangably in functions that expect the interface to be present. If you create the initial interface you can then create an abstract class that implements this interface. Any class that then inherits from this interface will also implement the interface as well. This gives you the flexibility to use functionality in the base class where appropriate but also be able to implement the interface directly when required.
  22. A session will be shared over all pages - this is by design. If you need to maintain seperate state information per page you may want to go with your idea of query strings;
  23. Any chance you could attach the project (minus binaries please) as I can't see anything wrong in those snippets.
  24. You are not declaring the variable Zip anywhere else are you?
  25. You shouldn't be updating the UI elements from multiple threads, all UI modifications should be done from the application's main thread. http://www.xtremedotnettalk.com/showthread.php?t=87035&highlight=invoke http://www.xtremedotnettalk.com/showthread.php?t=87775&highlight=invoke
×
×
  • Create New...