Post: Visual Studio C# Problem
04-01-2019, 07:04 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I am currently making a tool with multiple Forms.
Form1 = Connect + Attatch & Loads Form2 & Form3
Form1 I am able to do the public static PS3API PS3 = new PS3API();
I also have the PS3Lib.dll and using PS3Lib; & using PS3lib.NET; at the top
All codes on Form1 work

But Form2 & Form3 i cant use them types of things
I type public static PS3API PS3 = new PS3API(); and the PS3API is getting errors as if it dont exist
Now i have all the same as Form1 like PS3Lib.dll and the usings at the top
But the code wont work so i cant move forward in going into things like PS3.CCAPI and things

Form1:
https://prnt.sc/n61sx3
As you can see all is well and working

Form2:
https://prnt.sc/n61u9o
PS3API has errors but everything is the same as Form1 :|

So confused on to why this isnt working for me :|
Any help would mean alot thanks
04-03-2019, 06:16 AM #2
Originally posted by JustAres View Post
I am currently making a tool with multiple Forms.
Form1 = Connect + Attatch & Loads Form2 & Form3
Form1 I am able to do the public static PS3API PS3 = new PS3API();
I also have the PS3Lib.dll and using PS3Lib; & using PS3lib.NET; at the top
All codes on Form1 work

But Form2 & Form3 i cant use them types of things
I type public static PS3API PS3 = new PS3API(); and the PS3API is getting errors as if it dont exist
Now i have all the same as Form1 like PS3Lib.dll and the usings at the top
But the code wont work so i cant move forward in going into things like PS3.CCAPI and things

Form1:
https://prnt.sc/n61sx3
As you can see all is well and working

Form2:
https://prnt.sc/n61u9o
PS3API has errors but everything is the same as Form1 :|

So confused on to why this isnt working for me :|
Any help would mean alot thanks


You should highlight the actual error but i believe it's because of the "static" keyword. A solution would be in your Form2 and Form3 to just use "Form1.PS3." then remove the static PS3API variables in Form 2 and Form 3.

The following user thanked Ludicrous Beach for this useful post:

ProbablyRaging
04-03-2019, 08:33 AM #3
Originally posted by Ludicrous Beach View Post
Originally posted by JustAres View Post
I am currently making a tool with multiple Forms.
Form1 = Connect + Attatch & Loads Form2 & Form3
Form1 I am able to do the public static PS3API PS3 = new PS3API();
I also have the PS3Lib.dll and using PS3Lib; & using PS3lib.NET; at the top
All codes on Form1 work

But Form2 & Form3 i cant use them types of things
I type public static PS3API PS3 = new PS3API(); and the PS3API is getting errors as if it dont exist
Now i have all the same as Form1 like PS3Lib.dll and the usings at the top
But the code wont work so i cant move forward in going into things like PS3.CCAPI and things

Form1:
https://prnt.sc/n61sx3
As you can see all is well and working

Form2:
https://prnt.sc/n61u9o
PS3API has errors but everything is the same as Form1 :|

So confused on to why this isnt working for me :|
Any help would mean alot thanks


You should highlight the actual error but i believe it's because of the "static" keyword. A solution would be in your Form2 and Form3 to just use "Form1.PS3." then remove the static PS3API variables in Form 2 and Form 3.

Thanks for the reply, but i fixed it i was putting the code in the wrong place the whole time but i realised how dumb i was when i fixed it lmao sorry for posting about this Happy

The following user thanked JustAres for this useful post:

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo