Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
GeneralRe: Possible to hide mouse cursor in window that belongs to another program? Pin
Dan Neely24-Oct-08 6:57
Dan Neely24-Oct-08 6:57 
GeneralRe: Possible to hide mouse cursor in window that belongs to another program? Pin
DaveyM6924-Oct-08 5:08
professionalDaveyM6924-Oct-08 5:08 
AnswerRe: Possible to hide mouse cursor in window that belongs to another program? Pin
Giorgi Dalakishvili23-Oct-08 8:57
mentorGiorgi Dalakishvili23-Oct-08 8:57 
GeneralRe: Possible to hide mouse cursor in window that belongs to another program? Pin
vigylant23-Oct-08 9:42
vigylant23-Oct-08 9:42 
Question/define project compiler not being recognized (vstudio 2005) Pin
dwolver23-Oct-08 5:10
dwolver23-Oct-08 5:10 
AnswerRe: /define project compiler not being recognized (vstudio 2005) Pin
Ennis Ray Lynch, Jr.23-Oct-08 7:14
Ennis Ray Lynch, Jr.23-Oct-08 7:14 
QuestionHow to adjust button's location Pin
Sokka9323-Oct-08 5:06
Sokka9323-Oct-08 5:06 
AnswerRe: How to adjust button's location Pin
Simon P Stevens23-Oct-08 5:29
Simon P Stevens23-Oct-08 5:29 
drago123 wrote:
How can I add a button when run time?


You just create the button and add it to the forms Controls collection.
Button b = new Button();
this.Controls.Add(b);

drago123 wrote:
and if there is a button in the form, how can it added next to it? Could you help me,please?


You need to work out the position of the existing button, and position your new button alongside it.
// Set the left position to be the same as the existing button.
int left = existingButton.Left;
// Plus the width of the existing button.
left += existingButton.Width;
// Plus a small gap.
left += 20;

// Set the top of the new button to be the same as the existing button.
int top = existingButton.Top;

// Create the new button.
Button newButton = new Button();

// Assign the left & top values to position the button.
newButton.Left = left;
newButton.Top = top;

// Add the new button to the controls collection.
this.Controls.Add(newButton);
That help?

Simon

GeneralRe: How to adjust button's location Pin
Sokka9325-Oct-08 21:30
Sokka9325-Oct-08 21:30 
Questionsimple DataGridView question. Pin
zaboboa23-Oct-08 4:47
zaboboa23-Oct-08 4:47 
AnswerRe: simple DataGridView question. Pin
Ennis Ray Lynch, Jr.23-Oct-08 5:02
Ennis Ray Lynch, Jr.23-Oct-08 5:02 
GeneralRe: simple DataGridView question. Pin
zaboboa23-Oct-08 5:12
zaboboa23-Oct-08 5:12 
GeneralRe: simple DataGridView question. Pin
Ennis Ray Lynch, Jr.23-Oct-08 5:22
Ennis Ray Lynch, Jr.23-Oct-08 5:22 
Questionsending file through phone line Pin
Jassim Rahma23-Oct-08 4:47
Jassim Rahma23-Oct-08 4:47 
AnswerRe: sending file through phone line Pin
Ennis Ray Lynch, Jr.23-Oct-08 5:01
Ennis Ray Lynch, Jr.23-Oct-08 5:01 
AnswerRe: sending file through phone line Pin
#realJSOP23-Oct-08 6:06
professional#realJSOP23-Oct-08 6:06 
GeneralRe: sending file through phone line Pin
Jassim Rahma23-Oct-08 12:43
Jassim Rahma23-Oct-08 12:43 
GeneralRe: sending file through phone line Pin
Guffa23-Oct-08 14:46
Guffa23-Oct-08 14:46 
Question[2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 4:39
professionalVimalsoft(Pty) Ltd23-Oct-08 4:39 
AnswerRe: [2.0] Service does not Do its Job Pin
Wendelius23-Oct-08 4:48
mentorWendelius23-Oct-08 4:48 
GeneralRe: [2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 20:39
professionalVimalsoft(Pty) Ltd23-Oct-08 20:39 
AnswerRe: [2.0] Service does not Do its Job Pin
Mark Salsbery23-Oct-08 7:57
Mark Salsbery23-Oct-08 7:57 
GeneralRe: [2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 19:40
professionalVimalsoft(Pty) Ltd23-Oct-08 19:40 
GeneralRe: [RESOLVED] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd24-Oct-08 1:50
professionalVimalsoft(Pty) Ltd24-Oct-08 1:50 
GeneralRe: [RESOLVED] Service does not Do its Job Pin
Mark Salsbery24-Oct-08 4:32
Mark Salsbery24-Oct-08 4:32 

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.