Search Results - VBForums

Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.37 seconds.

  1. Replies
    9
    Views
    195

    VS 2013 Re: Can't get CodeDom to work with Linq 2 SQL?

    put it in line 2:


    Option Infer On

    but all you need to do is cast:


    Return DBML.Person.Cast(of ???).Where(Function(x) x.FirstName.StartsWith("a")).ToArray()
  2. Replies
    9
    Views
    195

    VS 2013 Re: Can't get CodeDom to work with Linq 2 SQL?

    Dim vbCode = "Imports Microsoft.VisualBasic" & vbCrLf &
    "Imports System" & vbCrLf &
    "Imports System.Collections" & vbCrLf &
    "Imports...
  3. Re: Run-time err in VB.NET pgm that wrkd w/Office XP but quit whn upgraded to Office

    You should note that different versions of office object models sometimes have different method names and properties
  4. Replies
    9
    Views
    195

    VS 2013 Re: Can't get CodeDom to work with Linq 2 SQL?

    I didn't read through your code, but I'd first check your compiler includes the necessary references and Imports:

    System.Core
    System.Xml
    System.Xml.Linq
  5. Thread: Need some help

    by .paul.
    Replies
    3
    Views
    140

    VS 2013 Re: Need some help

    My.Computer.Audio.Play will only play PCM .wav files.
    Have a look at the music player on my webpage...

    http://www.scproject.biz/Playing%20MultiMedia%20Files.php
  6. Replies
    13
    Views
    281

    Re: need help with coding

    Yes it is possible to show " in your output and it is possible to put your output in a multiline textbox, but the only output I can see in your code is "14"
  7. Replies
    4
    Views
    142

    Re: create a dynamic form

    The only time i've ever created my own forms that way was when creating an app that used the CodeDomProvider class to create executables...
  8. Replies
    7
    Views
    229

    Re: Good Beginner Projects

    Here are a few of my TechNet submissions:

    tictactoe
    Console BlackJack
    MasterMind
    hangMan
  9. Replies
    4
    Views
    142

    Re: create a dynamic form

    yes it's possible. You do it the same way you'd create a dynamic control with the New keyword. Then use AddHandler to hook up events, add dynamic controls and handlers for those too...
    That's all...
  10. Re: A question with regard to accented characters.

    I think you might be experiencing hallucinogenic effects due to the psychotropic properties of overripe bananas:D
  11. Re: A question with regard to accented characters.

    Using reader As New IO.StreamReader(FilePathIn, System.Text.Encoding.UTF7)
  12. Replies
    2
    Views
    131

    VS 2010 Re: Early Binding HTML Label Attributes

    For each objLabel as HTMLLabelElement in objHTMLDoc.getElementsByTagName("Label")
    ...
  13. Replies
    2
    Views
    190

    Re: Array Help! Counting Numbers

    Public Class Form1

    Private numbers(,) As Integer = {{1, 8}, {4, 5}, {7, 9}, {3, 1}, {9, 3}, {5, 9}, {8, 8}, {9, 9}, {7, 3}, {2, 1}, {5, 4}}

    Private Sub Button1_Click(ByVal sender As...
  14. Replies
    2
    Views
    162

    VS 2013 Re: Help Transverse through Text

    try this:



    Dim s As String = "asdasdasdsadasdsadsadsfsfdssgdfhfdh fdhfdhfdhfdhfdhfdhfdhfdhfdhfdhfd hfdhfdhhfdhfdhfdhfdhfdhfdhdfhfd !dsgdgdfgdfgfdgdfgfdgdfgfdgdfhh*...
  15. Replies
    20
    Views
    307

    Re: Calculations help

    Dim intOccupiedTotal As Integer = 18
    Dim intVacantTotal As Integer = 10
    Dim intTotalofAllRooms As Integer = intOccupiedTotal + intVacantTotal
    MsgBox(((100 / intTotalofAllRooms) *...
  16. Replies
    20
    Views
    307

    Re: Calculations help

    It's a good idea to try to isolate the problem in a case like yours.
    The occupancy formula is:

    (100 / total rooms) * total occupied rooms

    If you want to format to a specified number of places,...
  17. Replies
    20
    Views
    307

    Re: Calculations help

    This is the algorithm in pseudocode:

    Loop
    Input value for occupied
    Add to occupied total
    Input value for vacant
    Add to vacant total
    Calculate occupancy rate = (100 / (occupied + vacant)) *...
  18. Re: What's the difference between datasource, datatable, dataset etc...?

    Here's an example you might find helpful:

    https://code.msdn.microsoft.com/DataBinding-91dfbcf4
  19. Replies
    4
    Views
    215

    VS 2010 Re: Multiple instances of the same programme

    Form.IsMdiContainer Property
  20. VS 2012 Re: For Loop incrementation defined by the user

    this is the safer way to do that:



    Private Sub btnForLoop_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnForLoop.Click
    Dim count, startAt, endAt, stepValue As Integer
    ...
  21. Replies
    2
    Views
    140

    VS 2012 Re: Mortgage Calculator Program Help!

    Try:

    m = (p * (1 + i)) ^ n / ((1 + i) ^ (n - 1))
  22. Replies
    6
    Views
    190

    Re: Listbox and calculation not working

    These lines you had:



    If IsNumeric(strOccupiedRooms) Then
    decOccupiedRooms = Convert.ToDecimal(strOccupiedRooms)


    Bearing in mind what i said about integers:
  23. Re: Is there any possible way to generate 6 numbers in one label?

    https://msdn.microsoft.com/en-us/library/aa289513(v=vs.71).aspx
  24. Re: Is there any possible way to generate 6 numbers in one label?

    BTW... Decimals are most accurate with Decimal. Double is a floating point datatype, and often innaccurate
  25. Re: Is there any possible way to generate 6 numbers in one label?

    Integer is Int32...
    Using Int16 won't be faster as Int32 is the optimal size with a 32 bit processor

    Integers explained:

    Int16 - Short
    Int32 - Integer
    Int64 - Long
  26. Replies
    9
    Views
    161

    Re: Regex pattern Replace ??

    Regex can be elegant, but it has the tendency of quickly becoming ugly:D
  27. Re: Is there any possible way to generate 6 numbers in one label?

    label1.text = string.format("{0}, {1}, {2}, {3}, {4}, {5}", intNum1, intNum2, intNum3, intNum4, intNum5, intNum6)
  28. Replies
    6
    Views
    190

    Re: Listbox and calculation not working

    In your point #2 in the original question, it's not the rooms from the 1st line. They are the rooms from the last line. That happens because you don't increment the room counters, you're just...
  29. Replies
    6
    Views
    190

    Re: Listbox and calculation not working

    ok. here it is with a loop:



    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim occupied As Integer = 0
    Dim vacant As...
  30. Replies
    6
    Views
    190

    Re: Listbox and calculation not working

    you mean like this?:

    124885



    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim occupied As...
  31. VS 2013 Re: How to randomize strings in an array into a listbox?

    I disagree with dday closing your other thread, as it was, though related, a different question.

    Here's my solution:

    124881
  32. Replies
    9
    Views
    248

    Re: Need help with reading delimited file.

    Or i can give you one unintelligible line of code:


    Dim numbers() as integer = Array.ConvertAll(IO.File.ReadAllText("filename.txt").Split(","c), Function(s) CInt(s)):D:D:D
  33. VS 2012 Re: array.sort and array.binarysearch query

    Does it have to be binarysearch?
    Try searching MSDN for Array.Find or Array.Findindex
    The first returns an element, the second an index of an element.

    To use:

    Dim index as integer = ...
  34. Re: Inserting data from VB.NET to MS Access: Syntax error in INSERT INTO statement

    try this:


    Dim sqlOrder As New SqlCommand()
    sqlOrder.Connection = sqlLink
    sqlOrder.CommandText = "INSERT INTO User_Data([Username],[Password]) VALUES(@userName, @passWord)"...
  35. Re: Reading specific information from a text file

    here's my solution:

    124761
  36. Re: ListView error while adding new item

    The error message tells you that lvProductSummary.Items(1) doesn't exist
  37. Replies
    6
    Views
    216

    Re: 32 bit 64 bit Is this necessary?

    You don't need the import.
    Any cpu should work the way you asked for...
    As for frameworks, the earlier frameworks will be more compatible with older systems. Depends which language features you...
  38. Replies
    5
    Views
    222

    Re: Need help with from clause

    this would work though:


    Dim dbStr As String = string.format("SELECT * FROM {0} WHERE {1} = ?", t, c)
    Command = New OleDbCommand(dbStr, Connection)

    Command.Parameters.AddWithValue("@value", v)
  39. Replies
    2
    Views
    162

    VS 2012 Re: Delete first 6 lines in a text file

    IO.File.WriteAllLines("C:\QC_service\outfile.txt", IO.File.ReadAllLines("C:\QC_service\koen.prn").Skip(6).ToArray)
  40. Replies
    41
    Views
    622

    Re: VB.net cannot get the value of textBox

    38 replies, and we're back to step 1:D
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.