Results 1 to 1 of 1
  1. #1
    MyOwn
    MyOwn is offline
    Guest
    Join Date
    2014 Feb
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    how to add Form into Dll

    how to add form into dll and Inject to show form ?
    i trial this code
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace ClassLibrary1
    {
        public class Class1
        {
            System.Windows.Forms.Form Fo = new System.Windows.Forms.Form();
                 public  void Main()
                 {
                     Fo.Show();
    }
                   public  void New()
                         {
                             Fo.Show();
                         }
            public void Form(ref System.Windows.Forms.Form Fr)
            {
                Fo.FormBorderStyle = FormBorderStyle.None;
                Fo.BackColor = System.Drawing.Color.Red;
                Fo.Size = new System.Drawing.Size(224, 268);
                Fr.Controls.Add(Fo);
                Fo.Show();
            }
            public void Items(ref System.Windows.Forms.Form Add)
            {
                System.Windows.Forms.Button btn = new System.Windows.Forms.Button();
                btn.Location = new System.Drawing.Point(34, 105);
                btn.Size = new System.Drawing.Size(40, 20);
                btn.Text = "Button1";
                Add.Controls.Add(btn);
            }
        }
    }
    but not work and remove class , add form not work too i can't Inject it

Similar Threads

  1. [C++] Guys How can Run Form from Dll?
    By MyOwn in forum C/C++
    Replies: 0
    Last Post: 2014-03-01, 09:07 PM
  2. [Help] Doubt in calling form
    By Vitrix Maggot in forum Delphi
    Replies: 2
    Last Post: 2013-11-19, 09:04 AM
  3. [Tutorial] [C++] Form In Dll
    By xByte in forum C/C++
    Replies: 1
    Last Post: 2012-09-07, 11:57 PM
  4. Replies: 1
    Last Post: 2012-01-07, 11:38 PM
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •