Jump to content
Xtreme .Net Talk

basdewaard

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by basdewaard

  1. I'd say that's the way to go. Thanks again for your help (and tips). Bas
  2. Ah of course! I hadn't thought about the fact that it's a reference to the same area of memory. [discussion mode: ON] Since an area of memory is reserved for l2 (from the 'new' instantiation), is it possible to copy that area of memory from l1 into l2's area of memory and then set l2's properties (such as ID) such that l2 is still unique? What I'm trying to achieve is to be able to copy a whole heap of properties from one label and replicate those properties for multiple labels (but in the most efficient way possible). Rather than setting each new label's properties individually? Thanks for your reply, Bas
  3. Hi This really has me stumped! I'm dynamically adding two labels to my page (or form). I set the properties for the first label and then copy the properties of the frist label to the second by setting the first equal to the second. I don't get the expected results though! dim l1 as new label dim l2 as new label l1.text = "Test1" l2 = l1 me.controls.add(l1) me.controls.add(l2) Why doesn't l2's text property equal that of l1? I thought I had a better understanding of OOP than this! :confused: Bas
  4. Hi all I've created a simple crosstab and graph using Crystal Reports, saved the rpt file and am using ASP.NET to bring up the report in a web page with the CrystalReportViewer object. I'm confused as to why the graph shows and the crosstab table doesn't (whereas in Crystal Reports preview it does). Does anyone have any ideas?
  5. Thanks very much!
  6. Does anyone know how to insert a chart into a webform? I can't seem to find any components that will support it! Thanks
  7. OK. Thanks Joe Mamma! That helps.
  8. We've got a database with a set structure that we're accessing using a datagrid. The problem seems that the datagrid is set to read the columns of the database and display them in the datagrid as they are. We would like to be able to 'transpose' a column from the database into a row on the datagrid. Our solution has been to use a table instead, creating datarowviews from the dataview and populating the table rows that way.
  9. Hi all We have a bit of an odd thing going here with Web forms in our project. We copied one of the forms in the solution explorer and pasted it again in the same location in order to create a copy. We renamed the new form, edited the name of the class and set the new form as the startup. When we run the code, the new form loads but all the objects (buttons for example) execute as if on the other form! Has anyone come accross this before and if so, is there anything we should watch out for? Thanks for your help, BOZ
  10. Is there an easy way to swap info displayed in a datagrid column so that it is displayed in a row instead? I envisage some sort of 'swap columns with rows' property. BOZ
  11. kejpa This is from .NET documentation (for C#). Hope it helps a bit. // The following example calculates the size of a directory // and its subdirectories, if any, and displays the total size // in bytes. using System; using System.IO; public class ShowDirSize { public static long DirSize(DirectoryInfo d) { long Size = 0; // Add file sizes. FileInfo[] fis = d.GetFiles(); foreach (FileInfo fi in fis) { Size += fi.Length; } // Add subdirectory sizes. DirectoryInfo[] dis = d.GetDirectories(); foreach (DirectoryInfo di in dis) { Size += DirSize(di); } return(Size); } public static void Main(string[] args) { if (args.Length != 1) { Console.WriteLine("You must provide a directory argument at the command line."); } else { DirectoryInfo d = new DirectoryInfo(args[0]); Console.WriteLine("The size of {0} and its subdirectories is {1} bytes.", d, DirSize(d)); } } } BOZ
  12. When I right-click on an Word doc file and select properties, I am presented with three tabs; general, custom and summary. I can easily change the file properties (attributes) under the general tab (such as the 'hidden' property) but can't seem to access the properties under the summary tab (such as Title and Subject). Can anyone help?
  13. Thanks for the reply, divil. That's OK. I'll try again with what you've suggested.
  14. Thanks for the link, divil, however I am not finding it easy to get going. After reading readme files I opened the .sln (assuming running the project would link with the existing Console). The ConsoleExTest works (which was initially set as the Startup Project). I then tried to get ConsoleEx going but get an error along the lines of "A project with an Output Type of Class Library cannot be started directly". The message contained more information/suggestions which I tried w/o any luck. I also tried to add (relevant) classes to my project but struggled. Could you perhaps give me a rough idea of how I should go about tackling this?
  15. I'm struggling with something that I thought would have been relatively simple. I'd like the user to enter a character into the console and have the console read it w/o the user having to press <enter>. ie: as soon as the user types a character, have the console read it. I thought the following would help but it hasn't: //read the input... do { ch = (char) Console.Read(); //get the char } while(ch == '\n' || ch == '\r');
  16. I'm having an issue with XP whereby everytime I log in, the Numlock isn't set. By creating a small app that would run on startup, I thought I could get around the problem. I used 'SendKeys' but wasn't too successful because I think that something must have the focus for this to work??? Does anyone have any suggestions - even if it means putting together a simple batch file or something (or is there a Windows setting?). Cheers and I hope you're all enjoying the festive season.
×
×
  • Create New...