|
Well, if mouse wheel events only get sent to the control that has the focus ( as all mouse events do ), the only other solution I can think of is if there's an API you can call to get the wheel pos, on a timer. That's not elegant, it's ugly. And, I don't think it works, from memory, the mouse wheel events pass a number that tells you the direction the mouse moved in and how fast, not a number that defines a finite position.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to add flash to my Application plz provide a good link or suggestion.
|
|
|
|
|
No one will help you if you just demand link and don't search yourself.
There are several articles which show to embed and play swf files in winforms application. All the articles can be easily found by a quick google search.[^]
|
|
|
|
|
Hi All,
I am working on the project using c# 2.0. I am using the browser control in this project.
I need to get the contents of status bar of the browser and save into string variable.
Please help if you can.
Thanks in advance.
A.Asif
|
|
|
|
|
Hi,
WebBrowser class has a ProgressChanged event, and WebBrowserProgressChangedEventArgs
offers current and max byte counts.
|
|
|
|
|
Hi
I have a requirement to get the Word Document as BLOB(Binary Large OBject) and send this value to Message Queue and also save it back to another Word Document with another name.
The problem is I am not getting the Data correctly into a string and while saving it back to Queue or Word Document, the data is coming as some encoded characters.
Somebody please help me in solving this. If possible please give me a sample code in C#.
With Regards,
Abraham Chethuvelil
|
|
|
|
|
I have so many rows in thr grid
the cells contains 1.raja 2.raja 3.raja
I want to merge these raja into single cell raja
How to do it in .net 2003 grid
|
|
|
|
|
How to merge the cells in the grid of .net 2003
|
|
|
|
|
A datagrid ? You mean so that you have a layout where some rows have different size columns ? You can't.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi I have for quite some time used the below code to check if a computer was connected to the internet for my apps, but recently found out that that solution came short in companies using proxy servers. Is there any who know how to implement that in the below code?
Basically I thought of trying to get the proxy settings from the default browser or like. But what is "normal" standard? and do any have an easy solution to this below here.
public static bool CheckInternet()
{
try
{
System.Net.IPHostEntry objIPHE = System.Net.Dns.GetHostEntry("www.google.com");
return true;
}
catch
{
return false; // host not reachable.
}
}
|
|
|
|
|
Hi,
I am using a DataGridView and i want it to be always expanded to the whole control. I've set it as fill, but it never fills the whole screen like the error list in vs2005. Is there a property or do i need to manually work out the size and set it that way?
Regards,
Gareth.
|
|
|
|
|
hi,
I believe its a form that u have put your grid on. Now, when you go to the properties window of the grid, locate Dock property of the grid and set it to Fill,i.e., select the big central square shown in the dropdown list.
the result of this change is instantly updated on the form and now u wud be able to see the grid stretched to the entirety of the form, now at runtime, even if u resize the form, the grid would be always auto-resized to cover up the entire form.
|
|
|
|
|
moreover, if u want to stretch the grid to the whole screen, then set the FormBorderStyle of the form to None and WindowState to maximised alongwith the Fill of the dock property of grid. but be careful to provide an exit point on the form or grid somewhere, otherwise, u wud really be annoyed if u see the entire screen covered up by the silly grid and u r unable to access any other program.
|
|
|
|
|
Hi gladiatron,
I don't use a form, its in a panel. And when i said i had set "it to fill", i meant i had docked it already.
Regards,
Gareth.
|
|
|
|
|
Hi,
AutoSizeColumnsMode = Fill;
Regards,
Gareth.
|
|
|
|
|
I have few checkboxes in my form, and i want to get only those which are checked. Can this be done only in 1 line of code? As i know the loop to execute and get the checked values.
Thanks in advance for your help.
|
|
|
|
|
What's a line of code?
If you encapsulate the details in a method you need only use that method.
|
|
|
|
|
What i mean to say, is it possible to do it without a loop only with 1 line of code ?
|
|
|
|
|
Only if the line is really long, or calls a method that does a loop.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Het2109 wrote: without a loop
Perhaps.
Het2109 wrote: with 1 line of code
Perhaps not.
How about adding a collection for the checked CheckBoxes to your form, and having the CheckedChanged event handler(s) add and remove them as appropriate?
|
|
|
|
|
PIEBALDconsult wrote: What's a line of code?
Things that might make a computer do what you want it to. Something the PHB has no true understanding what it is.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Het2109 wrote: few checkboxes in my form, and i want to get only those which are checked. Can this be done only in 1 line of code?
Probably only if you use a loop or as a procedure like CheckForCheckedCheckBoxes(); . What is it that you want to do with the checked checkboxes when you find them?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Add an event to the CheckChanged event. In that code you can use code to populate a list. The one line of code would be:
someMemberList.Add((CheckBox)sender);
In the event.
The easiest method, however, is just the if statements. You mentioned a loop so maybe this is ASP.NET so there is a complicated simple way to do it by getting the submitted value by the id of the check box so long as every check box has the same id.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: Add an event to the CheckChanged event. In that code you can use code to populate a list. The one line of code would be:
someMemberList.Add((CheckBox)sender);
In the event.
What about repeated clicks? Check - uncheck - check
|
|
|
|
|
object o = ((Checkbox)sender).Checked ? list.Remove((CheckBox)sender) : list.Add((CheckBox)sender);
Just might work, or some variation thereof There is always a way to write bad code. Use a hash to avoid duplicates if it really matters.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|