Pedram Behroozi
Posts
-
Sobre el protocolo DMX 512 -
changing final result of compilingariyanna 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.
-
How i check the Ans of objective question using Radio ButtonYes 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
-
A Critical Error!!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
-
Custom control's property problemUmmm... 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
-
Custom control's property problemHi, 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
-
Tool to test webpageMekong 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
-
Add a Property for a UserControlsSolved 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
-
Add a Property for a UserControls:( 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
-
Add a Property for a UserControls -
Add a Property for a UserControlsActually 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 replyI 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
-
Add a Property for a UserControlsHello 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
-
Diference between Using Namespace and Namespace.Class.Method in the code....No difference at all. Except without using
Using
you have to writeNamespace.Class.Method
everywhere you want to use that method. Hope can help :) [Edit] Also it's worthy to searchUsing
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
-
A problem with System.Drawing.Drawing2D -
A problem with System.Drawing.Drawing2DHi 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
-
What the hell is this? -
A problem with System.Drawing.Drawing2DHi 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
-
What the hell is this? -
how to use variable form other class? C# -
What the hell is this?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