Click here to Skip to main content
15,911,360 members
Home / Discussions / C#
   

C#

 
AnswerRe: Splash Screen Form Pin
leppie10-Jun-08 23:46
leppie10-Jun-08 23:46 
GeneralRe: Splash Screen Form Pin
see_seA11-Jun-08 0:02
see_seA11-Jun-08 0:02 
Questionproblem with output parameter Pin
Mr.Kode9-Jun-08 23:50
Mr.Kode9-Jun-08 23:50 
AnswerRe: problem with output parameter Pin
Ashfield10-Jun-08 1:25
Ashfield10-Jun-08 1:25 
AnswerRe: problem with output parameter Pin
Eslam Afifi10-Jun-08 2:30
Eslam Afifi10-Jun-08 2:30 
QuestionAdding VB Code to ThisWorkbook using C# problem Pin
Yasser Sobhdel9-Jun-08 23:26
Yasser Sobhdel9-Jun-08 23:26 
QuestionByte[] type in datagrid gives error. Pin
topcatalpha9-Jun-08 23:08
topcatalpha9-Jun-08 23:08 
QuestionFetching files Pin
shriya_179-Jun-08 23:04
shriya_179-Jun-08 23:04 
AnswerRe: Fetching files Pin
Ashfield9-Jun-08 23:28
Ashfield9-Jun-08 23:28 
QuestionGet filename from windows explorer right menu? Pin
Abdul Gafoor9-Jun-08 22:39
Abdul Gafoor9-Jun-08 22:39 
AnswerRe: Get filename from windows explorer right menu? Pin
Giorgi Dalakishvili9-Jun-08 22:45
mentorGiorgi Dalakishvili9-Jun-08 22:45 
QuestionMS Office 2007 - Server Requirements Pin
newc19-Jun-08 22:30
newc19-Jun-08 22:30 
AnswerRe: MS Office 2007 - Server Requirements Pin
Mike Dimmick10-Jun-08 2:17
Mike Dimmick10-Jun-08 2:17 
GeneralRe: MS Office 2007 - Server Requirements Pin
newc110-Jun-08 4:24
newc110-Jun-08 4:24 
QuestionDiscarding Keyboard-Events for GUI Pin
J. Holzer9-Jun-08 21:59
J. Holzer9-Jun-08 21:59 
QuestionIE 7 Restart problem in Vista machine Pin
sachinkalse9-Jun-08 21:41
sachinkalse9-Jun-08 21:41 
AnswerRe: IE 7 Restart problem in Vista machine Pin
Gareth H10-Jun-08 1:06
Gareth H10-Jun-08 1:06 
GeneralRe: IE 7 Restart problem in Vista machine Pin
sachinkalse10-Jun-08 2:01
sachinkalse10-Jun-08 2:01 
AnswerRe: IE 7 Restart problem in Vista machine Pin
Mike Dimmick10-Jun-08 2:51
Mike Dimmick10-Jun-08 2:51 
QuestionHow to know When USB Detect in our GUI application Pin
pramod_1239-Jun-08 20:43
pramod_1239-Jun-08 20:43 
Hi,

We have one GUI application and used with some user controls.
In this i need to write a pgm to "indicate this application when
a USB drive detect", So i written a sample appln with,

protected override void WndProc(ref Message m)
{
const int DBT_DEVICEARRIVAL = 0x8000;
base.WndProc(ref m);
switch (m.WParam.ToInt32())
{
case DBT_DEVICEARRIVAL:
MessageBox.Show("Found");
break;
}
}

And it is working fine, But i tried to write in my application, it is not working.
I dont have much idea about WndProc and windows messaging.
Is there any loop hole to skip the windows message ( ie 0x8000 ) coz of some where in the appln
to override again the WndProc(...) , Coz i have in this appln so many User controls used,
so couldnt able to look the source code.
If any one can help regarding this ,it will be very greatful help for me.
This is my orginal application which i add the code in the existing windproc() method. ( commened my code with Me Added ")

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

switch (m.WParam.ToInt32())
{


case WM_DEVICEARRIVAL://Me Added

MessageBox.Show("Found");//Me Added
break;//Me Added
}
switch( m.Msg )
{
case WM_PARENTNOTIFY:
if( m.WParam.ToInt32().Equals( WM_RBUTTONDOWN ) )
{
this.SelectedItems.Clear();
this.ContextMenu=null;
}
if (m.Msg == 20)
{
if (this.Items.Count == 0)
{
m_bRedraw = true;
Graphics g = this.CreateGraphics();
int w = 0;
w = this.Width;
w -= g.MeasureString(DISPLAY_MESSAGE, this.Font).ToSize().Width;
w = w/2;
g.DrawString(DISPLAY_MESSAGE, this.Font, SystemBrushes.ControlText, w, 30);
}
else
{
if (m_bRedraw)
{
this.Invalidate();
m_bRedraw = false;
}
}
}
if (m.Msg == 4127)
{
this.Invalidate();
}
}
QuestionNeed Help Moving/Copying File Pin
Saiyed Alam9-Jun-08 20:37
Saiyed Alam9-Jun-08 20:37 
AnswerRe: Need Help Moving/Copying File Pin
Vikram A Punathambekar9-Jun-08 21:13
Vikram A Punathambekar9-Jun-08 21:13 
GeneralRe: Need Help Moving/Copying File Pin
Abdul Gafoor9-Jun-08 21:32
Abdul Gafoor9-Jun-08 21:32 
AnswerRe: Need Help Moving/Copying File Pin
Ashfield9-Jun-08 21:22
Ashfield9-Jun-08 21:22 
QuestionWhatever Happened to Multiple Inheritance? Pin
Roger Wright9-Jun-08 19:46
professionalRoger Wright9-Jun-08 19:46 

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.