Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 2.11 seconds.

  1. VS 2019 Re: Append response data to an object

    Looking at the Assets class, it doesn’t make sense to append. Every one of those classes has a distinct ID and values. A List(of Assets) is the best option
  2. VS 2019 Re: Append response data to an object

    Something like this, but everything really depends on the structure of asset…


    while (responseData.asset_events.Count() > 0)
    {
    offset += responseData.asset_events.Count();
    ...
  3. VS 2015 Re: Checks The Informations In Text File. VB.NET

    Try it this way...


    Dim strEmail As String = txtEmail.Text
    Dim Reg As New Regex("^\w+([-_.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$")
    If txtUserName.Text.Trim() = "" Or txtEmail.Text.Trim() = "" Or...
  4. Replies
    8
    Views
    354

    Re: Loading a listbox

    Here's what i meant. Works with any font...


    Imports System.Runtime.InteropServices

    Public Class Form1

    <DllImport("user32.dll")> _
    Private Shared Function SendMessage( _
    ByVal...
  5. Replies
    4
    Views
    239

    VS 2008 Re: WIA Scanning in VB 2008

    What is the count on ScannedImages when you’ve scanned three pages?
  6. Replies
    8
    Views
    354

    Re: Loading a listbox

    @jm it is possible to set tabstops in a listbox (with an API method), to give it the appearance of multiple columns
  7. Replies
    4
    Views
    241

    Re: get days range add

    The Date Class has .AddDays(), and .AddMonths(), so there’s no need to calculate the number of days in 2 months
  8. Re: DataBinding An ObservableCollection(Of string) to a Label

    There's no need for binding. In your code, the property only changes when you set the whole collection. An ObservableCollection(Of String) has its own events you can use...


    Public Class Form1
    ...
  9. Re: vb.net align imported coordinates to an image

    The form paint code will draw your image at 100% no stretching, no compressing.
    If your stored image isn’t 715px*672px, then if that is the size at which all of your coordinates were calculated,...
  10. Re: "modern" Taskbar replacement, without replacing the entire shell.

    This shows how to create a docking taskbar, but not how to use it as a replacement…

    https://www.vbforums.com/showthread.php?540356-vb2005-Scrolling-XML-ticker-tape
  11. Re: vb.net align imported coordinates to an image

    That is the correct overload. A bitmap, and a point

    E.graphics.DrawImage(New BitMap(“path”), New Point(-1,-1))
  12. Re: vb.net align imported coordinates to an image

    That code will draw the unstretched image full size, at the point (top-left) specified
  13. Re: vb.net align imported coordinates to an image

    Compared to what you have now, it probably wouldn't do anything, as i posted, but try this...


    Private Sub Form1_Paint(sender as Object, e as PaintEventArgs) Handles Me.Paint
    ...
  14. Re: vb.net align imported coordinates to an image

    https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.backgroundimagelayout?view=windowsdesktop-6.0

    Set your Form BackgroundImageLayout property to None
  15. Re: vb.net align imported coordinates to an image

    Also, stretching or compressing the image will never have any good results with exact coordinates
  16. Re: vb.net align imported coordinates to an image

    BTW. I’d make the form fixedsingle or fixeddialog.
  17. Re: vb.net align imported coordinates to an image

    You realise that size, ie height and width are the external dimensions of the form?
    Use (in form_load) Me.SetClientSizeCore(exact width in pixels, exact height in pixels)
  18. Re: vb.net align imported coordinates to an image

    I meant loading your full set of buttons with the offset, but if changing your file works for you, do that.
  19. Re: DataBinding An ObservableCollection(Of string) to a Label

    Here’s how to make it work. It’s in c#… There are converters for vb


    public class ViewModel: INotifyPropertyChanged
    {
    public ObservableCollection<string> MembersList { get; set; }

    ...
  20. Re: DataBinding An ObservableCollection(Of string) to a Label

    The problem is that the property isn’t set when an item is added to the collection… But ObservableCollections do raise events when the collection changes…
  21. Replies
    2
    Views
    299

    VS 2010 Re: iterate thru variables by name

    It does :D
    @georgesutfin… check out the sudoku link in my signature for an example
  22. Replies
    9
    Views
    295

    Re: StreamWriter in vb.net

    Thanks for the info...
  23. Thread: Formatting

    by .paul.
    Replies
    8
    Views
    317

    VS 2010 Re: Formatting

    You’ll still need to use a fixed width font, such as Lucida Console
  24. Replies
    9
    Views
    295

    Re: StreamWriter in vb.net

    I'm using 08,12,15,17,19, and 22, though 22 isn't too user friendly on my workstation. I write most of my examples in VB2008 as nearly everyone is using a version that that will work with...
  25. Replies
    9
    Views
    295

    Re: StreamWriter in vb.net

    @jm - Your code also assumes that the user is using >=VS2012
  26. Replies
    8
    Views
    407

    VS 2010 Re: syntax needed

    You can modify my code above...


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    rows = New Button() {Button1, Button2, Button3,...
  27. Replies
    8
    Views
    407

    VS 2010 Re: syntax needed

    Sorry, my mistake...


    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    rowscol(New Button()() {rows, cols})
    End Sub
  28. Replies
    8
    Views
    407

    VS 2010 Re: syntax needed

    Public Class Form1
    Private rows() As Button
    Private cols() As Button

    Private Sub rowscol(ByVal tmparray()() As Button)
    For Each temparray As Button() In tmparray
    ...
  29. Replies
    9
    Views
    295

    Re: StreamWriter in vb.net

    Here's how to append...


    Using sw As IO.StreamWriter = New IO.StreamWriter(Application.StartupPath & "\settings.txt", True)
    sw.WriteLine("LINE 3 ")
    End Using
  30. Re: vb.net align imported coordinates to an image

    If it really is a case that all of your coordinates are off by a uniform amount, it would be easy to use a couple of NumericUpDown controls to align one button manually, then when you’re happy with...
  31. VS 2019 Re: Making a picture box move in a sine wave pattern

    Dim x as Integer = 0
    Private Sub Timer2_Tick(sender as Object, e as EventArgs) Handles Timer2.Tick
    y = Math.Sin(2 * Math.PI * (1 / 0.1) * Timer2.Interval) * Me.Height / 2
    ...
  32. VS 2019 Re: Making a picture box move in a sine wave pattern

    Also your loop counter r is an Integer, not a Double
  33. VS 2019 Re: Making a picture box move in a sine wave pattern

    After moving the picturebox, put
    Me.Refresh
  34. VS 2019 Re: Making a picture box move in a sine wave pattern

    If you want to draw an animated sine wave in your picturebox, why move the picturebox???
  35. VS 2019 Re: Making a picture box move in a sine wave pattern

    You’re not seeing it move because your loop is much faster than your UI can update, so you’re just seeing the last position
  36. VS 2010 Re: Pass parameter to another form within app without opening it

    ??? You mean on Form2?
  37. Re: vb.net align imported coordinates to an image

    Instead of using the image of your circuit board as your backgroundimage, use you form.paint event, and draw the circuit board image at actual size on your form…


    Private Sub Form1_Paint(sender...
  38. Replies
    21
    Views
    664

    VS 2010 Re: Student Exam Analyser

    I probably missed that part. I thought an unanswered question was denoted by a hyphen in place of T or F in the answer string
  39. Replies
    21
    Views
    664

    VS 2010 Re: Student Exam Analyser

    I don’t see why score should ever be decremented, and I don’t see anywhere that you’ve calculated grade???
  40. Replies
    21
    Views
    664

    VS 2010 Re: Student Exam Analyser

    I think you’re making more of it than it is. For students who didn’t answer, an empty studentAnswers string or “——————————“ is equal to 0 points, and how you output that is your choice…
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width