fateh singh


{ City } gurgaon
< Country > india
* Profession * dbms
User No # 70290
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 12
Users Marked my Answers as Wrong # 13
Questions / { fateh singh }
Questions Answers Category Views Company eMail




Answers / { fateh singh }

Question { 9997 }

main()
{
int i,n=010;
int sum=0;
for(i=1;i<=n;i++)
{s=s+i;
}
printf("%d",&s);
getch();
}


Answer

-14

Is This Answer Correct ?    2 Yes 7 No

Question { 9085 }

write a program to create a notepad using common dialog
control and rich text box.


Answer

Private Sub Form_Resize()
RTB1.Width = frmMypad.ScaleWidth
RTB1.Height = frmMypad.ScaleHeight
End Sub

Private Sub mnubold_Click()
If RTB1.SelBold = True Then
RTB1.SelBold = False
Else
RTB1.SelBold = True
End If
End Sub

Private Sub mnubullets_Click()
If RTB1.SelBullet = True Then
RTB1.SelBullet = False
Else
RTB1.SelBullet = True
End If
End Sub

Private Sub mnucenter_Click()
RTB1.SelAlignment = 2
End Sub

Private Sub mnucolor_Click()
CD1.ShowColor
RTB1.SelColor = CD1.Color
End Sub

Private Sub mnucopy_Click()
Clipboard.Clear
Clipboard.SetText (RTB1.SelText)
End Sub

Private Sub mnucut_Click()
Clipboard.Clear
Clipboard.SetText (RTB1.SelText)
RTB1.SelText = ""
End Sub

Private Sub mnudate_Click()
RTB1.SelText = Date
End Sub

Private Sub mnudateandtime_Click()
RTB1.SelText = Now
End Sub

Private Sub mnudelete_Click()
RTB1.SelText = ""

End Sub

Private Sub mnuexit_Click()
End
End Sub

Private Sub mnufonts_Click()
CD1.ShowFont
RTB1.SelBold = CD1.FontBold
RTB1.SelFontSize = CD1.FontSize
RTB1.SelFontName = CD1.FontName
RTB1.SelItalic = CD1.FontItalic

End Sub

Private Sub mnuitalic_Click()
If RTB1.SelItalic = True Then
RTB1.SelItalic = False
Else
RTB1.SelItalic = True
End If
End Sub

Private Sub mnuleft_Click()
RTB1.SelAlignment = 0
End Sub

Private Sub mnunew_Click()
RTB1.Text = ""
frmMypad.Caption = "Mypad-Newfile"
End Sub

Private Sub mnuopen_Click()
CD1.ShowOpen
RTB1.FileName = CD1.FileName
frmMypad.Caption = "Mypad-" & CD1.FileTitle
End Sub

Private Sub mnupaste_Click()
RTB1.SelText = Clipboard.GetText
End Sub

Private Sub mnuprint_Click()
CD1.ShowPrinter
End Sub

Private Sub mnuright_Click()
RTB1.SelAlignment = 1
End Sub

Private Sub mnusave_Click()
CD1.DefaultExt = "Doc"
If frmMypad.Caption = "Mypad-Newfile" Then
CD1.ShowSave
End If
RTB1.SaveFile (CD1.FileName)
frmMypad.Caption = "Mypad-" & CD1.FileTitle
End Sub

Private Sub mnusaveas_Click()
CD1.DefaultExt = "Doc"
CD1.ShowSave
RTB1.SaveFile (CD1.FileName)
frmMypad.Caption = "Mypad-" & CD1.FileTitle
End Sub

Private Sub mnutime_Click()
RTB1.SelText = Time

End Sub

Private Sub mnuunderline_Click()
If RTB1.SelUnderline = True Then
RTB1.SelUnderline = False
Else
RTB1.SelUnderline = True
End If
End Sub

Is This Answer Correct ?    10 Yes 6 No