Search Results - VBForums

Search:

Type: Posts; User: IanRyder

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    3
    Views
    107

    Re: Converting 2 files into 1

    Hi,

    This is a simple case of reading both files, combining the contents and writing the result to another file. Here is just one option using .NET4:-
    ...
  2. Replies
    27
    Views
    984

    Re: OleDbConnection Update Syntax Error

    Hi,

    You have got your syntax mixed up with that of an SQL Insert Statement. The syntax for an Update query follows these lines:-

    Update <TableName> Set <Fieldname1> = <@Value1>, <FieldName2 =...
  3. Replies
    5
    Views
    242

    VS 2012 Re: run as administrator without prompt

    Hi,

    Here is a trick that I only learnt myself the other day. I wrote some new software for a business recently that needed to check some things and depending on the results had to do some updates...
  4. Replies
    1
    Views
    112

    VS 2012 Re: detect network adapter

    Hi,

    Have a look here:-

    NetworkInterface.GetAllNetworkInterfaces Method

    Hope that helps.

    Cheers,
  5. Replies
    2
    Views
    166

    VS 2010 Re: Streamwriter question

    Hi,

    When you use a Using block to open a file then that file is Automatically closed and the object reference Disposed off when the code reaches the End Using statement. However, if you open a...
  6. Replies
    7
    Views
    291

    Re: Similar repeating code and testing tools

    Hi,

    Assuming that you are using .NET, you need to look at using a For loop to reference each of your PictureBox objects and then do whatever you want with each one of them. Here is a quick example...
  7. Re: There is already an open DataReader associated with this Command which must be cl

    Hi,



    Are you sure?

    After a quick look at this I can only reproduce your error when the code hits the "else" statement in the code that you posted. This is due to the fact that you have used...
  8. VS 2010 Re: How to split string and shellexecute print a PDF from conversion to string. PHEW!

    Hi,

    I may have misunderstood your question but, using your own code, you create the contents of a TextBox with something similar to:-

    Private Sub Button2_Click(sender As System.Object, e As...
  9. VS 2010 Re: How to split string and shellexecute print a PDF from conversion to string. PHEW!

    Hi,

    A TextBox has a Lines property that can be iterated through. Have a look here:-

    TextBoxBase.Lines Property

    Hope that helps.

    Cheers,
  10. VS 2013 Re: Counting the Unique Items in a List...

    Hi,

    Not sure if this helps any further but, here are a couple of other options / ideas for you:-

    'To count the specific named items in a list:-
    Dim countOfBeam1 As Integer =...
  11. VS 2013 Re: LINQ query over an XML file only returns the first result

    Hi,

    You are selecting the wrong Node in the From Statement to achieve an array of the Child Nodes that you need. Have a go with this example:-

    Dim someValue As Integer = 2
    Dim AllChildren() As...
  12. Replies
    2
    Views
    155

    VS 2010 Re: A couple of string operations

    Hi,

    Have a go with these examples:-

    Dim myString As String = "bghtyfjggyt567SFDRE234dE"
    Dim sortedASCChars() As Char = myString.OrderBy(Function(x) x).ToArray
    Dim sortedDESCChars() As Char =...
  13. Replies
    3
    Views
    245

    Re: Get User_ID from table with 2 column

    Hi,

    Three are basically three ways that you can do this:-

    1) Continue as you are but instead of using the ExecuateReader Method you can use the ExecuteScalar Method of the Command Object which...
  14. Replies
    9
    Views
    534

    Re: Save Button image - suggestions please

    OK, good to hear,

    Here are a couple of other options for you:-

    108425
    108427

    What do you think?:D

    Cheers,
  15. Replies
    9
    Views
    534

    Re: Save Button image - suggestions please

    Hi,

    If you rotate that image 180 degrees then I think you will find that this is still the most widely used Icon for saving something in the Windows environment. I would not worry too much about...
  16. VS 2010 Re: Updating a DataGridView Cell Style

    Hi,

    You are getting your issue since you are setting the DefaultCellStyle for the ROW and not a specific Cell. You then iterate through all the rows in the DataGridView and set this same style for...
  17. Replies
    12
    Views
    394

    VS 2010 Re: Property 'item' is 'Read Only' error

    Just to add, I cannot believe that I actually propagated your own logic error in that code. Shame on me. :blush: You also need to swap the While statement with the IF statement so that you check that...
  18. Replies
    12
    Views
    394

    VS 2010 Re: Property 'item' is 'Read Only' error

    Hi,

    As you have it now the statement:-

    Dim val As String = lvRequests.Items(lvRequests.Items.Count - 1).SubItems(3).ToString()

    will return:-

    "ListViewSubItem: {SomeValueInTheSubItem}"
  19. Re: How can I skip the alert sound when hitting enter

    Hi,

    Have a go with this snippet of code in the KeyDown Event of the Form:-

    Private Sub Form1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
    If e.KeyCode...
  20. Replies
    3
    Views
    192

    VS 2012 Re: Error calling modules

    Hi,

    I am sure you are going to find here that what you are expecting to happen is actually not happening since you are doing a Bitwise comparison on those If statements by saying:-
    ...
  21. Re: Loading .txt file into multiple ListBoxes

    Hi and welcome to the Form,

    The advice given by jmcilhinney is good advice and helps to concentrate your thoughts on the current task in hand. In your case the current task is to read a file so...
  22. Re: How would I go about creating this program? Carpet price calculator.

    Hi,

    Just to add a little to what Joacim has already said. I will leave it for you to decide which specific Data Types you need to use but your comments dictate that you have a Read Only Property...
  23. Replies
    12
    Views
    393

    VS 2010 Re: option strict on errors

    Hi,

    Fist of all have a read through this:-

    Option Strict Statement

    Once read, consider your first statement:-

    Dim currentTime As System.DateTime = System.DateTime.Now
    Dim DateOnly =...
  24. Re: VB 2010 Using Nested Loops PRGM Project RULE OF 72

    Hi and welcome to the Forum,

    I do not specifically know this calculation but here are a couple of comments for you:-

    You say:-

    For i As Integer = 1 To 20
    dblRule72 = 72 / (intRate * (i))...
  25. VS 2010 Re: Advice Needed: About Option Stric On and Difference Between Any CPU / Active (x86

    Hi,

    To adhere to best practice principles when coding your applications you should always have Option Strict On since this will help you to identify and correct any type conversion errors that may...
  26. Replies
    17
    Views
    553

    Re: [RESOLVED] Latest Sunday date

    Are you sure?

    I also realise that what I posted was basically what RhinoBull said in post #2 so what has a Byte variable and the DateDiff Function got to do with solving your issue?:confused:
    ...
  27. Replies
    17
    Views
    553

    Re: Latest Sunday date

    Hi,

    Sorry, I have been out of VB6 for too long to give a specific example but try re-engineering this .NET example back to VB6:-

    Dim lastSunday As Date = DateAdd(DateInterval.Day,...
  28. Replies
    3
    Views
    214

    Re: Need help removing registry key

    Hi,

    Have a read here:-

    RegistryKey.DeleteSubKey Method (String)

    Hope that helps.

    Cheers,
  29. Re: More efficient way of doing this...

    Hi,

    I see that Niya has just beaten me to this but here is another comment for you:-

    I am not going to waste a load of time reading all that code so I will just comment on what is in the...
  30. Thread: Month wrong

    by IanRyder
    Replies
    3
    Views
    231

    Re: Month wrong

    Hi,

    Here is a bit of logic that you can use to achieve this. It's in .NET but I am sure that you can work this back to VB6 using the same logic:-

    Private Sub Button1_Click(sender As...
  31. Replies
    5
    Views
    197

    Re: System Tray Notification

    Hi,

    This is a great example of why you should always explain in detail what it is that you are trying to do in your initial post since there may well be a better ways to do what you need.

    In...
  32. Re: using xpath and xmldocument to reAD AN XML FILE

    Ah, Nice one .paul. and good to know for the future.

    Cheers,

    Ian
  33. VS 2012 Re: Trying to make equal-sized cells in TableLayoutPanel

    Hi Boops Boops,

    I see what you are saying here but there is something more fundamentally wrong here since I can do this with no problems in .NET 4 and VS2010 using the Designer.

    @paulorton,...
  34. VS 2012 Re: Triming Strings in FileInfo???

    Hi,

    .paul. has basically answered this, but, the final answer here depends on how the ListBox has been populated. Is this a collection of String Types which show the Path and Name of the Files or...
  35. VS 2012 Re: Trying to make equal-sized cells in TableLayoutPanel

    Hmm,

    That seems a bit strange since it works fine for me. The only thing I would suggest now is that you start with a Height and Width of the TableLayoutPanel that divides EXACTLY into eight equal...
  36. VS 2012 Re: Trying to make equal-sized cells in TableLayoutPanel

    Hi,

    I was just about to suggest doing this is the designer since this is the easy way to do it but from the Pictures that you have shown it looks like you have left the last Row and Column as...
  37. VS 2010 Re: Problem inserting decimal into access database

    Hi,

    There are some issues with the Decimal Type in Access 2007. Have a read through this thread to get some insight:-

    Access 2007 Decimal problem

    When using Access I personally always use...
  38. Re: Insert and Update does not work, please help

    Hi,

    I can see one error at the end of the Insert statement, being an extra comma and single quote, but since you do not specify what the issues are that you are having I can only guess if that is...
  39. Re: using xpath and xmldocument to reAD AN XML FILE

    Hi,

    I have never seen that syntax for querying an XML file before so I will not comment on that but what you need to do is Select the Section Node that corresponds to the Section that you want and...
  40. Replies
    12
    Views
    331

    Re: Visual Basic as File Converter

    Hi,

    Yeah sure. This is just a simple case of reading a file, doing whatever conversion you want to the file and then re-writing that file as you need.

    Here are just two of many options for you...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.