Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bonzaiholding

@bonzaiholding
About
Posts
49
Topics
28
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Install SQL 2008 r2 express with my application
    B bonzaiholding

    Hi, I have an application in C# that use SQL Server 2008 R2 Express. When i install the package i need to choose option and to install: 1. Microsoft .Net Framework 3.5 SP1. 2. Windows Installer 4.5. 3. Windows PowerShell 1.0 I have an SQL Script that will build my DB at SQL 2008 R2 Express and will add the user configuration that i want. I want to make install package that will include the SQL 2008 R2 Express (including "Microsoft .Net Framework 3.5 SP1.", ,"Windows Installer 4.5" and "Windows PowerShell 1.0 "). Will run the script and install my application. I don't want to let the user to choose configuration for the DB in the installation process. How can i do that? Thanks, Shai.

    Database csharp database question sql-server dotnet

  • Install SQL Server 2008 R2 Express with my installation
    B bonzaiholding

    Hi, I have an application in C# that use SQL Server 2008 R2 Express. When i install the package i need to choose option and to install: 1. Microsoft .Net Framework 3.5 SP1. 2. Windows Installer 4.5. 3. Windows PowerShell 1.0 I have an SQL Script that will build my DB at SQL 2008 R2 Express and will add the user configuration that i want. I want to make install package that will include the SQL 2008 R2 Express (including "Microsoft .Net Framework 3.5 SP1.", ,"Windows Installer 4.5" and "Windows PowerShell 1.0 "). Will run the script and install my application. I don't want to let the user to choose configuration for the DB in the installation process. How can i do that? Thanks, Shai.

    .NET (Core and Framework) csharp database question sql-server dotnet

  • Install SQL Server 2008 R2 Express in one installation file
    B bonzaiholding

    Hi, I have an application in C# that use SQL Server 2008 R2 Express. When i install the package i need to choose option and to install: 1. Microsoft .Net Framework 3.5 SP1. 2. Windows Installer 4.5. 3. Windows PowerShell 1.0 I have an SQL Script that will build my DB at SQL 2008 R2 Express and will add the user configuration that i want. I want to make install package that will include the SQL 2008 R2 Express (including "Microsoft .Net Framework 3.5 SP1.", ,"Windows Installer 4.5" and "Windows PowerShell 1.0 "). Will run the script and install my application. I don't want to let the user to choose configuration for the DB in the installation process. How can i do that? Thanks, Shai.

    C# csharp database question sql-server dotnet

  • Invoke a function every time that a function is been added to my event
    B bonzaiholding

    I want to call to a function every time that a function is add to my Event. How can i do it? Example for this kind of code:

    public delegate void DoItDelegate(int i);
    public partial class Form1 : Form
    {
    public DoItDelegate MyFunction;
    public int Count=0;
    public Form1()
    {
    InitializeComponent();
    //EveryTime that a function been added to this delegate (MyFunction)
    //I want that the counter will be reset to 0 (Counter=0)
    //The client can add a function to MyFunction throw DLL COM and not just in my code.
    //How can i control it and every time reset to Counter to zero?
    RegisterTheNewMethod();
    MyFunction += new DoItDelegate(DoItFunction);
    MyFunction.Invoke(32);
    }

        public void DoItFunction(int i)
        {
            Count++;
            int j = i;
            //Do Domthing
        }
        //I want to call this function every time that a new Function is added to the Event "MyFunction"
        public void RegisterTheNewMethod()
        {
            Count = 0;
            //Do other things as well
        }
    }
    

    Every time that this kind of command (MyFunction += new DoItDelegate(DoItFunction);)is been called and the function is been added to the Event MyFunction i want to invoke some function (In this example RegisterTheNewMethod()). How can i do it?

    C# question com tutorial

  • C# - listen to add/remove function from event
    B bonzaiholding

    how can i know when a function is been added/removed from my Event? I want to do some connection when a COM is add a function to my event.

    public delegate void DoItDelegate(int i);
    ....
    ....
    {
    DoItDelegate MyFunction;

    MyFunction += new DoItDelegate(DoItFunction);

    }

    public void DoItFunction(int i)
    {
    //Do Domthing
    }

    When the command : "MyFunction += new DoItDelegate(DoItFunction); " is been execute i want to do something in another function. What can i do if i want to know when this "MyFunction += new DoItDelegate(DoItFunction);" is execute and register it to Datatable? (The command "MyFunction += new DoItDelegate(DoItFunction);" is in the COM code and not in my code so i can't control it.)

    C# question csharp com

  • Communication between 2 processes by DLL
    B bonzaiholding

    I don't need a lock, i need data,structure and most important is signaling.

    C# question collaboration

  • Communication between 2 processes by DLL
    B bonzaiholding

    1 . What is the best way to set communication between 2 processes on the same computer? (The simplest way because every process will be writen by another company and team). 2. Is there a way that 2 processes will be in Contact through DLL (class with static values, Static function and so on) ? Thanks , Shai.

    C# question collaboration

  • Create dll and use it on runtime
    B bonzaiholding

    Hello, I have a compiled dll that contain class "MyClasses.dll". One of the class is called "class1". In runtime i need to compile a code that used "class1" and i need to used to compile code as dll in the runtime code. How can i do it? Example: 1. MyClasses.dll contain class1. class1 look like this:

    delegate double GetRank(class1 c1);
    public class1
    {
    public double Num1;
    public double Num2;
    public event GetMyRank;
    }

    2. I want to get a string and build a function in rumtime for sorting. for example the user can write n Textbox "Num1*Num2" and then i want to create this function:

    public double GetRank1(class1 c1)
    {
    return c1.Num1*c1.Num2;
    }

    3. Compile and Create dll that contain this function.(GetRank1) 4. In runtime load the dll for exmple "MyDll.dll" 5. Initialize each instance of class1 with the event "GetRank1" for "GetMyRank" event. :

    class1 c1 = new class1();
    ...
    ..
    c1.GetMyRank= new GetRank(MyDll.GetRank1);
    ....

    6. And then i want to compare 2 instance of 'class1' by this function. I Allready try to use CodeDomProvider and CompilerParameters but i need the use the dll "MyClasses.dll" in the CompilerParameters and it does not recognize him: ErrorText: "The type or namespace name 'MyClasses.dll' could not be found (are you missing a using directive or an assembly reference?)" The second problem is how to use to compiled code in my code at runtime. for example: Assembly a = Assembly.GetAssembly(Type.GetType("GetRank1Class")); and then try to call the function GetRank1. How can i solve those problems?

    C# tutorial question algorithms help

  • Key Press Event : ctrl + C
    B bonzaiholding

    Thanks for your help.

    C# question help

  • Key Press Event : ctrl + C
    B bonzaiholding

    Hi, I have a RichTextBox and i want to do something when the user press on the RichTextBox with the combination of the keys : ctrl + 'C'. I created this event :

    private void m_richTextBox1_KeyUp(object sender, KeyEventArgs e)
    {
    if (e.Control && e.KeyData== Keys.C)
    {
    //Do Something
    }
    }

    but when the user press on the keys it's recognize only the 'ctrl' key and not the char 'C'. What is the problem and what should i do? 10X.

    C# question help

  • How can i let the user insert a new values into a combobox inside of datagridview
    B bonzaiholding

    How can i let the user insert a new values into a combobox inside of datagridview? I have datagrigview with columns. One of them contain 5 values that are common and there is a lot of values that the user can insert them by him self. The problem is that if choose Combobox in the datagrid then the user can only choose the values that been insert to item list of the combobox and if i choose textbox then the user can't pick default values by click, just by writing the full name. What can i do if i want the user to possibility to choose or to write new values?

    C# question help

  • Create a delegate at run time
    B bonzaiholding

    Hi, I want to let the user to insert a string that will create a function. I know how to create a class or method at runtime. I have a delegate and I want the function that the user been created will be stored in the delegate event that i use. How can I do it? Specification The user can select the sorted function that he want's(Sort of some system class). He gets a list with this functions for example: 1. Area 2. Length 3. Custom If the user choose Area/length then the list of item that I have (very complex system) will be sorted by Area/Length but if the user choose 'Custom' then I want to show him a new Textbox and then he can write 'Area*Length +COS(Length)'. This is my delegate:

    delegate double GetGrade(SystemD SD);
    GetGrade MyGrade;

    1. Area:

    MyGrade = new GetGrade(AreaGrade);
    public double AreaGrade(SystemD SD)
    {
    return SD.Area;
    }

    2. Length:

    MyGrade = new GetGrade(LengthGrade);
    public double LengthGrade(SystemD SD)
    {
    return SD.Length;
    }

    3. Custom:

    MyGrade = new GetGrade(CustomGrade);
    public double CustomGrade(SystemD SD)
    {
    string str= CustomTextBox.Text;
    double Grade= CompileAndGetDoubleNumber(str,SD); //This is the function that i want to implement.
    // The function that i want gets the string that contain the code for calculation, and SD that represent the system(class instance). It's return the wanted value after the calculation, for example from the string '2*SD.Length+SD.Area' i will get a double that represent the value (2*Length +Area) of SD.
    return Grade;
    }

    I want to get the string from the user and create at runtime a function that can be overload to this event but I need this function before to compilation because then I can not choose the function for the event because the function does not exists. What can I do to resolve this problem?

    C# tutorial question help

  • Let the user write a line code
    B bonzaiholding

    Thanks for all of your answers.

    C# question game-dev

  • Let the user write a line code
    B bonzaiholding

    I have a class with a scientific members in physics. I want to let the user to enter a text in a textbox like "x1+x2*3+x3/4" and i want to calc this values in run-time. (Lets say that i have properties that called "x1", "x2" and "x3".) How can i do it?

    C# question game-dev

  • How can i get the temperature of the cpu?
    B bonzaiholding

    Hi, I need information from the hardware of the system.( for example the CPU temperature.) Anybody know how to get it?

    C# tutorial question hardware

  • Virtual and Override problem
    B bonzaiholding

    Hi, if i have this code:

    interface AInterface
    {
    double GetNum{ get;}
    }

    public class A:AInterface
    {
    int x;

         virtual public double GetNum{
           get
            {
                return x\*10;
            }
           }
    

    }

    public class B:A ,AInterface
    {
    int y;
    override public double GetNum{
    get
    {
    return y*base.GetNum;
    }
    }

    The problem is that if i will write this code:

    B b = new B();
    b.x =2;
    b.y=5;
    print ( B.GetNum.ToString);

    I Have a problem when B call base.GetNum because it calling to him self. What can i do to solve this problem? Thanks for all of your help.

    C# help question

  • What is the best way to create background application?
    B bonzaiholding

    Thanks. I need it to backup files in my system and to sync between some computer in my office.

    C# question performance tutorial

  • What is the best way to create background application?
    B bonzaiholding

    If i want to create an application without any console and without any form that for example: 1. every 20 hours send an email 2. backup some folder or doing anything without the user interaction. 3. Will write a log to a file. 4. will run a process if some event occur. I know that i can make a form application but then i need to mark the form with 0% Opacity. That will take a lot of memory for the process. What is the best way?

    C# question performance tutorial

  • MethodInfo - Get summary - How can i get the methods summary from a method ?
    B bonzaiholding

    Thanks for your answer. I solved the problem in this way: 1. I create New Attribute(MyAttribute) that contain string called "MyFunctionTextHeader". 2. Every method have an MyAttribute :

    [MyAttribute("My function description)")]
    public bool MyFunc(int num)
    {
    ....
    }

    3. when i have "MethodInfo" name mi i write this line:

     string TextHeader = ((MyAttribute)mi.GetCustomAttributes(typeof(MyAttribute), false)\[0\]).MyFunctionTextHeader;
    

    and that solve my problem.

    C# question tutorial

  • MethodInfo - Get summary - How can i get the methods summary from a method ?
    B bonzaiholding

    How can i get the summary info of function by MethodInfo ? If i have inside of class A function that will look like this :

    /// <summary>
    /// This Function check if the number is bigger then 10
    /// </summary>
    /// <param name="num"></param>
    /// <returns></returns>
    public bool CheckItFunc(int num)
    {
    return num > 10;
    }

    I can get Method info by this line :

    System.Reflection.MethodInfo mi = typeof(Class A).GetMethod("CheckItFunc");

    I can get the name of the function by mi.Name for example and i can find a paramather list and more. I there any way to get the summary of a function in runtime? (in this case get the string: " This Function check if the number is bigger then 10") ?? Thanks for all of your answers.

    modified on Thursday, August 20, 2009 9:11 AM

    C# question tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups