PlausiblyDamp
Administrators-
Posts
7016 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by PlausiblyDamp
-
Threads get a certain amount of time allocated to them in which they can run. This scheduling is controlled by the OS itself and it has it's own methods of prioritising and allocation resources to threads. IIRC there is no way to be sure of the order threads will run / access resources. Depending on exactly what your application is doing there may be an alternate method; have you looked at using a callback / async method to notify the calling method when the thread has completed. Possible even implementing your own queue and processing that in order.
-
If the controls are part of the same project then they should also be compiled into the one Dll. One way to check is to use ildasm.exe (installed along with vs.net etc) and use it to view the web site dll and see if the control classes are defined inside the dll. Have you tried putting the web controls into their own project and adding that project to the solution? that way everything should get rebuilt automatically when you fire up the debugger and it should allow you to set breakpoints within the code as well.
-
Just to clarify - are you using 'Web User Controls' (the ones with an .ascx extension)? If so these are compiled into the web application's dll not a separate dll. Therefore the fact you only have a single DLL is correct. However if you are refering to a 'Web Control Library' then the controls will compile into a dll then can be added to the toolbar and would appear in the references section of solution explorer. In which case you expect more than a single dll in the folder. It might help if you gave a bit more detail about how the folders are structured and which are defined as applications / what permissions are set on each. Also if you have multiple web.config files then these could also affect the ability to correctly debug the site.
-
http://www.xtremedotnettalk.com/showthread.php?t=92354 appears to cover a similar situation with using structures. http://objectsharp.com/Blogs/bruce/archive/2004/08/04/796.aspx discusses what is going on behind the scenes a bit and why this happens.
-
Public Class Class2 Private _Prop2 As New Class1 '******* Public Property PropClass2() As Class1 Get Return _Prop2 End Get Set(ByVal Value As Class1) _Prop2 = Value End Set End Property End Class
-
Are you wanting to access an instance of class2 or just the class itself? i.e. as it stands Dim aClass As New Class2 aClass.PropClass2.PropClass1 = "I changed the Property of the PropClass1 of the _Prop2 Object in Class 2, Yeah" will work. If you really want to go through the class name then you will need to declare both the property and _Prop 2 as being shared (I doubt that is what you want from you code though). s
-
I notice you are not creating a valid instance of Class1 within Class2 - try making the following change to your code and see if that fixes the problem Public Class Class2 Private _Prop2 As New Class1 '******* Public Property PropClass2() Get Return _Prop2 End Get Set(ByVal Value) _Prop2 = Value End Set End Property End Class
-
System.IO - directory location by variable
PlausiblyDamp replied to carbcycle's topic in Directory / File IO / Registry
pdfloc is declared within the StartForm class and is therefore not available from the DeleteTest class, you could either make the variable public (a bad idea), or create a read only property that returns the value of pdfloc. Also is there a particular reason the sub is called Main? That is normally reserved for the applications entry point. You may want to create a parameter in the Main method though and pass pdfloc that way. -
Within the KeyPress event you can check the value of e.KeyChar to see which key was pressed.
-
If you are using C# you also need to make sure you are adding the event handler to the event - if you are doing this through the designer then it should do it for you. If not either in the Form_Load event or the constructor you would need to add the line this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.MainForm_KeyPress); if you have done this from the designer (and it looks like it from the naming convention) you need to make sure the form is receiving the keypress events. If you have any controls on the form then the active control will recieve the keypress rather than the form itself, you need to set the KeyPreview property of the form to true and things should work.
-
System.IO - directory location by variable
PlausiblyDamp replied to carbcycle's topic in Directory / File IO / Registry
Could you post more of your code? Cannot really tell where the problem lies from just one line. Where is the above code being executed from and where is pdfloc defined? -
Easiest is to use the System.IO namespace If System.IO.Directory.GetDirectories("c:\\test").Length > 0 Then 'has sub folders End If as to if it performs the quickest then you could probably get an increase in speed by going to the windows API - just how much a performance difference remains to be seen though.
-
System.IO - directory location by variable
PlausiblyDamp replied to carbcycle's topic in Directory / File IO / Registry
Dim fi As New FileInfo(pdfloc & "temp.txt") -
IIRC System.Net.Mail only exists in version 2.0 of the framework. In either case you would need to add a reference to the relevant assembly (e.g. System.web.dll)
-
At the top of your source file add the line Imports System.Text.RegularExpressions and things should be okay.
-
http://www.fawcette.com/vsm/2002_09/magazine/columns/desktopdeveloper/ might be worth a read (requires registration but it's free). Covers creating a web page that will allow a Windows based .Net app to be launched from a URL with the relevant assemblies stored on the server.
-
Opening form as MDI child with a button click from another form
PlausiblyDamp replied to ArchAngel's topic in Windows Forms
Do you already have an instance of frmMainMdi open? If so you need to set the MdiParent to be the existing instance, in the code above you are creating a new instance and using that as the MDI parent. -
Some people seem to hold their choice of language in almost religious like regard, if you do no use their favourite then you are wrong / stupid / smell funny or whatever other argument comes to mind. Each language / toolset has it's uses - I wouldn't consider a device driver a project to attempt in VB (or any other .Net or VM based language) it would require ASM / C / C++ to really be effective. Similarly most business orientated applications do not need the speed (real or assumed) of C / C++ but will benefit from the RAD featurers of .Net / Java etc. C syntax may be simple, pointers and pointer arithmetic on the other hand is not, the fact you require it for something as simple as string manipulation sways me from using either C or C++ unless there is no other option (I'm too lazy is my problem). The trick is to use whatever gets the job done best, being willing to change and learn new languages just adds more capabilities to your own skillset. Remeber the old adage - if you only have a hammer then all problems are nails. If you only know one language you have to solve all problems with that on language. If you want to find a few more choice quotes on language zealotry search these forums for 'Delphi'...
-
What type is the variable objTo declared as? Just out of curiosity wher ewould it be getting a value assigned to it? Just not clear from the code posted what the benefit of the conversion would acheive.
-
Is there any reason why you couldn't have a single login page for all users / admins / superadmins? To give each category of user their own login page seems a strange way of approaching the problem.
-
You may find the location element useful. It will allow you to specifiy security in your main web.config but on a page or sub folder basis. eg
-
Do you have a sample of what the values and their 4 byte representaion would be? Or would a .Net single or double be suitable anyway?
-
Personally I tend to avoid the VB6 way of doing things in .Net as I use both C# and VB (I equally try to avoid things that are C# specific) and having to remember two ways of doing something rather than one just leads to confusion (or stupid mistakes anyway). Saying that several of the functions in the Microsoft.VisualBasic namespace do additional safety checks that you would be required to perform yourself if going the 'pure' .Net route. The Microsoft.VisualBasic.Compatibility namespace on the other hand is a horrible idea for anything other than code migrated with the wizard (which is an even worse idea anyway). Things like the Drive / Folder list controls, the various Control Array collections, twip conversion routines, wrappers around non zero based arrays etc are awful things to work with. I also have to agree with Orbity on code when both ways are used without any clear reason.
-
You may want to look at defining a delegate (and possibly related interfaces / classes) which the control itself calls to do the validation. The application that uses your control would then have to provide a valid implementation for the actual validation logic. Is this for a web or windows app? If web you may want to look at the Paterns and Practices bit of MS's site - either the security application block or even the Enterprise Library for a more fully fledged solution.
-
Setting file summary properties
PlausiblyDamp replied to mjcatt's topic in Directory / File IO / Registry
Glad something I said in this thread was of use ;)