Click here to Skip to main content
15,890,186 members
Home / Discussions / C#
   

C#

 
GeneralRe: Insert Command and access database Pin
Mbah Dhaim14-Sep-08 4:47
Mbah Dhaim14-Sep-08 4:47 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 8:47
Sourie14-Sep-08 8:47 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 8:53
Sourie14-Sep-08 8:53 
GeneralRe: Insert Command and access database Pin
Mbah Dhaim14-Sep-08 11:56
Mbah Dhaim14-Sep-08 11:56 
GeneralRe: Insert Command and access database Pin
Sourie21-Sep-08 8:49
Sourie21-Sep-08 8:49 
Questioncreating real time graphical line chart Pin
yefeng_law13-Sep-08 6:59
yefeng_law13-Sep-08 6:59 
AnswerRe: creating real time graphical line chart Pin
zafersavas13-Sep-08 8:05
zafersavas13-Sep-08 8:05 
QuestionSetting tooltip location Pin
dan!sh 13-Sep-08 6:16
professional dan!sh 13-Sep-08 6:16 
How can I set the tooltip location?
Right now I am setting a big enough tooltip size and then drawing it at desired location. Following is the code I have written.

private void Form1_Load(object sender, EventArgs e) {
  ToolTip oTooltip = new ToolTip();
  oTooltip.OwnerDraw = true;
  oTooltip.Draw += new DrawToolTipEventHandler(oTooltip_Draw);
  oTooltip.Popup += new PopupEventHandler(oTooltip_Popup);
  oTooltip.SetToolTip(this.button1, "text");

}

void oTooltip_Popup(object sender, PopupEventArgs e) {
    e.ToolTipSize = this.Size;

}

void oTooltip_Draw(object sender, DrawToolTipEventArgs e) {
  Graphics oGx = e.Graphics;
  oGx.Clear(this.BackColor);
  oGx.DrawEllipse(Pens.Black, 20, 20, 20, 20);
  oGx.DrawString("text",this.button1.Font,Brushes.Blue,20,20);

}



Somehow I am not too confident about this approach. Is there a better way to achieve this?

"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry

AnswerRe: Setting tooltip location Pin
Mohammad Dayyan13-Sep-08 12:35
Mohammad Dayyan13-Sep-08 12:35 
GeneralRe: Setting tooltip location Pin
CSharpByDesign6-Dec-10 11:28
CSharpByDesign6-Dec-10 11:28 
QuestionMade a functional program - just not for friends Pin
Uri9113-Sep-08 5:40
Uri9113-Sep-08 5:40 
AnswerRe: Made a functional program - just not for friends Pin
Steven A. Lowe13-Sep-08 16:06
Steven A. Lowe13-Sep-08 16:06 
GeneralRe: Made a functional program - just not for friends Pin
Uri9113-Sep-08 22:14
Uri9113-Sep-08 22:14 
GeneralRe: Made a functional program - just not for friends Pin
Anthony Mushrow14-Sep-08 0:49
professionalAnthony Mushrow14-Sep-08 0:49 
GeneralRe: Made a functional program - just not for friends Pin
Uri9114-Sep-08 8:12
Uri9114-Sep-08 8:12 
QuestionWhat is persistent object and transient object ? Pin
dataminers13-Sep-08 5:40
dataminers13-Sep-08 5:40 
AnswerRe: What is persistent object and transient object ? Pin
Mbah Dhaim13-Sep-08 7:20
Mbah Dhaim13-Sep-08 7:20 
Questionto read word document with images and tables and paste it in a string control Pin
sshakti13-Sep-08 4:28
sshakti13-Sep-08 4:28 
AnswerRe: to read word document with images and tables and paste it in a string control Pin
Dave Kreskowiak13-Sep-08 5:21
mveDave Kreskowiak13-Sep-08 5:21 
AnswerRe: to read word document with images and tables and paste it in a string control Pin
Mohammad Dayyan13-Sep-08 12:43
Mohammad Dayyan13-Sep-08 12:43 
QuestionQuestion System.StackOverflowException problem. Pin
hdv21213-Sep-08 3:32
hdv21213-Sep-08 3:32 
AnswerRe: Question System.StackOverflowException problem. Pin
Dave Kreskowiak13-Sep-08 5:20
mveDave Kreskowiak13-Sep-08 5:20 
GeneralRe: Question System.StackOverflowException problem. [modified] Pin
hdv21213-Sep-08 6:16
hdv21213-Sep-08 6:16 
GeneralRe: Question System.StackOverflowException problem. Pin
Dave Kreskowiak13-Sep-08 7:13
mveDave Kreskowiak13-Sep-08 7:13 
GeneralRe: Question System.StackOverflowException problem. Pin
hdv21213-Sep-08 7:24
hdv21213-Sep-08 7:24 

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.