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

C#

 
AnswerRe: Asimple way to print a DataGridView content? Pin
Giorgi Dalakishvili25-Sep-08 20:41
mentorGiorgi Dalakishvili25-Sep-08 20:41 
GeneralRe: Asimple way to print a DataGridView content? Pin
Sourie26-Sep-08 6:45
Sourie26-Sep-08 6:45 
QuestionTwo abstract class with same function name Pin
.NET- India 25-Sep-08 19:36
.NET- India 25-Sep-08 19:36 
AnswerRe: Two abstract class with same function name Pin
Giorgi Dalakishvili25-Sep-08 20:41
mentorGiorgi Dalakishvili25-Sep-08 20:41 
QuestionNeed integration with MarketSmart? Pin
fmlove25-Sep-08 19:21
fmlove25-Sep-08 19:21 
QuestionPersonal Grading System Pin
myraesparar25-Sep-08 17:56
myraesparar25-Sep-08 17:56 
AnswerRe: Personal Grading System Pin
Colin Angus Mackay25-Sep-08 18:30
Colin Angus Mackay25-Sep-08 18:30 
QuestionBeginner Questions Pin
Rodziel25-Sep-08 17:16
Rodziel25-Sep-08 17:16 
My first question is about context menu. I was unable to find a way to make it work with form1 so I used this:
private void Form1_MouseClick(object sender, MouseEventArgs e)
{

    if (e.Button == MouseButtons.Right)
    {
        panel1.ContextMenu.Show(panel1, new Point(e.X, e.Y));
    }
}

However i was also using
private const int WM_NCHITTEST = 0x84;
private const int HT_CLIENT = 0x1;
private const int HT_CAPTION = 0x2;

protected override void WndProc(ref Message m)
{
    base.WndProc(ref m);

    if (m.Msg == WM_NCHITTEST && m.Result.ToInt32() == HT_CLIENT)
    {
        m.Result = (IntPtr)HT_CAPTION;
    }

}

protected override CreateParams CreateParams
{
    get
    {
        int WS_DLGFRAME = 0x00400000;
        CreateParams parameters = base.CreateParams;
        parameters.Style = parameters.Style & ~WS_DLGFRAME;
        return parameters;
    }
}
to drag form around. So I need one of these things: to drag form by panel or to make panel send mousedown to form or a way to show context menu strip by clicking on form1.

Second question is about form border style. I have already removed control box and now I'd like to make border invisible as well. For now, border is set to sizable and I need a way to either make sizable border transparent or find a way to resize form without border.

Third question is about anchoring. When I resize form the textbox(anchor set to all 4 sides) stretches by the same amount as the form instead of staying in original proportion to the form. How do I go about fixing this?

Fourth question. I plan to use the app I'm building for reading of various text/html documents. I thought of using richtextbox, however it doesn't allow transparent background. I looked at Alpha blended textbox and related articles and it looks too complex for my skill level. So since I plan to use it only for reading and not editing is there an easier way to do this?

Fifth question. How to make form snap to screen edge(any side)?

Any answer to these questions is much appreciated.
AnswerRe: Beginner Questions Pin
c242326-Sep-08 0:23
c242326-Sep-08 0:23 
QuestionRe: Beginner Questions [modified] Pin
Rodziel26-Sep-08 12:29
Rodziel26-Sep-08 12:29 
AnswerRe: Beginner Questions Pin
c242328-Sep-08 21:35
c242328-Sep-08 21:35 
QuestionSave Solution to different folder Pin
upsfeup25-Sep-08 15:53
upsfeup25-Sep-08 15:53 
AnswerRe: Save Solution to different folder Pin
Steve Echols25-Sep-08 19:07
Steve Echols25-Sep-08 19:07 
QuestionHo do I suppress the Tab key, or control tabbing to a nested user control? Pin
Poolee25-Sep-08 15:47
Poolee25-Sep-08 15:47 
AnswerRe: Ho do I suppress the Tab key, or control tabbing to a nested user control? Pin
dan!sh 25-Sep-08 17:59
professional dan!sh 25-Sep-08 17:59 
GeneralRe: Ho do I suppress the Tab key, or control tabbing to a nested user control? Pin
Poolee26-Sep-08 17:48
Poolee26-Sep-08 17:48 
GeneralRe: Ho do I suppress the Tab key, or control tabbing to a nested user control? Pin
dan!sh 26-Sep-08 18:40
professional dan!sh 26-Sep-08 18:40 
GeneralRe: Ho do I suppress the Tab key, or control tabbing to a nested user control? Pin
Poolee2-Oct-08 6:51
Poolee2-Oct-08 6:51 
QuestionParse XML file and connect to a DSN Pin
Planker25-Sep-08 13:47
Planker25-Sep-08 13:47 
AnswerRe: Parse XML file and connect to a DSN Pin
Planker25-Sep-08 16:53
Planker25-Sep-08 16:53 
AnswerRe: Parse XML file and connect to a DSN Pin
PIEBALDconsult25-Sep-08 18:45
mvePIEBALDconsult25-Sep-08 18:45 
GeneralRe: Parse XML file and connect to a DSN Pin
Planker26-Sep-08 2:41
Planker26-Sep-08 2:41 
QuestionA good tutorial tu use graphics on form ? Pin
baranils25-Sep-08 11:40
baranils25-Sep-08 11:40 
AnswerRe: A good tutorial tu use graphics on form ? Pin
Anthony Mushrow25-Sep-08 12:27
professionalAnthony Mushrow25-Sep-08 12:27 
GeneralRe: A good tutorial tu use graphics on form ? Pin
baranils25-Sep-08 20:02
baranils25-Sep-08 20:02 

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.