Jump to content
Xtreme .Net Talk

Cags

Avatar/Signature
  • Posts

    699
  • Joined

  • Last visited

Everything posted by Cags

  1. I use an actually Pocket PC for testing rather than the Emulator so I'm not entirely sure (as I can copy files over via ActiveSync) how well this will work but try giving this a go.
  2. You can get the Application startup path with the following code. string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);Working with files in general is achieved in the same way on the Compact Framework as it is in normal .Net application. The System.IO namespace contains most of the objects needed. I'm not sure if that answers your question or not.
  3. I could be wrong, but I'm pretty sure Visual Studio is built with well Visual Studio, lol. More accurately I think it was designed at least partially with the .Net Framework. I know it sounds an odd concept, but I'm sure I read it somewhere.
  4. I'm personally of the opinion that you would be the same person as I don't believe in a mystical object such as the soul. In my opinion every part of you has a physical presence. With this being said anything you could constitute as a soul would be re-produce along with everything else. Nerseus brings up several good points. Both the entity 'destroyed' and the entity 'created' would have to be identical right down to the sub-atomic level and probably further than we know exists with the current state of physics. The actual breaking down of the material and 'moving' it across space seems unlikely, more likely is the reconstruction from particles of the same type. As Nerseus said, this would essentially lead to a clone, but in my opinion the clone would be identical to the original person. Incidently if this is the case and the process involves copying rather than moving, making clones would be easy as there would like be no reason to take the person to bits in the first place. This actually reminds me of star-trek where they end up with 2 will rikers (sad I know). Unless I'm mistaken, I'm pretty sure scientist have actually succeded in teleporting a single particle from one point to another. I don't remember the details, I just vaguely remember reading about it.
  5. The reason I asked what order the test were performed was incase the files had been cached in a page file and as such the hdd was able to access them quicker.
  6. I'm not at all happy with my ability to articulate myself and as such feel I probably look quite stupid in parts of this thread, but at the time my assumptions seemed perfectly logical. I do however think that I now understand how it all works. Thankyou for your patience.
  7. Try using the Value property of the DateTimePicker, not the Text property.
  8. On a button click you just have' where DateTime.Now is the time you wish to add AddDate(DateTime.Now)
  9. That sounds like a good idea, all it really needs to be is an explanation of converting the standard declarations, loops and conditional statements. Anything more complex can be added as and when thought of.
  10. I figured out the sample project is for the .Net Compact Framework which is why the behaviour is different. Obviously the CF cannot use components in the same manner so the VS alters behaviour accordingly. If at all possible I'd like to make my Visual Studio act the same for my full framework applications, is there an option for this? BTW. Occured to me I should have mentioned I'm using VS 2003.
  11. Whenever I make a class that inherits from Control it changes the icon of the file in the Solution Explorer to that of a component. But a sample application I downloaded from CodeProject is inherited from Control without the icon changing. At times I'm abit of an 'obsessive compulsive' so the icon being different does bug me. It is the fact that its behavior is then differnt tha really bugs me though. Double clicking on the item brings up the design window which I don't want. Can anybody explain a.) how I stop this behavior and b.) why the class from the sample project doesn't do it.
  12. You can change it by running the netsh.exe from you application, but I'm not convinced this is the best way.
  13. This article talks about a RestoreBounds method. I cannot find this within my .Net environment, so I'm going to go ahead and assume its .Net 2.0 exclusive. If your using .Net 2.0 then check out the article. If your not, I would do it as follows. If I remember correctly from your other post your working in VB. So here goes... ' have these two public variables Public m_Size as Size Public m_State as FormWindowState ' ' in your resize event If WindowState = FormWindowState.Normal Then ' the form isn't maximised or minimised so store the new size m_Size = Size End If ' ' store the state so you can restore the application minimised m_state = WindowState
  14. I'll start with the middle part of your article first. I understand that perfectly. Call me stupid but moving the form is exactly what I expected to happen. Take the following.myForm.Controls.Clear(); // or if you prefer in the java type notation you tried to use as an example myForm.get_Controls().Clear();Look at this code and tell me you expect it to perform nothing. In my opinion, if I'm guilty of anything, it's not so much a misunderstanding of the function pair of a property, but rather a failure to recognise the Rectangle object as being a value type. Thus failing to realise it will act differerntly. I must admit untill I actually thought about it, my mind just accepted the Rectangle object as being a class not a stuct. And finally to the end of your post
  15. The more I think about this the more confused I get. I understand some of what your saying but not all. I'll sleep on it now and see if it makes more sense in the morning. If not hopefully the morning light will help me to compose my thoughts into some sort of logical order, because after 20mins of trying to form a reply I'm giving up.
  16. Which option did you try first, the debug mode or the release .exe?
  17. As Denaes says you must add the reference to the dll to your project first, it isn't one of the default ones. Just thought I'd add how todo this incase you didn't know... 1. Click the Project menu 2. Select Add Reference 3. Double click System.Management 4. Click Ok 5. You can now use the System.Management namespace in your code
  18. I learn't practically nothing about programming from University. I learnt a fair bit during my time there, but very little of it was actually taught. Ironically I failed a module on 2d graphics, then went on to spend my placement creating a GDI+ based Pocket PC client. Each class had a paint method that was called by the parent Canvas class, this avoided the need for anything based on the Control class allowing for a faster application and nice features such as translucent controls. Needless to say it was more complicated than the module. If I typed everything I thought, I would seem as impatient and rude as Diesel can be at times. It really annoys me when somebody asks for a translation of something really simple like this... If(a > b) { Messagebox.Show("a is bigger"); } else { Messagebox.Show("b is bigger"); }Maybe I've become jaded with experience, but how difficult can it be to work out that's a simple if statement. There are so few differences a trained monkey with a basic understanding of VB could translate it. I'm all for people learning, let's face it you look back at my posts, I imagine theres a fair few that make me look like an idiot (and no doubt theres more to come), but come on. It wouldn't surprise me if somebody asked how to convert this to VB. System.IO.File.Exists("c:\file.xml");In my opinion people that struggle with things like that shouldn't adventure out into forums, they should be reading books, tutorials or go to college. The problem is, they tend to be people that don't really want to learn, they want to be able to say 'look what I made', regardless of the fact its all cut and paste. When I was browsing through CodeProject.com the otherday I came across forum reports of somebody having the nerve to take the code from a tutorial (a Bubble Bobble clone written in .Net for PPC) compile it, and try to sell it on Handango.com. The only thing that stops me berating people at times is the thought of how the Experts and Guru's such as the ever helpfull PlausiblyDamp et al must feel trying to drum information into my skull when I ask stupid question. To prevent this post from becoming a complete diatribe and since I've already gone way of topic. I'd also like to mention that MrPaul, whilst being a newcomer to the community, has posted nothing but intelligent clearly explained posts. If MrPaul stays with us I personally feel they (I'd say he, but you never know) would be a good candidate for an expert ranking. Maybe this thread should have been called Cagsy's blog.
  19. My first language was VB6, which I taught myself before I started University. Then at University I studied abit of Java and some more VB6. I had never even heard of the .Net Framework untill I started my industrial placement year for my sandwich degree. I was hired as a basic HTML Web developer, but on my first day my employer turned around and said "We've changed our mind about what we want you todo. Here's C# write us a client application for our software suite.". I was shocked to say the least, but I sat down and taught myself C#. I would now call C# my main language, but most things are easily transferable between that and VB .Net based on my VB6 experience, plus a few titbits I've picked up along the way. I think I may have posted the suggestion myself previously, or at least commented on somebody elses post. I guess I should have checked before posting, but it seemed a pertinent problem at the time. Whilst as you say it gets confusing based on language, version etc. I would have thought it should still be possible to display any information the user does put in the box, along with their signature. Alternatively perhaps at the very least a prompt could be added to the sign up process advising the new user to add such information to their signature or in their post. It's along time since I joined up, so I can't really remember the process, but I don't remember seeing anything like this.
  20. I changed the code to the more conveniantly read... Rectangle rect = pPiece.Bounds; rect.Offset(displacement); pPiece.Bounds = rect;Just so that I've got this clear in my head. Calling a void method of a property getter which pertains to a value type is essentially useless (assuming the void method calls nothing external to the class), because the value object is copied to the stack with no reference to it? What I mean by this is that calling the .Offset method via the property getter makes a copy of the Rectangle on the stack, but there is no way from that section of code to access the Rectangle on the stack? I mean no easy way, I'm sure theres a complicated solution for accessing data on the stack via reflection or whatever. Is it just me or does all that sound abit confusing? I hope it makes sense.
  21. If the child form is called using the ShowDialog() method then the code will resume in the parent form directly after the ShowDialog() line and you can just call a ReloadXML() method from there. Of course this assumes you don't use the parent form before the child form is closed. If you need to allow both forms to be used concurrently then one way of doing it would be to pass a reference to the parent form into the child forms constructor. public class ParentForm : System.Windows.Forms.Form { public ParentForm() { } private void CreateChildForm() { ChildForm myChild = new ChildForm(this); } public void ReloadXML() { // reload the xml and populate the listbox } } public class ChildForm : System.Windows.Forms.Form { private ParentForm _parent; public ChildForm(ParentForm parent) { _parent = parent; } private ChangeXML() { // alter the xml file // update the parent _parent.ReloadXML(); } }
  22. Which Timer class are you using? System.Windows.Forms.Timer is only accurate to about 55ms. http://msdn.microsoft.com/msdnmag/issues/04/02/TimersinNET/
  23. What is the purpose of the application? The reason I ask is a keylogger is on kind of dodgy ground. For you to get help in this forum people will have to be sure your not using the code for nefarious purposes.
  24. I find it interesting that the file is being opened with a StreamReader class, passed to a XmlTextReader class, then read in with the XmlDocument class. One of the overloads for the XmlDocument class accepts a path as a parameter, using this should sidestep the problem altogether as well as neaten up the code.
  25. It's certainly possible to iterate through and find the person you wish to update, but there is one major issue with your current system that could cause a problem. You use the name to search, but the chances are in even a relatively small system there will be more than one person with the same name. Using an iterative system would be far easier if you had a unique ID for each person.
×
×
  • Create New...