Methods not found!

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

guru

Coder
Full Member
Nobleman
Jun 8, 2012
115
673
1
Hi,

I am trying to get a window working in C#. Just I set style for the forms which is saying as
"System.Windows.Forms.Form.SetStyle is not found".

Even though it might be a warning and don't see a noticeable difference in output! I need to know the reason for method not found. Would it affect any other property in my form applications? These are the code that generate this warning. Would be glad to know the reason :)!
C++:
            this.SetStyle(System.Windows.Forms.ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(System.Windows.Forms.ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(System.Windows.Forms.ControlStyles.UserPaint, true);
            this.SetStyle(System.Windows.Forms.ControlStyles.Opaque, true);
 

Helios

Coder
Meme Tier VIP
May 24, 2012
207
1,113
4
I don't quite understand what you're trying to do?
I added the code to the form load and I got no errors, so what is the expected result?
 

guru

Coder
Full Member
Nobleman
Jun 8, 2012
115
673
1
Actually, they are not errors! They are just warnings! Why didn't you understand that code? I using it in form designer to get the required style.
 

guru

Coder
Full Member
Nobleman
Jun 8, 2012
115
673
1
And one more problem!

I got the rect of the target window using GetClienRect(hwnd,out r) where r is the rect defined by me in the program. Which function should I use to set the form size to that rect of my target window?
1. setBounds
2. setDesktopBounds
3. setBoundsCore
4. setClientSizeCore

or any other function? I am trying to create an overlay with forms.
 

Helios

Coder
Meme Tier VIP
May 24, 2012
207
1,113
4
Actually, they are not errors! They are just warnings! Why didn't you understand that code? I using it in form designer to get the required style.
Well, I didn't get any warnings either. What I didn't understand was what you were saying.

And one more problem!

I got the rect of the target window using GetClienRect(hwnd,out r) where r is the rect defined by me in the program. Which function should I use to set the form size to that rect of my target window?
1. setBounds
2. setDesktopBounds
3. setBoundsCore
4. setClientSizeCore

or any other function? I am trying to create an overlay with forms.
I haven't worked with this stuff or researched it, so I wouldn't know, but why don't you have a look at Fleeps crosshair tutorial?
 

guru

Coder
Full Member
Nobleman
Jun 8, 2012
115
673
1
Actually I got it almost working? There are two problems yet to be solved.

1. Getting a form exactly as the target window
2. positioning the form correctly over the window

And I will have a look at the tutorial.
 

guru

Coder
Full Member
Nobleman
Jun 8, 2012
115
673
1
I got it! The functions GetWindowPos and setbound from user32.dll and forms property respectively solved the problem.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods League of Legends Accounts