Results 1 to 14 of 14
  1. #1
    megamind27's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    1

    K-Relay Plugin GUI

    So I just made a simple plugin which is useful for me.

    Now, I want to keep logs of everything in a GUI.

    So I added a windows form to the project and am using list box.

    I'm kinda stuck on how to populate that list box.

    Also, how do I access the form in the .cs file?

  2. #2
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by megamind27 View Post
    Also, how do I access the form in the .cs file?
    Pretty sure its

    Code:
    Form1.Show()
    And you know to access items in the form its like

    Form1.(item). etc

    So if I had a checkbox it would be

    Form1.Checkbox1.(etc)
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  3. #3
    einaras's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    642
    Reputation
    22
    Thanks
    1,387
    My Mood
    Fine
    Quote Originally Posted by PKTINOS View Post
    Pretty sure its

    Code:
    Form1.Show()
    And you know to access items in the form its like

    Form1.(item). etc

    So if I had a checkbox it would be

    Form1.Checkbox1.(etc)
    Don't you have to create an instance of form beforehand?
    Last edited by einaras; 08-20-2016 at 10:01 AM.

  4. #4
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by einaras View Post
    So I added a windows form to the project and am using list box.
    Oh ya Form1 newform = new Form1();
    so the other code is
    newform.show();
    newform.(etc).(etc)
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  5. #5
    einaras's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    642
    Reputation
    22
    Thanks
    1,387
    My Mood
    Fine
    Dont forget you can make a constructor in other from by adding parameters to Form1 newform = new Form1(); and letting visual sudio light bulb thing do its work.

  6. #6
    megamind27's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    1
    Awesome, thanks for the help guys.

    So for populating a list.

    I can access the listbox inside Form.cs, but is there a way to add things to the listbox from the Plugin.cs?

    For now, I'll just save the data to a txt file then load the txt file to the listbox :P
    Last edited by megamind27; 08-20-2016 at 11:27 AM.

  7. #7
    einaras's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    642
    Reputation
    22
    Thanks
    1,387
    My Mood
    Fine
    Quote Originally Posted by megamind27 View Post
    Awesome, thanks for the help guys.

    So for populating a list.

    I can access the listbox inside Form.cs, but is there a way to add things to the listbox from the Plugin.cs?

    For now, I'll just save the data to a txt file then load the txt file to the listbox :P
    I cant really check atm but if im not mistaking you can make static functions so you can call it from main form (idk if it even has to be static) but basically using same instantce.. so form1.fucntionName(parameters) and create function in second form that adds things to listbox

  8. #8
    megamind27's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    1
    I'm not quite getting it.
    I'll mess around with that some more later. The text file is working well for now.

    Any idea on how to perform an action on the client via button click on the form?
    Probably also using a static function, huh?

    I'm gonna be lazy just to have it working right now. Another text file it is.
    Last edited by megamind27; 08-20-2016 at 12:28 PM.

  9. #9
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by megamind27 View Post
    add things to the listbox from the Plugin.cs?
    Idk I think it is Form1.Listbox1.Items.Add("itemname") but this is without checking.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  10. #10
    megamind27's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by PKTINOS View Post
    Idk I think it is Form1.Listbox1.Items.Add("itemname") but this is without checking.
    Form1.listBox1 is inaccessible to to its protection level

    ?

  11. #11
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    (assuming your variable is called form1 and your listbox is called listbox1)
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  12. #12
    megamind27's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    1
    I think I got it.

    Thanks guys!

  13. #13
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Pretty sure this is solved @Joe, close it my slave.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  14. #14
    Danny's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    9,617
    Reputation
    2835
    Thanks
    3,002
    My Mood
    Aggressive
    Quote Originally Posted by PKTINOS View Post
    Pretty sure this is solved @Joe, close it my slave.
    Staff disrespect, expect a ban

    /closed

    I am not a middleman nor do I buy/sell anything. If you are being contacted by someone off-site from MPGH then it's not me! Please report these to me via PM. Don't be stupid, think first.

Similar Threads

  1. K Relay plugin ideas
    By TheMrNobody in forum Realm of the Mad God Discussions
    Replies: 55
    Last Post: 06-20-2017, 03:04 PM
  2. [Release] K Relay Plugin - Oryx Hears Everything
    By pixelzerg in forum Realm of the Mad God Hacks & Cheats
    Replies: 15
    Last Post: 09-26-2015, 12:05 PM
  3. [Release] K Relay Plugin: Gravity Gun
    By NisuxenZ in forum Realm of the Mad God Hacks & Cheats
    Replies: 24
    Last Post: 08-19-2015, 10:10 AM
  4. [Release] K Relay Plugin: Perfect Bomb
    By NisuxenZ in forum Realm of the Mad God Hacks & Cheats
    Replies: 76
    Last Post: 08-15-2015, 08:39 AM
  5. [Release] K Relay Plugin: Cloak Timer
    By NisuxenZ in forum Realm of the Mad God Hacks & Cheats
    Replies: 20
    Last Post: 06-14-2015, 10:05 PM