Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
O

obelisk29

@obelisk29
About
Posts
55
Topics
23
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using DirectSound from a console [modified]
    O obelisk29

    Hi, To be able to playback Wav MemoryStreams from a console I have to call this function

    ApplicationDevice = new Device();
    ApplicationDevice.SetCooperativeLevel(NEED_POINTER_TO_CONSOLE, CooperativeLevel.Normal);

    I have tried calling

    [DllImport("kernel32")]
    static extern IntPtr GetConsoleWindow();

    to get the a pointer to the console, but it doesn't work. The CTOR takes either a Control like a Form or a IntPtr. Please help me. TIA ------------------ I'm naked under my clothes... -- modified at 19:10 Saturday 20th May, 2006

    C# help

  • Socket.Select() Bug?
    O obelisk29

    Hi am writing a chat server and I was stress testing my server and found some errors. Say I have an arraylist. ArrayList sockets = new ArrayList(listOfSockets); Now I call Socket.Select to take out the sockets that don't have data on them. Socket.Select(sockets, null, null, 100000000); This is where the error happens, if I pass in a ArrayList that has 65 sockets in it. It causes a IndexOutOfRangeException to happen. I have tried using other ways of doing it and it causes different errors but it always happens when it reaches 65 sockets. I am dumbfounded please help. ------------------ I'm naked under my clothes...

    C# help sysadmin testing beta-testing question

  • Sockets and ArrayLists
    O obelisk29

    Hi am writing a chat server and I was stress testing my server and found some errors. Say I have an arraylist. ArrayList sockets = new ArrayList(listOfSockets); Now I call Socket.Select to take out the sockets that don't have data on them. Socket.Select(sockets, null, null, 100000000); This is where the error happens, if I pass in a ArrayList that has 65 sockets in it. It causes a IndexOutOfRangeException to happen. I have tried using other ways of doing it and it causes different errors but it always happens when it reaches 65 sockets. I am dumbfounded please help. ------------------ I'm naked under my clothes...

    C# help sysadmin testing beta-testing lounge

  • Hiding a DataColumn in a DataGrid
    O obelisk29

    How do I hide a DataColumn in a Datagrid? TIA ------------------ I'm naked under my clothes...

    C# question

  • Jinx jinx jinx jinx aaaarrrggghhhh
    O obelisk29

    Um I think you got screwed... what rebel fighting is there, and plus most of the environmentalists talk doggy-doo they said that there was a shortage of elephants in zimbawbe when there are over 90,000 elephants JUST in zimbawbe. Personally I think you're getting it up the rear. Oh yea I was born in Africa and go there regularly to hunt. Hunters do more conservation than environmentalists:-D ------------------ I'm naked under my clothes...

    The Lounge help wcf adobe xml tutorial

  • This is Freaky
    O obelisk29

    lol my grandma sent it to me hehehe Glad that we could clear it up =) ------------------ I'm naked under my clothes...

    The Lounge question

  • This is Freaky
    O obelisk29

    This is something to think about! Since America is typically represented by an eagle. Saddam should have read up on his Muslim passages... The following verse is from the Quran, (the Islamic Bible) Quran (9:11) -- For it is written that a son of Arabia would awaken a fearsome Eagle. The wrath of the Eagle would be felt throughout the lands of Allah and lo, while some of the people trembled in despair still more rejoiced; for the wrath of the Eagle cleansed the lands of Allah; and there was peace. Note the verse number!!!!! It is 9:11 lol.. I just got this in my e-mail I was wondering if it was true?:omg: ------------------ I'm naked under my clothes...

    The Lounge question

  • CSC Error
    O obelisk29

    Hi ive been using windows 2000 to develop c# applications using VS 2002. I recently moved to windows xp without an error until today. Everytime i try to build ANY project it gives me this error like "'C:\DOCUME~1\OBELIS~1\LOCALS~1\Temp\CSC33.tmp' is not a valid Win32 resource file". I have looked for this file and it isn't there now I know im not using it in any way shape or form. TIA This is really frustrating please help... ------------------ I'm naked under my clothes...

    Visual Studio help csharp visual-studio learning

  • Um.... Long Day Help
    O obelisk29

    How do I put this "( ) - " in a textBox lol..... ------------------ I'm naked under my clothes...

    C# help question

  • closing the main form after loading another form
    O obelisk29

    Every form you create acts just like a class would so you could just do.

    MySecondForm form = new MySecondForm();
    form.Show();
    this.Dispose();

    The 'this' keyword refers to the object you're form is derived from including all of the custom objects and functions you have put in. You could also just say 'Dispose();' instead of 'this.Dispose();' but for keeping clarity it's better to use the this keyword. You could also say 'this.Hide();' but then it keeps that form in memory which when you're dealing with multiple forms this could eat up your memory pretty quickly. I just take my forms out of memory when I don't need them. ------------------ I'm naked under my clothes...

    C# help

  • Calling Managed C++ code in a C# App
    O obelisk29

    Just reference it like you would if you were calling your c# code in a dll. Every .NET language compiles down to the same basic construct which is IL. ------------------ I'm naked under my clothes...

    C# csharp c++ help tutorial

  • How to referenc functions in other code file
    O obelisk29

    On your ReverseText Function put it as

    public string ReverseText(string s)
    {
    //code here
    }

    This is because the C# Compiler marks it as private(thus only allowing it to be accessed by the same class it's in) if you don't specify an access modifier. Other modifiers are protected virtual abstract private public Look up these modifiers on codeproject for more info =) ------------------ I'm naked under my clothes...

    C# tutorial question

  • managing Deletes and Backspaces
    O obelisk29

    I am writing a textbox validator control how would I check to see if the person presses the backspace button and the delete button and then tell windows not to process those messages as I will do it all myself ------------------ I'm naked under my clothes...

    C#

  • Same code running slower second time
    O obelisk29

    WOW I figured it out I just put

    dg.DataSource = null;

    before it exeutes and it fixed it. somehow when you put a datatable into a datagrid whenever you add back to the datatable it is SLOW. hope this helps some people who come across this as well =) ------------------ I'm naked under my clothes...

    Database database sql-server sysadmin

  • Second Time Slow Code
    O obelisk29

    Thanks for the advice in the naming schema... As for the SP, when I was timing the differences I used the same SP executed one right after the other ------------------ I'm naked under my clothes...

    C# csharp database sql-server sysadmin

  • Same code running slower second time
    O obelisk29

    This is my stored proc

    CREATE PROCEDURE dbo.SPSearchRmiInfoLastname
    (
    @Lastname varchar(50)
    )
    AS
    select * from RmiInfo where Lastname like @Lastname+'%' order by Lastname

    GO

    ------------------ I'm naked under my clothes...

    Database database sql-server sysadmin

  • Second Time Slow Code
    O obelisk29

    Hello I am using Sql Server 2000 Developer Edition, Now I know there are limitations too how many connections you have BUT This piece of code below executes a whole lot slower the second time you run it.

    switch(cbSearch.SelectedItem.ToString())
    {
    	case "Lastname":
    		cmd = new SqlCommand("SPSearchRmiInfoLastname", conn);
    		cmd.CommandType = CommandType.StoredProcedure;
    	        cmd.Parameters.Add("@Lastname", txtSearch.Text);
    	        break;
    	case "Firstname":
    	        cmd = new SqlCommand("SPSearchRmiInfoFirstname", conn);
                    cmd.CommandType = CommandType.StoredProcedure;	
                    cmd.Parameters.Add("@Firstname", txtSearch.Text);
    	        break;
    }
    conn.Open();
    Search.Clear();
    
    SqlDataReader drd = cmd.ExecuteReader();
    while(drd.Read())
    {
    	Search.Rows.Add(new object\[\] {drd\[0\], drd\[1\], drd\[2\], drd\[3\]});
    	sbp.Text = Search.Rows.Count+" records found.";
    }
    dg.DataSource = Search;
    
    drd.Close();
    conn.Close();
    

    The results are staggering. First time: 1783 Milliseconds Second time: 150326 Milliseconds HOLY SHAZBOT!! Now that's a difference right there, Any ideas on why this is happening and how I can change it Thanks, Obe NOTE: I already posted this in the Sql/ADO/ADO.NET Section but it has todo with C# as well ------------------ I'm naked under my clothes...

    C# csharp database sql-server sysadmin

  • Same code running slower second time
    O obelisk29

    Hello I am using Sql Server 2000 Developer Edition, Now I know there are limitations too how many connections you have BUT This piece of code below executes a whole lot slower the second time you run it.

    switch(cbSearch.SelectedItem.ToString())
    {
    	case "Lastname":
    		cmd = new SqlCommand("SPSearchRmiInfoLastname", conn);
    		cmd.CommandType = CommandType.StoredProcedure;
    	        cmd.Parameters.Add("@Lastname", txtSearch.Text);
    	        break;
    	case "Firstname":
    	        cmd = new SqlCommand("SPSearchRmiInfoFirstname", conn);
                    cmd.CommandType = CommandType.StoredProcedure;	
                    cmd.Parameters.Add("@Firstname", txtSearch.Text);
    	        break;
    }
    conn.Open();
    Search.Clear();
    
    SqlDataReader drd = cmd.ExecuteReader();
    while(drd.Read())
    {
    	Search.Rows.Add(new object\[\] {drd\[0\], drd\[1\], drd\[2\], drd\[3\]});
    	sbp.Text = Search.Rows.Count+" records found.";
    }
    dg.DataSource = Search;
    
    drd.Close();
    conn.Close();
    

    The results are staggering. First time: 1783 Milliseconds Second time: 150326 Milliseconds HOLY SHAZBOT!! Now that's a difference right there, Any ideas on why this is happening and how I can change it Thanks, Obe ------------------ I'm naked under my clothes...

    Database database sql-server sysadmin

  • Custom Component Functions
    O obelisk29

    Hello how do you have a blue button in the property's page that links to a function in your component (eg: The blue button that says 'Generate Dataset' on the DataAdapter object) TIA Obe ------------------ I'm naked under my clothes...

    C#

  • Parsing a .dbf file
    O obelisk29

    Just use ADO ------------------ I'm naked under my clothes...

    Database c++ database com json question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups