• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 5 of 5
    1. #1
      Newbie
      Busy
       
      Coding
       
      traderain's Avatar
      Join Date
      Feb 2016
      Posts
      38
      Thanks (-->)
      20
      Thanks (<--)
      3

      DirectX Text draw

      John Kittz
      Hi, I followed Fleep's tutorial about the external crosshair and modified it to my needs. My project is 90% done the only thing left is that I need a way to draw text on screen, If anyone have any idea and can help me please tell me I have been searhing for a way for quite a while. Thanks in advance.

      EDIT: I am using c#
      Last edited by traderain; 02-21-2016 at 10:11 AM.

    2. #2
      Sober linux neb
      High in dem codez
       
      Hacking
       
      Alex's Avatar
      Join Date
      Nov 2015
      Posts
      152
      Thanks (-->)
      10
      Thanks (<--)
      18
      https://www.google.com/search?q=d3d+text+drawing

      Really, googling is so easy to do.
      #KBackForAWhile

    3. Thanks traderain thanked for this post
    4. #3
      Newbie
      Busy
       
      Coding
       
      traderain's Avatar
      Join Date
      Feb 2016
      Posts
      38
      Thanks (-->)
      20
      Thanks (<--)
      3
      yeah, but they are all c++ and most of them, are newer directx versions.
      However I managed to figure out something which works but my app crahes.
      Code:
      An unhandled exception of type 'System.NullReferenceException' occurred in Microsoft.DirectX.Direct3DX.dll
      My method is the following:
      Code:
      using Direct3d = Microsoft.DirectX.Direct3D;
      using Font = System.Drawing.Font;
      then
      Code:
      Font localFont = new Font("Arial", 74, FontStyle.Regular, GraphicsUnit.Point);
                  font = new Direct3d.Font(device, localFont);
      after this a create a method for drawing
      Code:
      private void Draw2Dtext(string text, int x, int y, Color c)
              {
                  font.DrawText(null, text, new Rectangle(x, y, this.Width, this.Height), DrawTextFormat.NoClip, c);
              }
      And between the beginscene and endscene
      Code:
      Draw2Dtext("asd",x,y,Color.Red);
      I found this in some old scanned book: https://books.google.hu/books?id=8Y4...page&q&f=false

    5. #4
      Sober linux neb
      High in dem codez
       
      Hacking
       
      Alex's Avatar
      Join Date
      Nov 2015
      Posts
      152
      Thanks (-->)
      10
      Thanks (<--)
      18
      Quote Originally Posted by traderain View Post
      yeah, but they are all c++ and most of them, are newer directx versions.
      However I managed to figure out something which works but my app crahes.
      Code:
      An unhandled exception of type 'System.NullReferenceException' occurred in Microsoft.DirectX.Direct3DX.dll
      My method is the following:
      Code:
      using Direct3d = Microsoft.DirectX.Direct3D;
      using Font = System.Drawing.Font;
      then
      Code:
      Font localFont = new Font("Arial", 74, FontStyle.Regular, GraphicsUnit.Point);
                  font = new Direct3d.Font(device, localFont);
      after this a create a method for drawing
      Code:
      private void Draw2Dtext(string text, int x, int y, Color c)
              {
                  font.DrawText(null, text, new Rectangle(x, y, this.Width, this.Height), DrawTextFormat.NoClip, c);
              }
      And between the beginscene and endscene
      Code:
      Draw2Dtext("asd",x,y,Color.Red);
      I found this in some old scanned book: https://books.google.hu/books?id=8Y4...page&q&f=false
      https://www.riemers.net/eng/Tutorial...ies2/tut18.php
      IDK anything about C#, so I can't help ya about the crashes
      #KBackForAWhile

    6. #5
      Newbie
      Busy
       
      Coding
       
      traderain's Avatar
      Join Date
      Feb 2016
      Posts
      38
      Thanks (-->)
      20
      Thanks (<--)
      3
      CheatTheGame
      Alright I managed to fix it.
      Code:
      private void DxOverlayFrm_FormClosed(object sender, FormClosedEventArgs e)
              {
                  device.Dispose();
                  font.Dispose();
                  Application.Exit();
              }
      If anyone would have a similar problem here is how I fixed it.

    7. Thanks [GH]Rake thanked for this post

    Similar Game Hacker Threads

    1. [Help] Draw box, text
      By dromenox in forum Assault Cube Hacks
      Replies: 11
      Last Post: 08-25-2015, 11:53 AM
    2. How to draw D3D text on game
      By hack_disgame in forum Hacking Help
      Replies: 1
      Last Post: 08-16-2015, 09:48 AM
    3. D3D9 Draw Text
      By Clarityworld in forum Hacking Help
      Replies: 6
      Last Post: 04-01-2015, 12:06 AM
    4. [Help] Directx menu text
      By Chriko2502 in forum GH Tutorials Help
      Replies: 11
      Last Post: 08-27-2013, 01:24 AM
    5. DirectX Text in hwnd!
      By j3b in forum Hacking Help
      Replies: 5
      Last Post: 07-08-2013, 12:12 PM