Jump to content
Xtreme .Net Talk

hog

Avatar/Signature
  • Posts

    1011
  • Joined

  • Last visited

Everything posted by hog

  1. Haven't used the datareader before, but from what I can see you don't actually seem to be executing any update command. Also I'm sure I will be corrected here but I thought the datareader was a read only object. If updates are required the data adapter should be used. Like I say I'm sure if I'm wrong someone will put me right :-)
  2. Constructors 7 to 12 of the MessageBox class have the first parameter being the windows form for which the message box will be displayed in front of
  3. Right click on the data adaptor, select properties, expand SelectCommand and set the Parameters collection
  4. Thnx Nerseus.....works a treat now
  5. Oh bugger I take it all back. Consider this a good lesson from you both. I sussed this by using the object brower!!! Oh will I ever learn..........hopefully :-)
  6. Thanks for this Nerseus, I'll try this out re the finding help. As for the Format method, there isn't one on bmpNewImage or Bitmap either?
  7. Divil, I'm trying to do this but, I'm probably being thick here, there isn't a constructor for Bitmap that accepts a bitmap as an argument. there is one that accepts a graphics object but I can't get that to work either :-(
  8. Result, thnx Divil :-)
  9. Mmm me thinks I'm going to have to spend time getting the option strict to work to see if this resolves it. I'll keep ya posted....thanks for the tips :-)
  10. Is there a way to have the openfile dialog box open in the logged on users My Documents folder. I presume this would require knowing the user logon, to be got with the API WNetGetUser perhaps.
  11. Yeah, I felt like I'd lost a limb....... Where is the server based by the way? My thoughts were was it in the States near to where the tornados hit?
  12. Alas, no I'm not :-( I did loads of code prior to realising this! When I try to add option strict I get error messages all over the place!
  13. OK, Public Sub New(ByVal lngEquipmentID As Long) This allows me to create an Equipment object based on the EquipmentID selected by the user from a combobox Public Sub New(ByVal blnLiveRecords As Boolean) This creates an Equipment object that contains either all live equipment or all archived equipment based on the boolean value. The method objEquipment.RecordSource is used to as the source data in reports. Public Sub New(ByVal strSupplierName As String) This creates an Equipment object based on the supplier name selected by the user
  14. Mmm, now I find that it cannot open any image of gif, bmp or jpg. It appears to error if the source file is a photo, I get 'Out of memory' error! I see there are other formats other than DontCare, but how do I make it generic so it really doesn't care?
  15. Result :-) Dim bmpNewImage As Bitmap = New Bitmap(strImageFilePath) Dim bmpImageSection As Bitmap bmpImageSection = bmpNewImage.Clone(New Rectangle(0, 0, 100, 100), Drawing.Imaging.PixelFormat.DontCare) Button1.Image = New Bitmap(bmpImageSection, 100, 100) My only problem is this. I wouldn't have worked this out without the section of code re clone being in one of my VB books. I spent ages searching the help within VB and got nowhere. Any ideas how to refine the help search? All my results just kept bringing back help on modifying images in design mode using menu options and design tools. I found noting on the above at all. I didn't know about clone so would never had homed in on it :-(
  16. Ooops! Public Sub New(ByVal lngEquipmentID As Long) Public SubNew(ByVal blnLiveRecords As Boolean) Public Sub New(ByVal strSupplierName As String) The problem I get is when I compile I get a message saying 'without a narrowing conversion'. Basically I think it is complaining that Long, Boolean and string can all pass the same value and it doesn't know which constructor to call?
  17. Phew, you are back! What happened? You site went awol yesterday afternoon and all last night. Was the server down or something?:confused:
  18. Nerseus, that is perfect....ta muchly. Now I obvioulsy want to work this out for myself so could you point me in the right direction whereby I can take a section of the source image and use this section as the button image. Like I say, don't tell me how to do it otherwise I won't learn ought, but a pointer would be welcome seeing as I was way off beam with this first attempt :-))
  19. Erm no? Doesn't make sense to me??
  20. Well my tuppence worth is this: I started with my employer 20 years ago as a grunt humping parcels. I'm now a double distribution Site Systems Developer, mostly due to an insane passion for programming, started on a ZX81 :-)) remember them. My employers have picked up on my enthusiasm and have forked out regularly on various training, the latest being a 27 CD training pack on VB.NET. I know I could be earning a lot more elsewhere but am happy where I am, which as said by others above, is important. I get where you are coming from re the help desk calls as I have only just got away from that in the last six months and am now left to program in peace. Can you not explain this to your employers? I know there are many go getters out there that live life in the fast lane going where the dosh is, but me....I like it safe, nice environment to work in, nice crowd to work with and hey I get to do my hobby for a job:-)) Not bad seeing as I left school with nothng at all....look at me now ma, I'm on top o the world
  21. I am coming up against this problem on a regular basis which makes me think I'm not understanding the constructor theory too well. I'm sur eyou will see the problem as soon as you read ..... Public New(ByVal lngEquipmentID as Long) Public New(ByVal blnLiveRecords as Boolean) Public New(ByVal strSupplierName as String) Yup, it's the ole narrowing conversion thingy. Is there a way around this as I'm having to invent stupid ways to get around it like this, which is rediculous!! Public New(ByVal lngEquipmentID as Long) Public New(ByVal blnLiveRecord as Boolean, ByVal strAnyCrap as String) Thnx
  22. Any time I refresh a dataset I always use the clear method on it first.
  23. Thanks Heiko, but I only compile the other two when I've made changes to them or when going for release mode. So during development time it's a pain having the whole thing compile when I am only modifying the application :-)
  24. Aha.....cheers Divil that's fixed it :-)
  25. Right hope I explain myself ok for you to understand. When VS Pro opens I get the startup form, which displays the last two opened projects. So far my main project is one I'm developing for work. It contains the application project, a dll project and a setup project. When I used to run the app in design mode it would appear to only compile the application project and fire up in a manner of seconds. Not any more.... At the weekend I started a new project to learn graphics in VB for fun. The startup form no longer displayed my work project this morning, so I selected to open the project by navigating to it vis the open project dialog. It opened but in solution explorer the dll project and setup projects were missing. I added them back to the solution with no bother. Problem now is every time I run the app in design mode it compiles the whole shooting match, setup and all which takes a long time. Is there a setting I should be modifying? It is still in debug mode, not release mode by the way:confused:
×
×
  • Create New...