Jump to content
Xtreme .Net Talk

bpayne111

Avatar/Signature
  • Posts

    335
  • Joined

  • Last visited

Everything posted by bpayne111

  1. ok well i got it set up, i found a file included that walked me through the process... so ok i have this thing showing up in SQL Servers; BNPayne\VSDOTNET it's called nwind. Now i follow in the book and get to the same spot that troubled me before. I drag a SQLDataAdapter to the form, and click New Connection. There i'm asked for a server name. What do i put there? i've tried a couple things but i don't know enough to do it right am i the only one so blind to databases? lol
  2. lol ohh.. sorry bout that... i was in class the first time i read it and must have not paid full attention whoops
  3. yea i'm aware of that but i like to follow the examples in the book sometimes, and that degree of seperation provides another degree of uncertainty. How much should i pay to get SQL Server? i'm gonna look that up in a minute but i'm going to microsofts site so i may be awhile lol
  4. just reading the message and it brings me to an interesting thing that happened to me when i was playing with cursors... Projects; Add Existing Item; Cursor would create a custom cursor for me and everything was lovely File; New; Cursor would let me create the cursor file but it would never seem to save correctly,i would try and add the cursor to a different project for an experiment but it would always show up as an I-beam. Any ideas on why that happened?
  5. i've studied various books on and off ovr the years and this one has me pretty confused....i'm using the ADO.NET Step by Step book by Microsoft All of the examples use SQL Server connections I don't know what a SQL Server is. One of my teachers said i needed a whole operating system to use that. I'm pretty lost, i've worked with OleDb's a little so i know some basic SQL statements and so on, but don't know what i'm supposed to do to be able to even attempt to do these examples in the book. I hope my solution is free lol thanks for any help
  6. Well when you make it transparent you will see the back of your picturebox instead of the form itself... Refer to my post on Transparent Graphic on Top for some info in the area if you will to make a certain color transparent in the bitmap class you can use the GetPixel method and the Make Transparent method. Use get pixel to get the color of a pixel that contains the color you wish to make transparent (in most cases GetPixel(1,1) works because the outside of the image is what you wish to make transparent however this doens't always hold true of course The following code is an example... Public Some Sub() Dim b as Bitmap = New Bitmap("myfile") b.MakeTransparent(b.GetPixel(1,1)) picturebox1.Image = b 'not you will not be able to see the form, you should dump the picturebox and use the System.Drawing.Graphics object for that (i just learned that myself :)) good luck
  7. i checked my cpu usage and noticed no problems so i'm just gonna be happy with what i have for now thanks
  8. if you mean .dll's check wherever you download stuff you may find some in there
  9. I see what you mean... I think it could be possible So if i passed a structure instead of my class itself the properties would not be altered? I need to keep it as an object because i need to inherit from it for the UI's class i also have trouble understanding the difference in types and objects. i've read a little on it but i still feel kinda confused about it. you guys are great thanks
  10. isee what i need to do now but does that mean i define what a shallow copy is in this method myself? thanks
  11. Aha, once again i've made a foolish mistake... This brings me to another question.. suprise suprise Public Overrides Function Clone() as Object Return Me End Function Would this return a deep copy? How do i return a shallow copy?
  12. yes, but i feel there is some generally accepted principle i am missing in this instance ie. sender is always object in an event, this is ovious but why not make it the same type as the calling object? (in this case could delegates be involved... i'll save those questions for another day)
  13. When overriding the clone method of an arraylist should i let it Return Object as default or change this to MyClassName? i have a feeling i'm supposed to leave it as object but i don't understand why... any thoughts, ideas and crude remarks appreciated
  14. ahh yes... i had read the help... thanks for putting that in laymans terms. i have trouble decoding these help files at times. one of you guys should write a book on using microsoft help lol yes they are 'complex' objects... that's what i was afraid that line meant lol i was hoping for a little less work :) thanks alot for the help
  15. can you enlighten me to this term shallow copy (i've seen clone and always wondered why it was usefull, now it all comes together :) ) thanks alot
  16. wow, i feel like an idiot. and to think i thought i was solid on that for years now. Well you know that sucks really bad You obviously see what i'm trying to do here so here's my stab at fixing it let me know what you think... instead of passing the true value.... create a new value and send that one to the method instead. ie. Public Some Sub() Dim myClassesProperty as ArrayList Dim myValueToPass as ArrayList 'statements myvalueToPass = myClassesProperty myConverterSub(myValueToPass) 'now myClassProperty won't be effected. End Sub
  17. do you mean Java script? just a thought
  18. OK i have a 3 classes (Chessboard, NumericBoard, Dictator) and all 3 have one common property... Pieces as PieceListBase (actually each class has a different propert(1 PieceListBase, 1 PieceListNumeric, 1 PieceListGUI) PieceLIstBase is an abstract class that inherits from ArrayList and the other 2 PieceLists inherit from the base The Dictator takes a PieceListGUI and converts it to a PieceListNumeric Somehow after i make the conversion the values end up applying to all instances of the PieceList classes. ie. i'm converting the location value for each piece in the pieceListGUI to a new value and setting PieceListNumeric to my converted class (i use a function to do this) The values are passed ByVal and i can't seem to find how these values are accumulating like they do... (i end up with an arithmatic overflow eventually) which FINALLY brings me to my question... Could the Base Class for my PiecesList have something to do with this? i'm posting some of the code The overflow occurs in the ConvertToNumeric Function HEEEEEEEEELP i'm gonna lose my mind 'chessboard class Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs) Dim squareIndex As Short squareIndex = GetCurrentSquare(e) myCursor.State = True mDictator = New MasterDictator(mPieces) If Not IsNothing(mSquare(squareIndex).Image) AndAlso mDictator.PieceGrabbedIsLegal() Then myCursor.Image = mSquare(squareIndex).Image myCursor.Rectangle = New Rectangle(e.X, e.Y, iSize, iSize) 'add previous square variable? mSquare(squareIndex).Image = Nothing Me.Refresh() Else myCursor.State = False End If End Sub 'MasterDictator class Public Sub New(ByVal hostPieces As PieceListBase) MyBase.New() MyBase.Pieces = MyClass.ConvertToNumeric(hostPieces) End Sub Private Function ConvertToNumeric(ByVal myPieces As PieceListBase) As PieceListNumeric 'converts the locations of the pieces to the corresponding index of mNumeric.Square(x) Dim aPiece As Piece Dim numericPieces As New PieceListNumeric() For Each aPiece In myPieces If Not aPiece.Rank = Rank.Abstract Then aPiece.Location = aPiece.Location + 26 + (4 * ((aPiece.Location \ 8) + 1) - 1) 'what in TARNATION numericPieces.Add(aPiece) 'numericPieces.Item(aPiece.Index) = aPiece End If Next Return numericPieces End Function
  19. in my case... i have a loop that defines all my rectangles and images... once the loop is finished i'm calling me.refresh. when the mouse moves i reinitialize one value and call refresh again. i'm using doublebuffering on the control and i have no flicker at all. i'm thining i should stick with me.refresh am i wrong?
  20. i'm using me.refresh as of now and everything is lovly (thanks to posts from this forum) What is this invalidate you speak of? i'm not painting in a loop so i guess it doesn't matter but, i'm still curious thanks
  21. Is it possible to restrict the mouse movement without using the API? i've been looking and can't find much if the API is my only option, any help on the Declarations i need would be nice thanks
  22. When the user clicks the mouse i'd like to set a couple of variables and then redraw the form. Should i call the paint event directly or use Me.Refresh? is thier a difference in using one or the other?
  23. hey wow that's cool i might have to use that Let me get this right... so if i have a property in one class and i want to have another property in another class mirror that property this would be what to do eh? How would I define DataBinding property in a class that is already using inheritence?
  24. lol i was gonna say the same thing, just give the phone company it's 2.50 and be happy they made it so simple :)
  25. nevermind solved it it stretched the image to the square :)
×
×
  • Create New...