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
T

TyronX

@TyronX
About
Posts
48
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Error 998 on Windows API Call
    T TyronX

    Thanks for your Answer but I still get the same Error Message (with your TRACKMOUSEEVENT structure) :/

    C# csharp c++ com json performance

  • Error 998 on Windows API Call
    T TyronX

    The TrackMouseEvent function fails and returns zero. So I called (as msdn advised me) GetLastError() to get the error msg and it returns 998 which means: ERROR_NOACCESS Invalid access to memory location. Has anyone a clue what my OS is trying to tell me here? I guess the error is caused by the c++ struct which the function takes as parameter. ( TRACKMOUSEEVENT Struct on MSDN ) [DllImport("kernel32.dll", SetLastError=true)] static extern int GetLastError (); [DllImport("user32")] public static extern bool TrackMouseEvent(TRACKMOUSEEVENT lpEventTrack); [StructLayout( LayoutKind.Sequential,CharSet=CharSet.Ansi)] public struct TRACKMOUSEEVENT { public long cbSize; public long dwFlags; public long hwndTrack; public long dwHoverTime; } and in the C# App Constructor: TRACKMOUSEEVENT foo = new TRACKMOUSEEVENT(); foo.cbSize = Marshal.SizeOf(typeof(TRACKMOUSEEVENT)); foo.dwFlags = TME_NONCLIENT; foo.hwndTrack = (long)this.Handle; bool bar = TrackMouseEvent(foo); MessageBox.Show(""+GetLastError());

    C# csharp c++ com json performance

  • Evil 'Show Desktop' or drawing on the Desktop?
    T TyronX

    >The Show Desktop Icon (or Winkey+D) always minimizes my form and i couldn't find any way to prevent that. I discoverd that when I click "Show Desktop" that I get the Mesage WM_ACTIVATEAPP which tells me that my app gets deactivated and a thread from the explorer.exe Process gets activated. So far so good, but how do I prevent now that my app gets minimized?

    C# graphics tutorial question

  • Evil 'Show Desktop' or drawing on the Desktop?
    T TyronX

    I coded some kind of electronical Post-it notes and I want to stick them on the Windows Desktop, but how? The Show Desktop Icon (or Winkey+D) always minimizes my form and i couldn't find any way to prevent that. Another Idea would be to directly draw my stuff on the Desktop but I don't know how to register to the OnPaint event of the desktop to redraw my stuff. Thanks a lot in advance.

    C# graphics tutorial question

  • Crashing Code
    T TyronX

    ok thanks.

    C# graphics com question

  • Crashing Code
    T TyronX

    I used http://www.codeproject.com/cs/media/perpxalpha\_sharp.asp to create a non-rectangular window. Then I tried to add a Label Form, but that didn't work (didn't show up). Therefore I thought that this maybe wouldn't be possible when you have a this type of window and tried directly to draw strings in my loaded bitmap: Graphics g = Graphics.FromImage(newBitmap); newBitmap.Dispose(); Font font = this.Font; Brush brush = new SolidBrush(Color.White); g.DrawString("Hallo wie geht es dir?",font,brush, 50,50); g.DrawImage(newBitmap,0,0); bitmap = newBitmap; newBitmap contains the loaded png (with alpha mask) image. The assignment of bitmap seems to crash (System.ArgumentException) because I disposed newBitmap. But why? I however assigned newBitmap again with g.DrawImage...

    C# graphics com question

  • Caption Bar
    T TyronX

    I used the WM_NCLBUTTONDBLCLK Event

    C# question

  • Caption Bar
    T TyronX

    Okay I found the answer for my first question.

    C# question

  • Caption Bar
    T TyronX

    How can i detect if a user has double-clicked the caption bar of a form (which normally causes the window to maximize)? And is there a way to add icons in the upper left corner (left from the quit, maximize and minimize boxes)?

    C# question

  • Multiple Instances
    T TyronX

    After using Mutexes and also implementing FindFindow if hwnd is zero everything works fine, it's even way faster. Thanks a lot!

    C# question

  • Multiple Instances
    T TyronX

    I'm sorry if my comments sound to offensive/overacting. I alway speak a little bit to rough, I'll try better next time :)

    C# question

  • Multiple Instances
    T TyronX

    >You mentioned that your previous attempt didn't work. Were you using a mutex? No, I didn't say that. But indeed I aint using one cause I don't now I which Namespace the Mutex Class is (and yet I was to lazy to serch for that).

    C# question

  • Multiple Instances
    T TyronX

    Weird. My Program doesn't get a message when the window is hidden.

    C# question

  • Multiple Instances
    T TyronX

    What the hell... now it takes 1-2 seconds longer to start up. And btw. your code crashes. It seems to be that some proccess have a read protected process.MainModule Class. If I wrap around a try-catch it works. Thx for the answer

    C# question

  • Multiple Instances
    T TyronX

    I want to avoid, that the user can start multiple instances of my programm. I found an article on CodeProject which helped, but it's a little bit confusing now when the user tries to start the programm and in doesn't start. Therefore I want, that the second instance activates (setting the windowstate to normal, calling Show() and Activate() the first instance (when it's minized or minimized to tray) before it closes itself. How do I do that?

    C# question

  • Poor Points
    T TyronX

    Yes indeed, and everything is explained on MSDN. All my fault :( Actually I tried to convert a string into a point and also tried to sumarize two Points. Well, at least now I know how it works :)

    C# help graphics question

  • simple chat........
    T TyronX

    What you need is a RichTextBox. Read about it on MSDN

    C# help question lounge

  • Poor Points
    T TyronX

    The System.Drawing.Point Class has really a lot of missing Features. It has no TypeConverter and no support for operators like + and -. This is really weak. Is there any possibility to fix that issue? Sure... I could write an own Point class but that one won't be compatible with all the (drawing-)functions like DrawPoly and I don't want to write some ugly conversion code.

    C# help graphics question

  • beginner: reflection help
    T TyronX

    I guess It's like the same as including methods from the user32.dll: [DllImport("user32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Winapi)] private static extern int SendMessage(IntPtr hWnd, int uMsg, int wParam, IntPtr lParam);

    C# game-dev help question learning

  • Extending Classes?
    T TyronX

    Next Question: Can I add something to the Point Class/Structure (I need to add the TypeConverter)?

    C# 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