Click here to Skip to main content
15,898,953 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: Whatever Happened to Multiple Inheritance? Pin
Vikram A Punathambekar9-Jun-08 21:20
Vikram A Punathambekar9-Jun-08 21:20 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Alsing10-Jun-08 1:13
Roger Alsing10-Jun-08 1:13 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Vikram A Punathambekar10-Jun-08 4:46
Vikram A Punathambekar10-Jun-08 4:46 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:08
professionalRoger Wright10-Jun-08 8:08 
AnswerRe: Whatever Happened to Multiple Inheritance? Pin
Colin Angus Mackay9-Jun-08 22:22
Colin Angus Mackay9-Jun-08 22:22 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:07
professionalRoger Wright10-Jun-08 8:07 
AnswerRe: Whatever Happened to Multiple Inheritance? Pin
#realJSOP10-Jun-08 0:22
professional#realJSOP10-Jun-08 0:22 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:09
professionalRoger Wright10-Jun-08 8:09 
AnswerRe: Whatever Happened to Multiple Inheritance? Pin
Mike Dimmick10-Jun-08 2:45
Mike Dimmick10-Jun-08 2:45 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:11
professionalRoger Wright10-Jun-08 8:11 
QuestionHow to execute some batch file that my FTP server contain ? Pin
Yanshof9-Jun-08 18:46
Yanshof9-Jun-08 18:46 
Questionhow to use the control of DevComponents.DotNetBar.SideBarPanelItem Pin
cqdong809-Jun-08 17:51
cqdong809-Jun-08 17:51 

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.