Search results

  1. B

    Question recursive function

    my code have no memory handling whatsoever, it just do some generic recursive function as example. You have to remember that everytime your code do a .Add it will need more memory for it, and I saw a few .Add inside loops. I GUESS that Datasets are more memory efficient than List(Of T) and...
  2. B

    Question iTextSharp generating corrupted PDF

    in case anyone needs or it's curious the solution came from here iText - General - KillIndirect functions creates erroneous Pdf and my final code is: ''' <summary> ''' Remove Images from the PDF file. ''' </summary> ''' <param name="PageNumber">Page from which to remove the...
  3. B

    Question iTextSharp generating corrupted PDF

    hi guys, My application uses iTextSharp to fill up some form fields in a template pdf, convert the fields into static text (flat the layers), depending on some checkbox selections it deletes or not the images from the PDF and show the result. I use on my computer FoxIt reader and I had no...
  4. B

    Need to activate sheet2 in Excel and get the data from sheet 2, rather than sheet1

    Dim oWS As Excel.Worksheet = oWB.Sheets("Sheet2") ?
  5. B

    Question recursive function

    I'm not very sure on exactly what u want to accomplish, but I'll give an example with a List(Of T) to give you some ideas. But it can be done in other ways, I just like lists it really depends on what u pass or not on the optional parameters and what u want to accomplish this thing can grow a...
  6. B

    Question DataGridView disappears data after updating from DB

    FYI: I'm still out of luck for this one... for testing purposes I changed to only run this whole Sub on form load then I'm just changing the datatable (by querying the database) and the numbers on the datagridview still disappears.... ideas ?
  7. B

    Question DataGridView disappears data after updating from DB

    it's quite a simple code to load the data into the datagridview: If Not db.Query("SELECT id as 'ID', name as 'Name' FROM subsidiary", ds.Tables("subsidiary")) Then MessageBox.Show(db.ErrorMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)...
  8. B

    Question How to store the contents of the controls in the notepad on runtime?

    to deal with files you want to import System.IO and use in your project File.Create / File.Open, etc. Check the appropriate documentation and for sure there are thousands of examples on google. But if the task is simply to store a few settings you should be using the Settings. In the Solution...
  9. B

    Help with project

    if you're not planning any fancy animations or link with information databases, it shouldn't be difficult to do it... you must set the windows properties corretly: FormBorderStyle = None WindowsState = Maximized that way your program is already running full screen. now it's kinda of creating a...
  10. B

    Question How to convert MaskedTextbox to DateTime?

    Johns' answer is absolutely correct but as an alternative that I think it's simpler: you can also replace this masked text box for a DateTimePicker, and set 'ShowUpDown = True'; 'Format = Custom'; 'CustomFormat = dd/MM/yyyy hh:mm' that you automatically have a datetime type and don't have to...
  11. B

    Question how hidden are string resources?

    I'm not sure it does apply to the context of my application... I'll dig deeper on it for a bit to check... thanks!! The situation here is a license file that makes the application stop work after its expiry date. The application is 100% offline and will be used by half a dozen suppliers around...
  12. B

    Question how hidden are string resources?

    ok then... I guess it's just better put it in the code... at least the person need to take the time to use a hex editor to find it. ------- edit: just in case anyone curious, I ended up declaring 2 strings with same length and made a FOR loop on them to built the final password, something...
  13. B

    Question how hidden are string resources?

    Hi, I know that if you create a string like: dim a as string = "My String" if you open the compiled .exe in a hex editor you will see there "My String" now my question is about the Resources: if I add a string there, how easy would be for one to have access to it? Is it a plain xml that anyone...
  14. B

    virtual serial port triggers

    well.... despite the fact that you found this, from my experience I still doubt the usefulness of individually accessing pins on the serial port. I suggest double checking the documentation of what you're trying to control before going further on this. But if it's really what you need, a...
  15. B

    virtual serial port triggers

    I'm sorry but what you're saying is not making much sense. The serial port sends data as a sequence of bits usually coding ASCII characters. You do not individually control it's pins. You simply instantiate the SerialPort object, open it and use a mySerialPort.Write(MessageString) to communicate...
  16. B

    virtual serial port triggers

    the SerialPort class does not give you individual access to the pins states. also, I don't know of any vb.net class that would do it. If you want individual pins, it might be easier to use the parallel port instead. what you created with your code will allow you to use...
  17. B

    Question Saving Data

    good point, I've only used as filepath, therefore I didn't know this better way. I tried to sketch the code for it, could you confirm it? ' Initialise the objects (probably OnLoad event) Dim FileName As String = "c:/temp/myConfig.dat" Dim myStream As New...
  18. B

    Question Saving Data

    considering that a inventory can have lots of items, items types, different sizes, etc, (assuming a RPG) I'll suggest a different approach from a text file that can give you some really powerful tools. Use a dataset. Within a dataset it's much easier to locate, modify, process and generate data...
  19. B

    Question Draw chart in excel

    yes, it is possible. and instead of anyone giving you a code ready you can create it yourself, it's simple. - After you have the data on excel go to developer tab (you might need to enable it on the Excel options) and click 'Record Macro' - Create the chart the way you need manually - Stop...
  20. B

    Fast method to read text files

    I know you emphasize the 'easy' part here, but you can't always find an 'easy' way through. Said that, if it was me, considering the size of this monster, I would be tempted to try to import this into a SQL server and try to work the searches you need from there.
Top Bottom