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
J

jacobjordan

@jacobjordan
About
Posts
54
Topics
21
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • pinvokes from windows service
    J jacobjordan

    I need to have it running no matter who is logged on, or if nobody is logged on. I know there are probably other ways of doing that, but creating a service was the first thing that came to mind. I would love it if you could suggest and easier way.

    One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -Robert Firth

    C# csharp help

  • pinvokes from windows service
    J jacobjordan

    The methods im invoking are GetAsyncKeyState, GetWindowText, and GetForegroundWindow, all of which return values. No exceptions are being thrown when i invoke, only when i run my app as a service they return a value of 0 (since all return either ints, shorts, or intptrs). Obviously the methods aren't being called for some reason.

    One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -Robert Firth

    C# csharp help

  • pinvokes from windows service
    J jacobjordan

    I have a .NET 1.1 (for compatibility reasons) application that runs as a windows service. I have successfully ran it, except the only problem is im not able to invoke methods in the user32 dll i need to call. I have ran the exact same code as a normal process, and this doesn't seem to be happening. Ive also isolated and ran portions of the code just to tell if the invocations were even successful, and they weren't, so i know it's not a problem with my applications code. As far as i can guess running as a service changes some sort of permissions or something that doesn't allow me to invoke these methods. Anyway im not an expert on the windows os, so before i make myself sound even dumber im gonna shut up.

    One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -Robert Firth

    C# csharp help

  • Media Player
    J jacobjordan

    I thought it might be related to media player 12 because i never noticed it until i started using the beta of 7. I believe you have saved many music files on my computer. I take regular backups, so most of the screwed songs i have, but i think there is one or two that are gonna be permanent. Many many thanks. :-D

    One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -Robert Firth

    The Lounge help question

  • Media Player
    J jacobjordan

    Oh my God. Media Player is making me sick. For some sick reason, it keeps cutting off the beginning of my music files (like the first 4 seconds). I already have one song where about 20 seconds is missing off the front. It's not just the way media player is playing it or anything, because i opened the songs in audacity, and it's gone their too. It's also a fresh install of windows, so i can pretty much rule out some weird virus. I already had a problem where media player kept getting the wrong song info from the web and screwing up my songs id3's, so this is my second battle with media player. Pretty soon, all my songs will be like 1 second long. Any idea what could be happening? Anyone? I'm gonna have to stop using Media player or something.

    One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -Robert Firth

    The Lounge help question

  • Any Amusing Bugs Found in Windows 7?
    J jacobjordan

    I've been using windows 7 for about a week, in fact i'm in it right now. I've noticed no bugs yet, and it runs quite fast on my comp. Haven't got anything yet...

    One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -Robert Firth

    The Lounge beta-testing question

  • Get # of items in recycle bin
    J jacobjordan

    lol, Didn't mean it had to be .NET, just had to work in it. Thanks.

    Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

    Visual Basic csharp com tutorial question

  • Get # of items in recycle bin
    J jacobjordan

    Anyone here know how to get the number of items currently in the user's Recycle Bin? Oh, and just to let you know, i'm using .NET 3.0, so it will have to work in that. Edit: almost forgot. If you know how, i would also like something that can return the path to the user's recycle bin, or a function that will empty it. Thanks.

    Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

    modified on Saturday, September 13, 2008 8:06 PM

    Visual Basic csharp com tutorial question

  • Get CPU usage and Ram usage without a PerformanceCounter object
    J jacobjordan

    Um, not what i want. I don't want to get the current process, i want to get the CPU and memory usage. I have no interest in the current process.

    Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

    C# csharp com performance question

  • Get CPU usage and Ram usage without a PerformanceCounter object
    J jacobjordan

    I have attempted to get CPU and RAM usage with a System.Diagnostics.PerformanceCounter, but not only are they a pain in the ass to work with, they don't work the same on different systems. Is there another way to get this information without using a performance counter?

    Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

    C# csharp com performance question

  • Blonde Joke
    J jacobjordan

    Yet another dumb blond joke.

    Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

    The Lounge csharp database sql-server visual-studio sysadmin

  • What exactly does the '@' symbol do in front of a string?
    J jacobjordan

    Ok, thanks. Live and learn.

    void Play() { try { throw Ball(); } catch (Glove) { } finally { Play(); } } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    C# question

  • What exactly does the '@' symbol do in front of a string?
    J jacobjordan

    I have seen some strings formatted like @"Hello World!", or something like that in code i have downloaded on the internet, and i was really wondering what that '@' symbol does. What's the difference between "Hello World!" and @"Hello World!"? Just curious.

    void Play() { try { throw Ball(); } catch (Glove) { } finally { Play(); } } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    C# question

  • Writing to a file at the specified position
    J jacobjordan

    I don't want to append to the end of the file. I want to insert text at X position inside the file.

    void Play() { try { throw Ball(); } catch (Glove) { } finally { Play(); } } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    C# database help

  • Writing to a file at the specified position
    J jacobjordan

    I am trying to make something that will write data to a file at the specified position using the IO.StreamWriter class. Here is what i have

        public static void EncodeData(string Data, string Path, long Index)
        {
            StreamWriter stream = new StreamWriter(Path, true);
            stream.BaseStream.Position = Index;
            stream.Write(Data);
            stream.Close();
        }
    

    Problem is, that throws an exception that says "Unable seek backward to overwrite data that previously existed in a file opened in Append mode.". When i open the file so it's not in append mode, it will write at the specified position, but it will override the entire file. Just to be clear, i want this to insert the data, without overriding anything.

    void Play() { try { throw Ball(); } catch (Glove) { } finally { Play(); } } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    C# database help

  • Pointer help
    J jacobjordan

    Here's my problem. I have this line of code in an unsafe context:

    TreeNode* Current = null;

    it gives me an error that says "Cannot take the address of, get the size of, or declare a pointer to a managed type ("System.Windows.Forms.TreeNode")" The C++ equivalent of that line would be

    System::Windows::Forms::TreeNode *Current = 0;

    and in C++, i can avoid that error by using the '^' operator like so

    System::Windows::Forms::TreeNode^ *Current = 0;

    however, i know little to nothing about C++, and i have no idea what the '^' operator does. If anyone knows a way to implement this in C#, please let me know.

    void Play() { try { throw Ball(); } catch (Glove) { } finally { Play(); } } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    C# help csharp c++

  • Graphing calculator problem (VB.NET)
    J jacobjordan

    A million thanks. I had tried something like that, but it was so complicated and didn't even work. Can't believe it was that simple.

    void Play() { try { throw Ball(); } catch (Glove) { } finally { Play(); } } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    Visual Basic csharp algorithms data-structures help

  • Graphing calculator problem (VB.NET)
    J jacobjordan

    Ok, well i am making a graphing calculator, and it's the simplest part i can't seem to figure out. I have a panel that is 416x416, which the graph will be drawn on. I have variables, xMin, xMax, yMin, yMax, that store the minimum and maximum for the x and y values. Now, the first step in rendering the graph is to draw the X and Y axises, and based on the minimum and maximum of the values will determine where the origin for the graph is. That's what i'm having problem with, i can't seem to generate code that will, in pixels, give the origin for the graph. Right now, the calculator only works if -xMin = xMax = -yMin = yMax, meaning the origin would be in the center of the 416x416 panel, at point (208, 208). If the xMax was twice as much as the -xMin, then the X axis would be 1/4 off of the panels left side. I can't seem to code an algorithm, when passed the xMax, xMin, ect., will return the origin of the graph. It will work with some values, but not all. Please let me know if i have not explained enough.

    void Play() { try { throw Ball(); } catch (Glove) { } finally { Play(); } } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    Visual Basic csharp algorithms data-structures help

  • Drag-and-Drop in VB.NET
    J jacobjordan

    I have never used drag and drop before, and i really have no idea how to do it. I am aware that all controls have an "AllowDrop" property, but i'm not really sure what that means. I also know all controls have drag-drop events, and i am unsure how to use them as well. I could really use some guidance on getting started in this. Let's just say, as an example, if i had a picture box, and when an image file is dragged onto it from explorer, i would want it to display it. Explain how to do something simple like that, and i should be able to figure out the rest. Thanks for any help.

    if (your.Life != lifestyles.Programming) { me.Hate(your.Life) = true; } "Failure is only the opportunity to begin again, this time more wisely." "Don't ask for a light load, but rather ask for a strong back."

    Visual Basic tutorial csharp json help

  • Mouse O Meter
    J jacobjordan

    Did you have to configure it with the mass of the mouse (and that of your hand) and the coefficient of friction between it and the mouse pad?

    You forgot to add in the speed and acceleration of my cursor. And of course, no, it does not ask for any of those things.

    if (your.Life != lifestyles.Programming) { me.Hate(your.Life) = true; } Do not click this link

    The Lounge com data-structures
  • Login

  • Don't have an account? Register

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