Jump to content
Xtreme .Net Talk

hog

Avatar/Signature
  • Posts

    1011
  • Joined

  • Last visited

Everything posted by hog

  1. hog

    Shadows keyword

    DOOOOOOOOOOOHHHHHHHHHHH! The whole forum gets deafened as hog finally hears the penny drop!!!!! There always has to be one.......and it's usually me:) Thnx
  2. hog

    Shadows keyword

    OK this is the way I see it which does not explain the output I get:( Yes I understand this but the output does not match? surely the output should be what I expect and not what I actually get? For example; Dim sc As New SubClass DosomeThing(sc) In this section is it right that this is happening; SubClass.ShadowNoise is being called not BaseClass.ShadowNoise? This should be the case because the SubClass function ShadowNoise has shadowed the BaseClass version of the function and so blocks it? So why does the output say that the BaseClass version is being called?
  3. As my post stated, it was messy and yes I agree with mutant re using .net features is preferred! But it was late, I knew how to do it the old way but now I now the new way so everyones a winner :)
  4. hog

    Shadows keyword

    Ok so now it's another day I shall try to get understand this topic. Alas this reminds me of 1985 when for the life of me I just could not understand arrays! When the penny dropped I thought...duh.....why couldn't I understand them? :)
  5. hog

    Shadows keyword

    I do hope you can stick with me on this as it seems like a mission to try to get this but....der...nope:( This is what I have done to help me get it, and the results I get along with the results I thought I should get Public Class BaseClass Public Sub ShadowNoise() MessageBox.Show("BaseClass ShadowNoise") End Sub Public Overridable Sub OverrideNoise() MessageBox.Show("BaseClass OverrideNoise") End Sub End Class Public Class SubClass Inherits BaseClass Public Shadows Sub ShadowNoise() MessageBox.Show("SubClass ShadowNoise") End Sub Public Overrides Sub OverrideNoise() MessageBox.Show("SubClass OverrideNoise") End Sub End Class Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim bc As New BaseClass DosomeThing(bc) Dim sc As New SubClass DosomeThing(sc) End Sub Private Sub DosomeThing(ByVal c As BaseClass) c.ShadowNoise() c.OverrideNoise() End Sub I get BaseClass ShadowNoise BaseClass OverrideNoise BaseClass ShadowNoise SubClass OverrideNoise But expected BaseClass ShadowNoise BaseClass OverrideNoise SubClass ShadowNoise SubClass OverrideNoise Surely as SubClass shadows BaseClass's ShadowNoise shouldn't it have calles SubClass-ShadowNoise? Sorry for being dim but surely it will give you a warm sense of satisfaction once you get the penny to drop for me :) :)
  6. Messy, but hey if it works:) Dim strMyName As String = "paul" Dim strFirstLetter As String = Microsoft.VisualBasic.UCase(Microsoft.VisualBasic.Left(strMyName, 1)) strMyName = strFirstLetter & Microsoft.VisualBasic.Mid(strMyName, 2, Microsoft.VisualBasic.Len(strMyName) - 1) MessageBox.Show(strMyName)
  7. hog

    Shadows keyword

    Sorry mate I must be completely off beam here as I just don't get it?? If the latter includes the functionality of the base class then are you not limited to only working with the sub class as the base class is included in it? I obviously haven't picked up on this as much as I thought which concerns me now:( Could you be so kind as to post a code snippet that would detail this issue a little better. I appreciate you have already posted some code but alas I don't get it? In hope......
  8. Depends what your after. If I know the values will remain static I create a collection and use that. If the values are going to change I bind.
  9. hog

    Shadows keyword

    Mmm now I'm scatching my head? why? Dim c As BaseClass = New SubClass and not? Dim c As SubClass = New SubClass Surely the latter includes BaseClass as it inherits it? Or have not understood OOP at all:(
  10. hog

    Shadows keyword

    Thnx for the explaination, all clear now :)
  11. Still have no online help as it is coming to 3 weeks withou my own laptop:( So I have come across this and hope someone can enlighten me. Public Class clsCar Inherits clsVehicle sub new() End Class Sub New() MyBase.New(some guff goes here) End Sub My book says that the above ensures that the New method of class clsVehicle is called by using MyBase. Yep makes sense until I see and read something like this; Public Class clsCar Inherits clsVehicle sub New() Shadows Sub Drive() End Class I've lost the plot now? what of MyBase or Overloads or or ??
  12. Result :):) Thnx:)
  13. I start out with a good idea of where to go then get into coding pretty quick. I have always asked myself whether this is the best approach? Up until now I have managed to provide applications quickly so the end users get a good working copy. I then amend thru new versions to include their wish lists. I would welcome advice on the planning first approach as have never understood how to master/do this? How can you plan ahead so far then start coding and have thought of everything? I find things crop up as I'm coding which I feel would inhance the app etc that I doubt I would have thought of sitting at a desk with a bit of paper?
  14. I'm getting nowhere with this problem:( Say I want the combobox to display NEW YORK? I presume I can find this value in the combobox thus; Me.cboLocation.FindStringExact("NEW YORK") but I cannot get it to display the text NEW YORK????
  15. I've never used This, but I always make a point of using the Me prefix. Must be force of habit??
  16. I haven't reaaly looked into this as yet but thought I'd ask the forum for some clues as to how hard or easy it is to get music into a game? Do you need some special app to record/make the music and then something else to link it into the game?
  17. I'm on the old learning to program games road using the start with tetris approach. I have a timer that controls the blocks fall rate and another to count for 90 seconds then reduce the first timer to increase block flow. Of course being a complete prat I just answered the question myself. If the timer is set for 90 seconds if wont do anything until the 90 seconds is up! Oh forgive my stupidity....I was bladdered last night after all :(
  18. Still don't have my own laptop and have got the help files:( Are forms limmited to only 1 timer? I'm trying to have two timers to control different things but can't get the second timer to kick in?
  19. Yeah I've tried doing it another way but always get errors:( Say my combobox has the bound values; LONDON PARIS NEW YORK MADRID And I select a customer whose data includes say NEW YORK. How do I get the combobox to point to the bound data of NEW YORK and display it also?
  20. I vaguely remeber this happening to me once? I think there is a post on this site regarding it if you have a search...
  21. Aha so I'm not goin nuts :):) However hope I'm not labouring on a point but this is just weird ; The comboboxes are bound to datasets. On loading the customer data I set the combobox text to match. I can move between different customers and the comboboxes always show the correct customer data. If I modify any control on the form and save the customer then select another customer all controls are displayed correctly except the comboboxes? If I continue to move through the customers the comboboxes eventually start to show the correct data. So are you saying that the Text property is unstable when the combobox is bound to a dataset?
  22. hog

    Game Engine

    Mmm with such a low attention span I doubt many out there will be prepared to get involved!
  23. Robby, I've done a search for the post you mention above but had no luck :( Can you point me to it cos the more I think about it the more I vaguely remember something about it....I think:)
  24. Thanks for your valued input chaps, this is what I have discovered to date:) Anim8or is very good in deed and unbelievably FREE! The author of Anim8or, R. Steven Glanville, is one very helpful dude who has taken the time to reply to my emails to help solve some of the problems I was having, basically cos I'm thick:). There is also a 90 user manual as well as a plug in called Teranim8or that builds landscapes. I would thoroughly recomend this product to newbies and probably to experts to. I have also downloaded an evalution copy of Paint Shop Pro 8 which I have found very good also, basically as it has in built video training which is great for those of us that want to get stuck in fast. I like both thes products as they help you to get good results very quickly thus rewarding you and making you want to explore further into the products. Again thanks guys, you have been really helpful:)
  25. ? can't remember that...but all was working fine before I place another combo box on the form. I was able to set the text of the combo box to the customer data, make modifications, save view customer again and all was well??
×
×
  • Create New...