Click here to Skip to main content
15,889,867 members
Home / Discussions / C#
   

C#

 
GeneralRe: Linq to Sql Pin
siva45529-Sep-11 17:55
siva45529-Sep-11 17:55 
GeneralRe: Linq to Sql Pin
killabyte29-Sep-11 20:08
killabyte29-Sep-11 20:08 
GeneralRe: Linq to Sql Pin
siva45530-Sep-11 18:42
siva45530-Sep-11 18:42 
QuestionI don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
fiaolle28-Sep-11 21:15
fiaolle28-Sep-11 21:15 
AnswerRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
Richard MacCutchan28-Sep-11 22:39
mveRichard MacCutchan28-Sep-11 22:39 
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
fiaolle28-Sep-11 23:57
fiaolle28-Sep-11 23:57 
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
Richard MacCutchan29-Sep-11 0:14
mveRichard MacCutchan29-Sep-11 0:14 
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
fiaolle29-Sep-11 10:09
fiaolle29-Sep-11 10:09 
Hi
Thanks again for your answers, but I have till trouble to understand to use m.Result=IntPtr(0) or what to put in IntPtr.
I have two examples I have googled:

In this example it stops users to paste anything to a textbox.

C#
protected override void WndProc(ref Message m)
        {

           if (m.Msg != WM_PASTE )
           {
               base.WndProc(ref m);
           }

        }


In this example users can just paste in numbers in a textbox.
C#
protected override void WndProc(ref Message m)
       {
           if (m.Msg == WM_PASTE  )
           {
               IDataObject obj = Clipboard.GetDataObject();
               string input = (string)obj.GetData(typeof(string));
               foreach (char c in input)
               {
                   if (!char.IsDigit(c))
                   {
                       m.Result = (IntPtr)0;
                          return;
                   }
               }
           }
           base.WndProc(ref m);
       }


Why do we have to assign to m.Result the InPtr 0? What is IntPtr and how do I know which int (amount) I should return?

Many thanks

Fia
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
Richard MacCutchan29-Sep-11 21:36
mveRichard MacCutchan29-Sep-11 21:36 
AnswerRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
BillWoodruff1-Oct-11 18:45
professionalBillWoodruff1-Oct-11 18:45 
QuestionListBox Binding Pin
Samir.Sh28-Sep-11 21:03
Samir.Sh28-Sep-11 21:03 
AnswerRe: ListBox Binding Pin
Dalek Dave28-Sep-11 21:46
professionalDalek Dave28-Sep-11 21:46 
AnswerRe: ListBox Binding Pin
BobJanova28-Sep-11 22:24
BobJanova28-Sep-11 22:24 
Questioncalling all datagridview experts Pin
Tom Paronis28-Sep-11 8:47
Tom Paronis28-Sep-11 8:47 
AnswerRe: calling all datagridview experts Pin
Eddy Vluggen28-Sep-11 9:40
professionalEddy Vluggen28-Sep-11 9:40 
GeneralRe: calling all datagridview experts Pin
Tom Paronis28-Sep-11 11:07
Tom Paronis28-Sep-11 11:07 
AnswerRe: calling all datagridview experts Pin
Luc Pattyn28-Sep-11 11:00
sitebuilderLuc Pattyn28-Sep-11 11:00 
GeneralRe: calling all datagridview experts Pin
BobJanova28-Sep-11 22:30
BobJanova28-Sep-11 22:30 
QuestionHelp Pin
mazroni28-Sep-11 8:34
mazroni28-Sep-11 8:34 
AnswerRe: Help Pin
Eddy Vluggen28-Sep-11 9:46
professionalEddy Vluggen28-Sep-11 9:46 
QuestionOutlook 2007 Add-In Crashes Occasionally Pin
Matt U.28-Sep-11 3:56
Matt U.28-Sep-11 3:56 
QuestionRe: Outlook 2007 Add-In Crashes Occasionally Pin
Eddy Vluggen28-Sep-11 7:36
professionalEddy Vluggen28-Sep-11 7:36 
AnswerRe: Outlook 2007 Add-In Crashes Occasionally Pin
Matt U.28-Sep-11 7:41
Matt U.28-Sep-11 7:41 
GeneralRe: Outlook 2007 Add-In Crashes Occasionally Pin
Eddy Vluggen28-Sep-11 7:48
professionalEddy Vluggen28-Sep-11 7:48 
QuestionNeeded: WinForms CheckBox/RadioButton with HTML Text Pin
Steve Harp28-Sep-11 2:53
Steve Harp28-Sep-11 2:53 

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.