Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Are you calling it twice? Seems an unusual side effect. Any chance you could post the relevant code (base class , sub class and calling code for example)?
  2. The count property will still change but as it's decreasing it will always be higher than your current position in the array.
  3. Before the end of Sub Main you need to do something like application.Run(objMainMenu)
  4. Not tried this but possibly you could pad the string out to the required size and then use it's bytes as the key. Also do you mean to use thestring.length as a parameter to GetBytes - wouldn't thestring be a better choice of parameter. At the top of the file if you add the line option explicit does it generate any errors? If so they probably need fixing first. Also you may want to try modifying the start of your routine to something like Dim MyByte(15) As Byte thestring = thestring.PadRight(64) MyByte = System.Text.Encoding.ASCII.GetBytes(thestring) but like I said above I haven't had the chance to test this and see if it works...
  5. You may want to look here contains a nice tutorial on passing information between forms.
  6. firstly change the line Console.WriteLine(((jrn.IjrnPlug)objPlug).Name()); to Console.WriteLine(((jrn.IjrnPlug)objPlug).Name); Also change your implementation of ExamineAssembly to public static void ExamineAssembly(Assembly dll, string thisInterface, ArrayList plugs) { Type objInterface=null; availablePlug plug; //loop through each type in dll foreach(Type objType in dll.GetTypes()) { //only check public types if(objType.IsPublic) { //ignore base classes and interfaces if(!(objType.IsAbstract)) { objInterface = objType.GetInterface(thisInterface,true); //see if this interface implements our interface if (thisInterface != null) { plug = new availablePlug(); plug.assemblyPath = dll.Location; plug.className = objType.FullName; plugs.Add(plug); }//if }//if }//if }//foreach }//void you had a misplaced opening brace after the check for abstract type.
  7. How about if you didn't catch Exception but only selected sub-classes of Exception (i.e. DivideByZeroException) - as the error wasn't caught here the code after the finally block wouldn't execute but the finally block would still execute.
  8. Network how - you really need to be more specific about your needs. If you have a question in a particular area or a particular problem then please ask - but do give enough information for people to be able to answer.
  9. You need to change the property set to use the value being assigned... Property Mandatory() As Boolean Get Mandatory = _mandatory End Get Set(ByVal Value As Boolean) _mandatory = Value End Set End Property
  10. May as well attach the project if it's not too big, just remove the binaries (executables etc) first ;)
  11. Any chance you could post more of your code? Especially the form_load from both of the forms - there is always a chance something is going wrong as part of the form creation....
  12. Hardly a BIG BUG though is it? All you need to do is type the 'end property' bit yourself and things work as normal. A bit of an annoyance admittedly....
  13. I don't think you will be able to work round this by assigning permissions to the DLL - you will have to make each user who needs the functionality of this DLL a local administrator! Fairly terrible practice in my opinion - can't see why a dll would need to modify / access these keys at runtime.
  14. Does your object (objPlug) implement the IjrnPlug interface?
  15. If you are using the .ExecuteReader method then you need to open the connection first, however in this case you can remove the line SalesOrderdat.SelectCommand.ExecuteReader() and it should work
  16. http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=75122f62-5459-4364-b9ba-7b5e6a4754fe VS.Net addin that communicates with the above wiki
  17. The links to MS listed all the prerequisites - most of them can be downloaded and shipped as part of your distribution CD. There is a VS.Net addin that can incorporate the .Net framework into your deployment package but IIRC the users would still need the other components first. Also MS provide a sample of how to include the framework as part of your deployment here If you are using a tool such as Install Shield then you should be able to also include the other components...
  18. Was bored so thought I'd try knocking up a simple example - then got carried away :) anyway have a look here for a simple client / server file transfer application. code is fairly commented and you should be able to cut and paste the relevant bits. On the sending side all the code is behind the start button anyway. On the server side you can probably nick the Download class and the listener class and most of the code behind the listen button as well.
  19. A simple example of how you can use classes under System.IO, System.Net and System.Threading to implement a client server file transfer application. The server will allow you to configure the port it listens on and where received files are saved. It listens for incomming connections on a dedicated thread and will spawn 1 thread per incomming request. The client allows you to specify the servers IP and port and also select the file to transfer. Probably needs a lot more testing than it's received but can happily transfer 3 80M+ mpegs at the same time. Thank's also go to dynamic_sysop as I've stolen code from his sample found here Simple File Transfer.zip
  20. Public Sub MyFunction(ByVal Procdurename As String, ByVal ParamArray params() As String) Dim s As String For Each s In params Next End Sub
  21. Did you get a particular error when trying that? The code looks okay....
  22. http://www.xtremedotnettalk.com/showthread.php?t=85178
  23. Firstly when you say it doesn't work what exactly isn't working - the more informnation you can give then people are more likely to be able to resolve the issue and respond. in the bit of code Dim mNameArray As String 'read into an string Dim x As String x = sr.Read() mNameArray = x sr.Close() what are you trying to do anyway? sr.Read only reads the next character from the stream - not the entire file, you should use sr.ReadToEnd if that is what you are trying to do. If you are trying to send an image (I'm guessing on this one but I can't see any reason why you would copy a gif to a file with a .txt extension - it would still be a gif and not contain any text) then you really shouldn't be using StreamReader as this inherits from TextReader and is designed to read text files. you may be better of either using a BinaryReader of possibly just using a stream directly and reading the image into a Byte array and sending that. You should have a look in either MSDN or the framework SDK - they both contain samples on reading and writing files as well as samples on using network streams.
  24. DataList and DataGrid are part of ASP.Net - is that not built-in enough for you?
  25. Any chance you could post a bit of your code to give us some idea of how you are attempting this? Are you creating and opening a connection on every page? Are you refreshing the dataset on page_loads or storing it in a session variable between page refreshes? the following may be worth a look as well http://www.xtremedotnettalk.com/showthread.php?t=75209 http://www.xtremedotnettalk.com/showthread.php?t=75076
×
×
  • Create New...