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
P

Pedram Behroozi

@Pedram Behroozi
About
Posts
270
Topics
37
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sobre el protocolo DMX 512
    P Pedram Behroozi

    He/She means: [Click][^] :rolleyes:

    I learned something new today

    C#

  • changing final result of compiling
    P Pedram Behroozi

    ariyanna wrote:

    how we can change this result ?

    It completely backs to your compiler. If you're writing C#, the compiler compiles your codes into MSIL (I think), If you're using Java, you have Byte Code after compiling. (Or I couldn't understand you well)

    ariyanna wrote:

    we can do this ?

    I don't think so. There's some converters by the way.

    I learned something new today

    C# question

  • How i check the Ans of objective question using Radio Button
    P Pedram Behroozi

    Yes sure. As Mr. Holmes said, you can have a CC for your questions but not a CC for each one. You can have a CC for all your questions. If I were you, my CC would have a Label and 4 RadioButtons in it and I would set their values with my CC constructor, something like this:

    public myCC (string LabelValue, string[4] questions)
    {
    labelQuestion.Text = LabelValue;
    radiobuttonQuestions.Texts = questions; // You need a loop to do this. It's just a pseudo-code.
    }

    And everytime user clicks on Next button (or something similar) store the result in an array, create a new CC, set its values, show on your form and dispose the previous one. Your memory can breathe in this way :-D I hope I could help :) I learned something new today

    C# question

  • A Critical Error!!
    P Pedram Behroozi

    Have you seen this before? http://blogs.msdn.com/samng/archive/2008/12/24/dynamic-in-c-vii-phantom-method-semantics.aspx[^] :^)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    The Lounge css com tools xml help

  • Custom control's property problem
    P Pedram Behroozi

    Ummm... So you set the ShowThing value to false but when you run your application they're visible? Maybe you changed some values in PropertyBinding or DataBinding. Make sure their values are set to none. I have a UC like you. It has a property named TextMultiLine, here:

    public partial class LabeledTextBox : UserControl
    {
    public bool TextMultiLine
    {
    get { return txtText.Multiline; }
    set { txtText.Multiline = value; }
    }
    }

    And I have no problem with it:

    public partial class frmMain : Form
    {
    public frmMain()
    {
    InitializeComponent();
    LabeldTextBox ltxt = new LabeledTextBox();

        ltxt.TextMultiLine = true; // And it works in runtime and everywhere else
    }
    

    }

    I think your problem is in somewhere else. I hope you can find it :)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# help question

  • Custom control's property problem
    P Pedram Behroozi

    Hi, Unfortunately I couldn't get you. What do you mean by Run It? Or Reopen It? When you create a new instance of a Control (User Controls too) its properties got their default values (I hope I could tell it right).

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# help question

  • Tool to test webpage
    P Pedram Behroozi

    Mekong River wrote:

    tool

    A Chronometer? ;P Just kidding. Here you are.[^]

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    Web Development performance question

  • Add a Property for a UserControls
    P Pedram Behroozi

    Solved Mika and Member 4470354, I think I was changed PropertyBinding, DatBinding or I don't know, something similar... :laugh: I reset the values. Thank you both.

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# css com design tools xml

  • Add a Property for a UserControls
    P Pedram Behroozi

    :( I created two instances of my UC in my Form and when I change the Text value of one of them, both will change! I wrote code below:

    [Browsable(true)]
    public string LabelText
    {
    get { return label1.Text; }
    set { label1.Text = value; }
    }

    I couldn't understand what is the problem, do you have any idea?

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# css com design tools xml

  • Add a Property for a UserControls
    P Pedram Behroozi

    Yes, that's the answer: [Browsable(true)] You made my day, thanks a lot :)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# css com design tools xml

  • Add a Property for a UserControls
    P Pedram Behroozi

    Actually I didn't know from where I should start. I tried constructor but I have error adding UC in my windows form. I defined the Label publicly but I could only access the Label this way: UserControl.Label. I searched MSDN for Property and Attribute but I couldn't find anything yet. Thanks for reply

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# css com design tools xml

  • Add a Property for a UserControls
    P Pedram Behroozi

    Hello all and Happy new Year :) I have a UserControl which contains a Label and a TextBox and I want to set the Label's Text in my main form. I know I can get a string as parameter in UC's constructor or define the Label, publicly. But I wonder if I can set the Text in Design mode. I mean is there any way to add a property for my UC so when I open Properties tab I can see that and change its value? I hope I could explain well. Thanks a lot :)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# css com design tools xml

  • Diference between Using Namespace and Namespace.Class.Method in the code....
    P Pedram Behroozi

    No difference at all. Except without using Using you have to write Namespace.Class.Method everywhere you want to use that method. Hope can help :) [Edit] Also it's worthy to search Using in MSDN.

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    modified on Thursday, December 4, 2008 2:43 AM

    C#

  • A problem with System.Drawing.Drawing2D
    P Pedram Behroozi

    Thanks friend, Helped me a lot :)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# graphics question css com tools

  • A problem with System.Drawing.Drawing2D
    P Pedram Behroozi

    Hi guys, Sorry I'm late, I had a busy day. I got it, thank both of you a lot. I just put all of my code in Pain event and that's work :) Just another question: I want to draw my rectangle by a button in my form, I thought about this kind of code:

    void pictureBox_Pain(object sender, PainEventArgs e)
    {
    if(sender is Button)
    {
    // Code for drawing a rectangle...
    }
    }

    Am I right? Or there's another (faster, better,...) way? Thanks :)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# graphics question css com tools

  • What the hell is this?
    P Pedram Behroozi

    Creahes, Behaviours, An Antivirus named "Antivirus 2009", OMG My PC is in Dangereouus! What a dreamy world...! :doh: :)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    IT & Infrastructure css com algorithms tools xml

  • A problem with System.Drawing.Drawing2D
    P Pedram Behroozi

    Hi everyone, I created an application which simply create a rectangle on a PictureBox, here's the code:

    void DrawRectangle(IntPtr hWnd)
    {
    Rectangle rectSquare;
    GraphicsPath graphPath;
    PathGradientBrush brushSquare;
    Graphics gameGraphics;

    gameGraphics = Graphics.FromHwnd(WinHandle);
    graphPath = new GraphicsPath();
    rectSquare = new Rectangle(100, 100, 100, 100);
    graphPath.AddRectangle(rectSquare);
    
    brushSquare = new PathGradientBrush(graphPath);
    brushSquare.CenterColor = Color.Red;
    brushSquare.SurroundColors = new Color\[\] { Color.Blue };
    
    gameGraphics.FillPath(brushSquare, graphPath);
    

    }

    Also I have a button:

    private void button1_Click(object sender, EventArgs e)
    {
    DrawRectangle(pictureBox1.Handle);
    }

    They're working fine but when I minimize my Form and then restore, the rectangle would disappear! I tried calling DrawRectangle in pictureBox1 Paint event but nothing changed. How can I redraw my rectangle? Thanks.

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# graphics question css com tools

  • What the hell is this?
    P Pedram Behroozi

    Uhmm... Got it. I wonder how could I live with 8 Trojan-Horses in my home! :^)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    IT & Infrastructure css com algorithms tools xml

  • how to use variable form other class? C#
    P Pedram Behroozi

    You're welcome :)

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    C# tutorial csharp question

  • What the hell is this?
    P Pedram Behroozi

    Hi,

    T Pflum wrote:

    I just received the same message only for Antivirus 2008.

    It has a 1-year-license-agreement? :laugh: Actually I clicked nothing, I had to go university and I just shut down my PC! After that I downloaded a free open source firewall named COMODO (from here[^]) and it's fine (It updated right now :) ). It found 8 Trojans in my PC!! X| I don't know if any of these Trojans were cause that problem but since now I didn't get any Such-A-Damn-Thing MessageBox !! and I hope I won't. Thanks.

    I died as a mineral and became a plant, I died as plant and rose to animal, I died as animal and I was Man. Why should I fear? When was I less by dying? -- Rumi[^] My blog

    IT & Infrastructure css com algorithms tools xml
  • Login

  • Don't have an account? Register

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