|
Dennis Bork wrote: The MouseUp, -Down and so on events can only be set for the form itself, but as far as I have tested i out not for any controls that reside inside it - true? Is there another way?
False, anything that inherits from Control[^]. See Richards'[^] answer for a recursive method that loops all controls, and hook 'em up to a single event-handler. The 'sender' argument would tell you what control was clicked.
|
|
|
|
|
Hello Dennis Bork,
With regards to your question,
http://stackoverflow.com/questions/986529/how-to-detect-if-the-mouse-is-inside-the-whole-form-and-child-controls-in-c
Hope this helps!
Best of Luck!
With Kind Regards,
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:33am.
|
|
|
|
|
try this logic...
On Form MouseClick Event
{
if typeof control (at current mouse pointer) not equal to panel, and groupbox and... Then
{
detected that non container contol is clicked
}
else
{
detected that container contol is clicked
}
|
|
|
|
|
Hi,
One other (slightly heavy handed) possibility is to override the Windows Procedure in your form.
You can then intercept all the windows messages it receives, and filter down to the mouse events.
eg:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
}
}
You can get an enum containing all the windows message constants here: [^]
|
|
|
|
|
Hi Friends,
I have an installer developed in Wix. I want to execute one batch command during the upgrade operation. I added one Wix custom action in wxs file. Anybody know to which sequce should i add this for my requirement.
Any help would be really blessing for me.
-Prasanth
|
|
|
|
|
Hello.
I want to add a new record into my database( example: StudetDatabase, if i want to add a new student to database then what do I doing? using data binding.
Thanks so much.
|
|
|
|
|
LearnByHeart wrote: if i want to add a new student to database then what do I doing?
You start a browser and go to MSDN[^]
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
|
AFAIK, databinding will still require at least a mechanism to update. It doesn't work like the old VB recordset.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi there,
How can I do a currency formatting for a text box in C#?
My requirement is - Text box should accept numbers only upto 2 decimal places and after focus is changed format should change like $3,454,54.89.
Thanks
|
|
|
|
|
Are you using databinding to get the value in there, or putting in the value manually? With databinding, it'd be using the FormatString[^] property of the binding;
textBox1.DataBindings.Add(new Binding(
"Text",
Properties.Settings.Default,
"ConnectionString",
true));
textBox1.Databinding[0].FormatString = "C";
Alternatively, you could keep the value in a private variable, set it when the user is done editing, and update with a formatted version when the focus is lost. A description of the markup can be found here[^].
If the subject is "new", MSDN has an introduction here[^].
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
modified 24-Oct-12 17:05pm.
|
|
|
|
|
Hi Every Body
I have A Problem & Hope You can Help ME.
I know How I can Change Form Oopacity But I don't KNow How i can change Control Opacity ??
For Example How i can change a button Opacity IN C#.net Windows Application
Thanx Of All Developers.
|
|
|
|
|
Please pick the most appropriate forum. You have already asked this in another forum and received answers.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Coloca un PictureBox en un formulario y cambia con este codigo:
Dim x as integer = 255
PictureBox1.BackColor = color.FromArgb(x, Color.Black)
Cambia los valores de la variable x entre 0 y 255 para dar el efecto deseado.
Saludos
_______________________
Edward J. Ocando. | Desarrollador | SoyDesarrollador.net
Telefono. +58 (416) 164.34.88 | Edward.Ocando@soydesarrollador.net
|
|
|
|
|
Please use English.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Lo siento, solo hablo español, no uso ni me gusta el idioma ingles.
Soy de américa latina y apoyamos al 100% el uso del idioma español.
Te recomiendo usar Google translator..
!Que viva el idioma español.....¡
Saludos.
_______________________
Edward J. Ocando. | Desarrollador | SoyDesarrollador.net
Telefono. +58 (416) 164.34.88 | Edward.Ocando@soydesarrollador.net
|
|
|
|
|
Yes, but on CodeProject we use English. If that's a problem for you then I am sure there are many Spanish language forums where you will be welcome.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Es geht nicht nur um Amerika. Hier im Forum akzeptieren wir Englisch als den größten gemeinsamen Nenner.
For consistency's sake, we keep the forums English and use Google Translate for in- and output, if necessary.
Ciao,
luker
|
|
|
|
|
I used to be able to write bat files in my sleep. now, they are a fuzzy memory. Ok here's the deal, I need a something that I an run on start up or execute via executable, It will open a folder and merge about 50 different .reg files into registry, how ever, I want it to run silently, and no confirmation other then completion.
I am sure I can put the files in a .dat and insert from there. any ideas on what I should use?
Throw me a bone. Flame me. I don't mind, as long as you don't mind getting flamed, torched, nuked, back.
|
|
|
|
|
Jason Sani wrote: Ok here's the deal, I need a something that I an run on start up or execute via executable, It will open a folder and merge about 50 different .reg files into registry, how ever, I want it to run silently, and no confirmation other then completion. I am sure I can put the files in a .dat and insert from there. any ideas on what I should use?
Write a bat-file? Make a list of all the filenames using the dir-command is a matter of looking up the switches. As is importing a reg-file in the registry; KB 82821[^]
regedit.exe /s myregfile.reg
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
First, this has nothing to do with Windows Forms.
Second, you can use the REG IMPORT command in a batch file to import each .reg file. just open a CMD prompt and type REG IMPORT /? for more info.
|
|
|
|
|
Put this into your batch file:
for %%a in (*.reg) do regedit.exe /s %%a
That should merge all files that end with ".reg".
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Can anyone post a small wpf project with a simple database table having SAP crystal report? Project must be made in visual studio 2010.Thanks to all.
|
|
|
|
|
This is not a valid question, no one is going to provide you with a working project on demand. Go and search the CodeProject articles[^] for sampl tutorials and code.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I'm working on an existing WinForms application and I am having some weird issues with Infragistics controls in a WinForms app.
When I open a form or usercontrol in the project that has Infragistics controls on it, it looks like this.[^].
I cannot access any of the controls in the design surface. Clicking does nothing. And, all of the controls appear in the lower area.
So I created a new test solution and dropped some Infragisstics controls on and got this[^].
Anyone know what's going on?
If it's not broken, fix it until it is
|
|
|
|