Search Results - VBForums

Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.43 seconds.

  1. Re: VB.Net to C# conversion - division by zero discrepancy

    That works but I don't understand why the Division by zero is ignored?
  2. VB.Net to C# conversion - division by zero discrepancy

    I use this code in VB:



    Private Function complexAngle(ByVal p1 As Point, ByVal p2 As Point) As Single
    'p1: x=13,y=62
    'p2: x=13,y=275
    Return CSng(Math.Atan((p1.Y - p2.Y) / (p1.X -...
  3. Re: Need help in getting text from a control in a child window of another program

    try this:



    Private Declare Function SendMessageByString Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As...
  4. VS 2013 Re: Is there anywhere on the Internet a self programmed Win7 Calculator?

    https://code.msdn.microsoft.com/VBNet-Calculator-08065b6b
  5. Re: [RESOLVED] Can't get additional page to print

    ok. I wasn't sure if you were using an offset, expecting it to print one page after another, or not.
  6. Re: Can't get additional page to print

    Try this. It will print the part after the ListView on a different page. You might need to reassess the Y values.



    Public Class Form1

    Private Sub pd_PrintPage(ByVal sender As Object,...
  7. Replies
    6
    Views
    186

    Re: Copy label text to clipboard

    There's a menuitem in the Thread Tools menu to the top right of the OP
  8. Replies
    6
    Views
    186

    Re: Copy label text to clipboard

    dday didn't take into account that your table has 3 rows. His code will give you 27 columns and 1 row...:D
  9. Replies
    6
    Views
    186

    Re: Copy label text to clipboard

    try this:



    Public Class Form1

    Dim firstRow() As Label
    Dim secondRow() As Label
    Dim thirdRow() As Label
  10. Re: Windows Media Player control forcing form back to primary monitor

    Unfortunately that's a quirk I've never seen before, so I can't help with that...
  11. Re: Windows Media Player control forcing form back to primary monitor

    It worked ok when I tested it...
  12. Replies
    2
    Views
    151

    VS 2008 Re: Status Strip item update

    try taking out the autosize lines
  13. Replies
    4
    Views
    209

    VS 2013 Re: LineChart from ListView

    Can you show me what you've tried? Narrowing conversions are where you assign the wrong datatype.
    Try my exact code...
  14. Re: Windows Media Player control forcing form back to primary monitor

    try this:



    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.StartPosition = FormStartPosition.Manual...
  15. Replies
    4
    Views
    209

    VS 2013 Re: LineChart from ListView

    try this:



    Imports System.Windows.Forms.DataVisualization.Charting

    Public Class Form1

    Private Sub btnPlotSWR_Click(ByVal sender As Object, ByVal e As EventArgs) Handles...
  16. Replies
    13
    Views
    313

    Re: [RESOLVED] Embedded resources

    I tested it with both of these True Type Fonts:

    'Amatic_Bold
    'AmaticSC_Regular

    with FontStyle.Regular, then FontStyle.Bold
  17. Replies
    13
    Views
    313

    Re: Embedded resources

    String.Format Method:

    https://msdn.microsoft.com/en-us/library/system.string.format(v=vs.80).aspx
  18. Replies
    13
    Views
    313

    Re: Embedded resources

    it'll be without the .ttf
  19. Replies
    13
    Views
    313

    Re: Embedded resources

    try this:



    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    TextBox1.Font =...
  20. Replies
    13
    Views
    313

    Re: Embedded resources

    you need the exact name of the resource as displayed in My.Resources
  21. Replies
    13
    Views
    313

    Re: Embedded resources

    Have you added them to My.Resources?
    I'm not sure how you mean if not, but that is what that code works with...
  22. Replies
    13
    Views
    313

    Re: Embedded resources

    sorry... I should read more carefully.
    here's how:

    http://zerosandtheone.com/blogs/vb/archive/2009/11/20/vb-net-include-a-font-as-an-embedded-resource-in-your-application.aspx

    the link is to...
  23. Replies
    13
    Views
    313

    Re: Embedded resources

    to use a private font:

    http://stackoverflow.com/questions/19141706/how-to-load-a-font-from-a-file-in-vb-and-c
  24. Re: Help with returning multiple values from a function?

    I like to use the IDE, in conjunction with debugging techniques such as breakpoints, to experiment with ideas and over time develop these ideas into useful programs...
  25. VS 2010 Re: How to sort a .txt file into an array so i can sort it by score

    try this way:

    this is csv.txt:




    Dim lines() As String = IO.File.ReadAllLines("csv.txt")
    Dim names() As String = Array.ConvertAll(lines, Function(s) s.Split(","c)(0))
    Dim scores() As...
  26. VS 2010 Re: How to sort a .txt file into an array so i can sort it by score

    you can't just write:



    Dim classLocation As String
    classLocation = "N:\\My documents\" & className & ".txt"
    Console.WriteLine("You have chosen to organise this by Score")
    Dim score() As...
  27. VS 2010 Re: How to sort a .txt file into an array so i can sort it by score

    can you show me your text file?
  28. VS 2010 Re: Create a Polygon with no Intersecting Lines

    @NinjaNic

    You mean a polygon whose lines only meet at the vertices?
  29. Re: Code Help - Return random values without duplicates

    try this:



    Public Class Form1

    Dim instances As New Dictionary(Of Integer, String())
    Dim r As New Random

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As...
  30. VS 2010 Re: How to sort a .txt file into an array so i can sort it by score

    try this



    'Get each line of the text file that can be converted to an integer and disregard any non integer lines
    Dim contents() As Integer =...
  31. Thread: Using Fileget

    by .paul.
    Replies
    6
    Views
    231

    Re: Using Fileget

    there are similar methods with a FileStream:

    fs.Seek
    fs.Length
  32. VS 2012 Re: Change button color with button names in ComboBox

    try this:



    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ...
  33. VS 2013 Re: Taking time in filling combobox vb.net

    Try calling FillCombos in sub new instead of form_load:



    Public Sub New()

    ' This call is required by the Windows Form Designer.
    InitializeComponent()

    ' Add any...
  34. Thread: Using Fileget

    by .paul.
    Replies
    6
    Views
    231

    Re: Using Fileget

    try this:



    Dim Chunk(3) As Byte
    Dim fs As New IO.FileStream("filename", IO.FileMode.Open)
    fs.Read(Chunk, MyPos, 4)
    Dim chars() As Char = Array.ConvertAll(Chunk, Function(b) Convert.ToChar(b))
  35. Thread: Using Fileget

    by .paul.
    Replies
    6
    Views
    231

    Re: Using Fileget

    FileGet is legacy code, and not recommended in VB.Net
    Try this:



    Dim Chunk(3) As Byte
    Dim fs As New IO.FileStream("filename", IO.FileMode.Open)
    fs.Read(Chunk, MyPos, 4)
    Dim s As String =...
  36. Thread: Setting up Type

    by .paul.
    Replies
    2
    Views
    163

    Re: Setting up Type

    try this:



    Public MyHeader As MyHeaderStruct
    Public Structure MyHeaderStruct
    <VBFixedString(11)> Public Sync As String
    <VBFixedString(2)> Public VersionID As String
    ...
  37. Replies
    15
    Views
    745

    Re: Plotting scaled triangle

    It's ironic that this was the final part of a trigonometry revision (solver with solution steps) tool, and I couldn't work out the trigonometry to plot the triangle...:D
  38. Replies
    4
    Views
    182

    Re: Color.A to HTML/CSS Alpha

    This is an html color: "#C17070"
    The first 2 chars after the # are the Alpha component, which in this case equals: 193



    Private Function alphaValue(ByVal htmlColor As String) As Integer
    ...
  39. Thread: fox vb.net

    by .paul.
    Replies
    4
    Views
    196

    Re: fox vb.net

    Process.Start(filename as string, arguments as string)
  40. Replies
    2
    Views
    138

    Re: how to delete Index.dat

    have a look at this:

    https://social.msdn.microsoft.com/Forums/en-US/05540c04-8e89-45e3-ad6f-4156ed677472/how-to-delete-all-ie-history-in-visual-basicnet?forum=Vsexpressvb
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width