Jump to content
Xtreme .Net Talk

hog

Avatar/Signature
  • Posts

    1011
  • Joined

  • Last visited

Everything posted by hog

  1. Unfortunately these do not fit the bill :( The stretch image just distorts the image and as you say the autosize just makes it too big to fit in the form :( I am trying to have it so the image is scaled correctly to fit into the picture box.
  2. I'm sure this must be a maths thing, if it is I stuffed as I am naff at math! I have a picture box sized at 960 * 536 pixels and I am using the code below to put images of different sizes into it. Some look OK others are distorted. m_bmpNewImage = New Bitmap(m_bmpNewImage, 960, 536) I have an image I am looking at now and it is distorted. Its dimensions are 2142*2856. Is there some magical formula needed to scale it to look right? Any help gratefully received! Thnx
  3. Mmm appears I have been down this road before. Just trolling though old posts I have found ones I stated yonks ago!!! The mind boggles as I did not remember these topics I have covered ages ago, must be my age!
  4. Hi, Thnx :) Well I think it works as I believe I can see part of the image, (sky), but it means the source image is way too big for my picture box. Is there a .NET function that resizes an image dynamically to fit pictureboxes? Thnx
  5. Me.picMain.Image.FromFile(Application.StartupPath & "\photos\" & Me.cboSites.SelectedItem & "\" & Me.cboDates.SelectedItem & "\" & fiFileInfo(0).ToString) When I run this code my picturebox wont display the file? No error occurs in my try/catch and if I messagebox the file path and name used above it appears correct? :confused:
  6. Dim strPath As String = Application.StartupPath & "\photos\" Dim strDirectories As String() = Directory.GetDirectories(strPath) Dim intCharCount As Integer Dim strDirectory As String For Each strDirectory In strDirectories intCharCount = strPath.Length Me.cboSites.Items.Add(strDirectory.Substring(intCharCount)) Next :D
  7. I have just seen my error :p I am obtaining the entire length of the string.....plonker!
  8. So where am I going wrong here? I am trying to obtain only the subdirectory name rather than the full path. All I get is blanks? Dim strDirectories As String() = Directory.GetDirectories(Application.StartupPath & "\photos\") Dim intCharCount, intIndex As Integer Dim strDirectory As String intIndex = 0 For Each strDirectory In strDirectories intCharCount = strDirectories(intIndex).Length Me.cboSites.Items.Add(strDirectory.Substring(intCharCount)) intIndex += 1 Next
  9. Cheers ears! I am trying to avoid none .NET functions!
  10. I have just created some code, mainly from the help, which gets all the directory names within a given directory. This code uses the DIR function, which I think is the visual basic function not .NET? Is there a better function to use? Thnx
  11. Kool :) Thnx
  12. Hi, I have been away from VB.NET for coming up to a year now and am well rusty to my horry :( I have an app which will have two forms, one 1024*768 and one 800*600. I want my application to determine what resolution they are running at and open the correct form. Any pointers to what object I should be using? I tried the screen object but that talks about rectangles etc? Thnx Hog
  13. thanks chaps I shall go and get the October version.... Been out of it all too long so I guess I have to start right from the beginning again. hey ho In case I'm not back before.....Merry Xmas & a Happy New Year to everyone
  14. I see looking at this that it referes to C++ and C# only? Does this mean this version no longer supports VB.NET? Have been out of circuit for best part of year and want to try to get back into DirectX Thnx
  15. This is an odd question to ask here, but I dont know where else to go to try to find out? Problem: I have an access query that returns the transaction history of items but without a rolling balance. Solution so far: I created a function with a static variable which the query calls and returns the rolling balance figure for each line retuned; date qty balance 29/10/04 -1 9 01/11/04 2 11 05/11/04 4 15 etc. Trouble is the static variable holds its value as long as the code is running so it only works first time round. Big issue! I use access first to get the sql right etc then use sql analsyer to create the right view for our system blah blah so dont even know if this approach would work. Question....at last! I know nothiing of stored procedures but would they resolve this problem? are they intended for such use?
  16. I have just had my laptop wiped by our IT bods to remove W2K which had VS2003 running on it happily for ages and reinstalled ok without problems on a number of occassions. I now have XP Pro and am trying to install VS2003 but when I get to the initial step of the prerequists disk I get the following error; 'setup unable to run a program needed to proceed with the intallation, restart computer and try again - error 105' I do this and same thing happens. I have no other programs running and when I try to install on a W2K machine in my office it works OK. Is there a problem with VS2003 and XP Pro?? Thanks
  17. This is how I have always done it and never had any probs:)
  18. Ah all all comes back to me.....:) cheers ears :):)
  19. I have created a setup project which includes the merge module crystal_regwiz2003. When I try to build it says the license key is non-nullable? What value should be present here???? :confused: Thnx
  20. I have a report that is sent straight to a printer to produce three copies. I need each page to be identified with a letter A, B or C. I cannot seem to get a formula to keep track of the copy being printed thus they all come out labelled A. I have tried using a public variable from an outside module but the error checker complains it does not know this variable! Any ideas???? Ta
  21. Have you tried setting the paper size like this? myReport.PrintOptions.PaperSize.DefaultPaperSize = 0
  22. OK I hve is sussed; SELECT '[' + cstr(log_no) + '] ' + format(logged_dated, 'dd/mm/yyyy') + ' ' + LEFT(description, 40) AS log_detaill, log_no FROM tblLog ORDER BY log_no I am doing this so that the log detail combo box displays the log number, the date and the first 40 characters of the description in one column. thus..... [23] 30/8/2004 This is some text from the log Thnx:)
  23. Think he means <30/06/2004> This is his son, hes texting me what to post and he had 130 must of been typo
  24. I get this error : couldn't store <130/06/2004> in logno column expected type is date time' :confused:
  25. nope:( error message states string not recognized as valid date along with loads of other errors??? re the missing ) that was a typo here, my code did have it in it tho:(
×
×
  • Create New...