Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralRe: Urgent Pin
Abhinav S4-Aug-10 22:51
Abhinav S4-Aug-10 22:51 
QuestionHelp me figure out a Generic Dictionary problem for a game! [modified] Pin
venomation4-Aug-10 13:02
venomation4-Aug-10 13:02 
AnswerRe: Help me figure out a Generic Dictionary problem for a game! Pin
venomation4-Aug-10 14:02
venomation4-Aug-10 14:02 
Question"Not enough storage is available to process this command" Pin
Alan Balkany4-Aug-10 11:05
Alan Balkany4-Aug-10 11:05 
AnswerRe: "Not enough storage is available to process this command" Pin
Yusuf4-Aug-10 11:10
Yusuf4-Aug-10 11:10 
AnswerSOLVED. Pin
Alan Balkany5-Aug-10 5:10
Alan Balkany5-Aug-10 5:10 
Questionevent handling on object in a container from a dll [solved] Pin
Louis-Etienne Chicoine4-Aug-10 10:08
Louis-Etienne Chicoine4-Aug-10 10:08 
AnswerRe: event handling on object in a container from a dll Pin
Luc Pattyn4-Aug-10 11:17
sitebuilderLuc Pattyn4-Aug-10 11:17 
Hi,

1.
this should not be a problem at all; you need to pass the label reference from FabPan() to P_MouseMove(). The easiest way to do that is by turning L into a class member instead of a local variable.

2.
please use PRE tags (e.g. through the "code block" widget) to publish multi-line code snippets. The result is much more readable.

3.
I'm pretty sure your code does not compile as it is. Here are some reasons:
- there seems to be something wrong with the parameter list of PanFab().
- I don't think you can set a BorderStyle for a Panel.

4.
I have lots of comments on your coding style; frankly it is horrible. Here are some points that you should fix:
- having "class", "object" and many more as part of an identifier/name isn't a good idea, as it is either redundant or confusing (e.g. your PanelClass isn't a class, it's a namespace!)
- you should choose better variable names in general, e.g. having both Pan and P is confusing (and local variables by convention aren't TitleCased in C#)
- you should consider making ConstPanel inherit from Panel, and putting everything FabPan does into the constructor. You could still pass parameters to the constructor, however there are some advantages not doing that, besides a Panel has standard properties such as Size, Width, Height, and many more. So I suggest something like:
public class ConstPanel : Panel {
    private Label label;

    public ConstPanel() {
        label = new Label();
        label.Left = 1;
        label.Top = 1;
        label.Text = "allo";
        ...


That way, the button click handler would become:
Height) are public properties; you could turn it into:
private void button1_Click(object sender, EventArgs e) {
    ConstPanel panel = new ConstPanel();
    panel.Size=new Size(100,100);
    this.Controls.Add(panel);
}


As it seems you are very new to all this, I strongly suggest you buy an introductory book on C# and study it. Experimentation is useful, having a book providing solid fundamentals is essential.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


QuestionRegex and Split() usage Pin
JoeSchmoe0074-Aug-10 9:05
JoeSchmoe0074-Aug-10 9:05 
AnswerRe: Regex and Split() usage Pin
Ennis Ray Lynch, Jr.4-Aug-10 9:26
Ennis Ray Lynch, Jr.4-Aug-10 9:26 
GeneralRe: Regex and Split() usage Pin
JoeSchmoe0074-Aug-10 9:28
JoeSchmoe0074-Aug-10 9:28 
GeneralRe: Regex and Split() usage Pin
T M Gray4-Aug-10 9:54
T M Gray4-Aug-10 9:54 
AnswerRe: Regex and Split() usage Pin
T M Gray4-Aug-10 9:42
T M Gray4-Aug-10 9:42 
GeneralRe: Regex and Split() usage Pin
JoeSchmoe0074-Aug-10 9:50
JoeSchmoe0074-Aug-10 9:50 
AnswerRe: Regex and Split() usage Pin
Anurag Gandhi4-Aug-10 19:56
professionalAnurag Gandhi4-Aug-10 19:56 
AnswerRe: Regex and Split() usage Pin
AspDotNetDev5-Aug-10 11:04
protectorAspDotNetDev5-Aug-10 11:04 
GeneralRe: Regex and Split() usage Pin
JoeSchmoe0075-Aug-10 11:16
JoeSchmoe0075-Aug-10 11:16 
QuestionIllegal characters in path. Pin
Vimalsoft(Pty) Ltd4-Aug-10 3:57
professionalVimalsoft(Pty) Ltd4-Aug-10 3:57 
AnswerRe: Illegal characters in path. Pin
Richard MacCutchan4-Aug-10 6:22
mveRichard MacCutchan4-Aug-10 6:22 
GeneralRe: Illegal characters in path. Pin
Vimalsoft(Pty) Ltd4-Aug-10 8:00
professionalVimalsoft(Pty) Ltd4-Aug-10 8:00 
AnswerRe: Illegal characters in path. Pin
DaveyM694-Aug-10 11:58
professionalDaveyM694-Aug-10 11:58 
QuestionBinding Source Issue Pin
spankyleo1234-Aug-10 2:59
spankyleo1234-Aug-10 2:59 
AnswerRe: Binding Source Issue Pin
Ennis Ray Lynch, Jr.4-Aug-10 5:02
Ennis Ray Lynch, Jr.4-Aug-10 5:02 
GeneralRe: Binding Source Issue Pin
spankyleo1234-Aug-10 5:23
spankyleo1234-Aug-10 5:23 
QuestionC#.NET 3.5 Excel 2007 Ribbon Add-in VS 2008 run macro Pin
Wheels0124-Aug-10 2:56
Wheels0124-Aug-10 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.