User Profile

Collapse

Profile Sidebar

Collapse
alex21
alex21
Last Activity: Mar 12 '10, 11:01 PM
Joined: Oct 25 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • alex21
    started a topic Why did VB Break?

    Why did VB Break?

    My program was working fine a few days ago, I opened my project today to do some more work and i got this error.

    Code:
    Error	1	Overload resolution failed because no accessible 'Format' can be called with these arguments:
        'Public Shared Function Format(provider As System.IFormatProvider, format As String, ParamArray args() As Object) As String': Expression does not produce a value.
        'Public Shared Function Format(provider
    ...
    See more | Go to post

  • There is not really a method i can go through, as it is a inbuilt control, when it scrolls it just throws an exception and i don't know a way to look at its base methods.
    See more | Go to post

    Leave a comment:


  • alex21
    started a topic Wierd exception from DataGridView, why?

    Wierd exception from DataGridView, why?

    Ok im getting this exception from a DataGridView control in my program.

    Code:
    System.ArgumentOutOfRangeException was unhandled
      Message="Value of '132' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.\r\nParameter name: Value"
      Source="System.Windows.Forms"
      ParamName="Value"
      StackTrace:
           at System.Windows.Forms.ScrollBar.set_Value(Int32
    ...
    See more | Go to post

  • How do you display progress using a progress bar of the WebClient.DownloadString()?

    I want to display the progress of the WebClient.Downl oadString() method using a progress bar?

    Anyone know?

    Thanks Alex.
    See more | Go to post

  • Nah same result... any other ideas?

    thanks
    See more | Go to post

    Leave a comment:


  • Cannot detect newline character in string downloaded from the internet.

    The string is coming from this url, http://www.elixirwd.com.au/test.php

    The Username and Password for this url is,
    Username:user
    Password: password

    Now simply downloading the data using the WebClient classes DownloadString( ) method the below code will not work.

    Code:
    If FileContents.Contains(ControlChars.NewLine) Then
                MessageBox.Show("Has newline!")
            End
    ...
    See more | Go to post

  • How can you easily check the http error number of a webclient?

    I'm trying to detect the http status number such as (401 Unauthorized) from a 'WebException' when a WebClient in my code fails.

    Code:
    Public Function DataSources_ValidURL() As Boolean
            Dim TestClient As New WebClient()
            TestClient.BaseAddress = DataSources_FilePath
            Try
                TestClient.DownloadString(DataSources_FilePath)
            Catch ex As WebException
                If
    ...
    See more | Go to post

  • yeah as soon as it hits the newline i want it to send, however the function doesn't end and this is the problem.

    Thanks
    See more | Go to post

    Leave a comment:


  • Nah there are many newline characters before the end of the stream, and filecontents.Le ngth - 1 prevents an IndexOutofRange exception which i would get if i removed the - 1.

    And i know the newline characters are there as i can use them to manipulate the string, such as filecontents.Sp lit(ControlChar s.NewLine) will split the string in the correct places.

    My only explanation is the way i am reading characters one by one,...
    See more | Go to post

    Leave a comment:


  • Strange that most companies don't offer xml, sigh.

    thanks
    See more | Go to post

    Leave a comment:


  • Detecting NewLine characters in a string.

    I am trying to write a function for determining the data type of columns in a delimited file.

    However my function is not detecting a newline and exiting the loop after the end of the first line.

    * 'del_2' is equal to a new line character, i have tested this using a small bit of code

    Code:
    if del_2 = ControlChars.NewLine then
      MessageBox.Show("It is a newline")
    end if
    ...
    See more | Go to post

  • Yeah thats the problem though CSV stands for comma separated but it can also be tab separated and bar separated etc.

    And the ones that come in .txt format are also usually separated by one of the above.

    And some come with a header of some sort specifying a title and data where others do not. Some also specify column headers where others do not.

    But my goal is to make my application be able to manipulate...
    See more | Go to post

    Leave a comment:


  • Whats the easiest way to write and engine for importing files of common formats?

    I am writing an application where data can be gathered from many different places and graphed against other data. However the data from all the different places is coming in different formats such as .csv, .txt and some others i can't recall right now.

    So i am wondering what is the easiest way to allow my program to import the data supplied in these different formats?

    Thanks Alex.
    See more | Go to post

  • alex21
    replied to Creating A Packet Filter.
    Some More Info

    I made some changes and now it does a tiny bit of what it is supposed to do.

    Code:
    public static class PacketFilter
        {
            static int BufferSize = 4096;
    
            static Server RedirectToServer;
    
            static bool ConnectingToClient = false;
            static Socket ClientConnection;
            static byte[] RecievedFromClient = new byte[BufferSize];
    ...
    See more | Go to post

    Leave a comment:


  • alex21
    started a topic Creating A Packet Filter.

    Creating A Packet Filter.

    Ok i have never before tried networking in my programming, so this is the first time i have tried anything like this. But i am trying to make an application which acts as a medium between a server and client, originally the client would communicate directly to the server, but in this case i am trying to filter the packets and remove the ones i don't want. So i created a packet filtering class, which accepts a connection from the client, and connects...
    See more | Go to post

  • alex21
    replied to Avoiding "enumeration modified" Exception
    Its a multi thread program, which primarily operates in system memory but uses a database to communicate and synchronize with other instances of the program over the network, so the thread that is synchronizing system data with the database is modifying the dictionary I'm trying to find a unique id for, and to prevent duplicate id's from this i give each client a 2 character id prefix such as "aa".

    i managed to fix this problem...
    See more | Go to post

    Leave a comment:


  • alex21
    started a topic Avoiding "enumeration modified" Exception

    Avoiding "enumeration modified" Exception

    For my program i need a great deal of completely random, unique, 12 character id's.

    So i wrote these three functions

    Code:
     
    public static string GiveUniqueID(IEnumerator id_key, int count)
    {
    string id = "";
    bool done = false;
    while (!done)
    {
    id = CreateUniqueID(id_key, count);
     
    if (id != "@@@")
    done = true;
    }
     
    return id;
    ...
    See more | Go to post
    Last edited by Frinavale; Jan 9 '09, 03:13 PM. Reason: Moved to C# from .NET

  • C# Linq Query "Error 2 Cannot implicitly convert type"

    Ok i am trying to use a Linq query to access a dictionary.

    Code:
    public static Dictionary<string, Client> Clients = new Dictionary<string, Client>();
    Using this Linq query:
    Code:
    IEnumerable<Staff> loginquery = from staff in Database.Staff where staff.Value.Passcode == txt_password.Text select staff;
    but i get the error
    Code:
    Error    2    Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Client_Care.Classes.DB_Classes.Staff>>'
    ...
    See more | Go to post
    Last edited by Frinavale; Jan 16 '09, 03:28 PM. Reason: Moved to C# from .NET

  • alex21
    started a topic ObjectDisposedException On Application.Run()
    in .NET

    ObjectDisposedException On Application.Run()

    Hello,
    I have been trying to get my application to try and load config in from an xml file, however i want it to bring up a config window if it fails to load the configuration. However when i close the form used in Program.cs/Application.Run (new Form()) and try to open the config form the program crashes because the Application.Run () loop is still looking for the main form, i have tried a few things like Application.Run () without arguments...
    See more | Go to post
    Last edited by Plater; Oct 27 '08, 01:30 PM. Reason: line breaks are your friend
No activity results to display
Show More
Working...