Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. SELECT LastName + ', ' + FirstName as FullName FROM
  2. What is the default namespace for your application (you can check by bringing up the project properties). You need to change 'EmbeddedResources' to the applications default namespace for it to work. If that doesn't fix it reply and I'll look into it a bit more....
  3. Guids are also larger than a simple integer when used as a unique identifier, also the code above uses SELECT @@IDENTITY were @@IDENTITY is really a varaible so no extra physical DB access is required to retreive the value. Actually using a guid you would have to insert the record, get a default constraint generate the guid and then select it anyway if you needed it....
  4. @@IDENTITY returns the last auto numbered value inserted into a table on the current connection - it is not affected by other connections accessing the same table
  5. http://www.xtremedotnettalk.com/showthread.php?t=77706
  6. Afraid not - for some reason they don't seem to like multi line comments in VB. As far as I'm aware this isn't likely to change in the next version either....
  7. if class2 inherits class1 and class1 inherits class3 then yes - class2 implicitly inherits class3. That is what inheritance is all about. I think Robby was suggesting you look at your object model again (i.e. what classes contain what functionality and where is it needed). If the class contains some code you need to inherit from move that into a separate class and inherit that. i.e. If class1 contains some stuff you need to inherit move those things into a separate class (class4 for example). Now make your existing class1 inherit from class4 and make your other class (class2 or class3 - not sure which in your case) also inherit from class4. Also I hope the class names are just here as an example and not the real names you are using :-\
  8. http://www.dotnetextreme.com/articles/ccwrcw.asp http://www.codeproject.com/dotnet/nettocom.asp
  9. ' Allows the creation of a sprite given a Bitmap object and a ' number of frames. The bitmap is assumed to be divided up into ' (frames) evenly- sized sections horizontally, with each ' section consituting a single frame of the animation. Public Sub New(ByVal device As Device, ByVal image As String, ByVal frames As Integer) Me.New(device, new Bitmap(image), frames) End Sub or similar
  10. If found this book to be a pretty good read. It's the one that accompanies the Sharp Development open source IDE. I found it useful to see examples of design patterns explained in the context of an actual application rather than is purely abstract terms - it also discusses the 'why we did this not this' aspects as well which is something I've found a lot of books do not cover. Also as a quick overview of the more common design patters you may want to wander over here.
  11. This will be fixed as soon as possible, VolteFace is currently working on a temporary fix before the full [code=visualbasic] tag system is ported over to the new forums (should be quicker as well as VolteFace has taken the time to re-write the code)
  12. http://www.xtremedotnettalk.com/showthread.php?s=&threadid=82112&highlight=decompile http://www.xtremedotnettalk.com/showthread.php?s=&threadid=77883&highlight=decompile http://www.xtremedotnettalk.com/showthread.php?s=&threadid=75908&highlight=decompile
  13. .Net supports a more scalable session architecture - it allows session variables to be stored in either a state server or a Sql server. This does allow it to be used in a web farm. http://support.microsoft.com/default.aspx?scid=kb;en-us;311209
  14. How are you starting up the application? Where does the code get called from (Sub Main, Form_Load etc)
  15. Probably not worth the tradeof, a normal int (Int32) is CLS compliant and only a couple of bytes more. Unless you are allocating large amounts of them at once I wouldn't bother personally.
  16. MessageBox.Show(UInt32.MaxValue.ToString()); MessageBox.Show(UInt32.MinValue.ToString()); gives 4294967295 and 0 respectively.
  17. How are you calling the above code then?
  18. do you mean something like this? If not can you give a few more details?
  19. Marshal.SizeOf is probably what you need.
  20. You could use the environment class to find the version - may be a bit easier (XP is version 5.1) If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor = 1 Then 'we are XP End If
  21. Is the file in use ? :D Are these files you are creating within your application? If so are you closing all the streams / streamreaders down after you have finished with them - if not these will keep the files open. If they are not files used by your app then what files are they - another app could have them locked.
  22. As similar things have been asked before I've just thrown together a quick sample and posted in the code library. http://www.xtremedotnettalk.com/showthread.php?s=&threadid=83574
  23. Quick sample that uses an embedded textfile and an embedded gif file. A seperate version is included for both VB and C# as they handle resources contained in sub folders differently. In both cases make sure that when the resources are selected in the Solution Explorer that the 'Build Action' in the Properties window is set to 'Embedded Resource' (should be for the attached projects - but is not the default for new projects) EmbeddedResourcesVB.zip EmbeddedResourcesCSharp.zip
  24. Open them to edit or display? If you just want to display them you could either use the process class to launch the .pdf and if acrobat is installed it will open in that, or add the acrobat viewer to the toolbar and display them that way.
×
×
  • Create New...