Jump to content
Xtreme .Net Talk

wildfire1982

Avatar/Signature
  • Posts

    51
  • Joined

  • Last visited

Everything posted by wildfire1982

  1. try a wildcard. Its something people regularly complain about but never look for other posts about. DDE*
  2. If you post your code I will have a look to see where you are going wrong. You need to read each line, adding to a counter if the substring of the beginning characters (parsed) <15
  3. As no-one else has posted, i will have a go with an idea. I have never tried it myself but... you could try something called winpcap or something like that. Its used for network security so that you can detect all information going in and out of your computer. It might be a little bit too specific for what you want but other than that I cant think of a better idea.
  4. The best ways of doing this are specific to what is happening but in general, you need a progress bar and a way of calculating how far through a process, the program is. For example... say you were going to load a large file, you could get the number of lines or something, devide 100 by that number, and then for each line or whatever add the result to the value of the progress bar. That sounded a bit heavy didnt it!? any problems, reply and i will try to explain myself a little better.
  5. What splitter are you referring to?
  6. Hello folks, I have used excel from vb.net loads of times and normally manage it with no problems. This time, I have one event opening the spreadsheet and associating it with an object, and then another event which writes to the spreadsheet. Everything seems fine apart from when it is run and the line which the error occurs in should simply write to a cell. I get the message HRESULT: 0x800A03EC. The objects are defined in the main body of the code as public and each of the events metioned earlier refer to these. Anyone had this problem before? Im sure its probably just me being stupid as usual but I cant see where im going wrong. Cheers for any ideas. Chris
  7. Hello folks. I am using the rs232.vb file to access the serial port in a vb.net program and am looking through the manual of a device to which i would like to connect. It says "send the 'print signal' (pin4 on output socket) high and the device will send its current values". Is it possible to send a change the state of a pin through rs232 as my attempt to request the information and read it from the buffer either returns a timed out operation or a 0 when it shouldn be. Any thoughts would be most appreciated. Chris
  8. Has anyone got any idea how to remove the gridlines in an mschart? they look awful and i cant seem to find anything to do with them. Thanks again. chris
  9. Ellow again, I finally managed to do it. Its not the nicest looking code but it works so just in case anyone else needed to do it, here it is. Dim colorThing As Color = Color.FromArgb(showResults.AxMSChart1.Plot.SeriesCollection(loopcounterProps).DataPoints(-1).Brush.FillColor.Red, showResults.AxMSChart1.Plot.SeriesCollection(loopcounterProps).DataPoints(-1).Brush.FillColor.Green, showResults.AxMSChart1.Plot.SeriesCollection(loopcounterProps).DataPoints(-1).Brush.FillColor.Blue) showResults.RichTextBox1.SelectionColor = colorThing It was needed for a sort of legend style thing which i needed more control.
  10. Hello folks, does anyone know how to retrieve the colour of the column in an mschart control. I have a varying number of columns, where the chart creates a colour to represent this. Anyone know how i can get hold of it? Thanks Chris
  11. Just been having a thought. I am making a piece of software that displays an mschart. the thing is, when the data is calculated for this chart, there is the possibility for more than one datagrid to be used. i.e a different datagrid could be made per property. Would it make sense to have an array of datagrids to store the data for the chart so that the chart can be quickly redrawn without the need for calculating anything? Just after some thoughts so anyone that has any, please let me know. Cheers
  12. Hello, Im making a program which i would like to be able to print to an acrobat writer. I realise that i can just print to the writer but i dont really want to have to ask the user the name of the printer. So first of all, i would need to know how to detect whether the writer is available, if it is i would then need to find a way of getting the name of this printer. Does anyone have any ideas or suggestions? thanks very much. Chris
  13. One of them has a capital B at the beginning. Byte is normally used in capital like MegaByte MB and Megabit Mb. Does that answer the question or did you mean something different?
  14. Hello, i was just wondering if someone knew the code to put a border around a range of cells Thanks very much Chris
  15. Hello, is there any way to call the printpreviewdialogs code? or below you can see basically what i need to do. I just cant pass the system.drawing.printing.printPageEventArgs reference. I need to pass it on to be able to call it. Any suggestions? PrintDocument1_printpage(Me, Printing.PrintPageEventArgs) The reason i ask is that im trying to print a picture and i can get the printer to print but i just cant get it to drawImage. Cheers
  16. Hello folks. I am attempting to print a graph in vb.net. Its all going well but my OO in vb.net needs improving and i cant seem to get my head round interfaces in vb. I have played around with it for hours with no luck. I know this is quite a bit of code but if someone has any ideas i would be most grateful. Cheers Here is a module called interfaces Imports System.Drawing Public Interface IPrintableObject Sub Pront() Sub PrintPreview() Sub RenderPage(ByVal sender As Object, ByVal ev As System.Drawing.Printing.PrintPageEventArgs) End Interface Module Interfaces End Module Now here is the bit where i attempt to make the objects in a button. AxMSChart2.Edit() Dim printerName As Printing.PrinterSettings Dim data1 As IDataObject = Clipboard.GrtDataObject PictureBox1.Image = data1.GetData(DataFormats.Bitmap, True) Dim prints As New printImages prints.images = PictureBox1.Image CType(prints. IPrintableObject),Print() I realise that it is a bit of a mess, i have been trying to figure it out for ages and am just not having any luck. Thanks for any help!!
  17. Ok sorted it. Just for future reference, or if anyone is interested. The problem was that i was using the default parameters for the image.save so i needed to include the format again in the save method as bmp otherwise it wrote rubbish to the .bmp file. so: If filename.EndsWith(".bmp".ToLower) Then PictureBox1.Image.Save(filename, PictureBox1.Image.RawFormat.Bmp) End If
  18. Right, i managed it. If anyone is interested it was because i needed to use an IDataObject to cast into. One minor problem now. I can save to a bmp file only but the bitmap doesnt appear to be writing in format acceptable to windows. I have no idea why. Any ideas?
  19. Sorry i new i had missed a line when i cut and pasted it. this is the line which gets the image from the clipboard it comes directly before the saving to file line. Images = Clipboard.GetDataObject.GetData(DataFormats.EnhancedMetafile, True)
  20. Hello folks. I have made a small function which uses an image type. Im assuming that the exception is that the object is not instatiated but thats me attempting to translate from a german operating system. If my translation is right i understand what the problem is, i just cant see it. Here is the code. Dim cmdlg1 As New SaveFileDialog Dim filename As String Dim Images As Image cmdlg1.ShowDialog() filename = cmdlg1.FileName Clipboard.SetDataObject(AxMSChart1) 'AxMSChart1.EditCopy() Dim piccy As New PictureBox Images.Save(filename) The error occurs on the very last line. Any pointers would be great, cheers
  21. At the end of the day, there is only so much you can do with a program such as dreamweaver or whatever. If your doing a big site then sometimes its worth while but to get the exact effect you want you need to use an editor and that means you still have to know html and/or some scripting languages. I have tried using a free one called textpad. Very good but i think i will stick to using that for java. If you have problems getting notepad to preserve tabs then take word wrap off and check all the settings. The only thing that i can see that it doesnt do is highlight different methods properties etc in different colours but i started with notepad and still prefer it and i can live without colours. I think its completely down to personal preference, you will need to test a few to find out what your requirements are and then start using them.
  22. have a search for sendKeys, this will show you how the function works. there are some really good examples of how to use the different things in the sendkeys function. Good luck with it.
  23. hello, Im tryin to save a mschart object to a picture. I decided to copy the chart to the clipboard and then from the clipboard to a picturebox where i would save the picture as an image file. What i have tried is below. I found someone elses example which didnt work at all but i had a rehash so the code which is below has been mashed around a bit. Does anyone know where im going wrong? i just cant see it. Cheers for any pointers. Dim cmdlg1 As New SaveFileDialog Dim filename As String cmdlg1.ShowDialog() filename = cmdlg1.FileName AxMSChart1.EditCopy() Dim piccy As New PictureBox piccy.Image = Clipboard.GetDataObject.GetData(DataFormats.EnhancedMetafile) Dim something As New Drawing.Imaging.ImageFormat(Guid.NewGuid) something = Imaging.ImageFormat.Emf Application.DoEvents() Dim Images As Image Images = piccy.Image Images.Save(filename) Cheers folks Chris
  24. I had an idea in the end. I used the peek funtion i.e. loop until fileReader.peek = -1
  25. Hello, Just a quicky, i have been using the streamreader to read files and now i really need to know when it has reached the end of file instead of relying on the input being nothing. this is because i have come accross bugs where a function terminates on a carriage return. Any ideas? Cheers
×
×
  • Create New...