|
Hi,
I've build a custom scrollbar control, as I wanted to replace
Listview's standard scrollbars, but I'm having problems, when
I try to make listview scroll, when thumb is moved.
Please, any pointers about how could I implement
scrolling functionality ?
Cheers.
|
|
|
|
|
BhNedo wrote: I've build a custom scrollbar control
BhNedo wrote: Please, any pointers about how could I implement
scrolling functionality ?
You built a custom scrollbar control before you looked into how scrolling works? Wow. I believe that's what some people call, putting the cart before the horse. Maybe this MSDN information[^] will be helpful to you.
led mike
|
|
|
|
|
Yeah, cause I looked at this example
"http://www.codeproject.com/KB/miscctrl/customscrollbar.aspx", on implementing custom scrollbars
for Panel controls, and it was easy to scroll it's content thanks to AutoScrollPosition property, so
my disappointment came when I figured out that ListView control doesn't have that property.
I already read that MSDN documentation, tried capturing WM_SCROLL message, but without success.
Anyways, thanks for your response.
|
|
|
|
|
hello Sir,
This is Balaji.V, Developing Video Application Using WindowsForms, C#.net, For recording video we are using WindowsMedia Encoder 9 series, Encoder for encoding the video. windows Media Player for Playing the video.
I need to change the Brightness, color, Contrast of the video Using Trackbars, when I drag the brightness trackbar control the value of trackbar apply to video, when I drag the color trackbar control the value of trackbar apply to video, similary for contrast
for this iam using DirectX.capture.dll, DshowNet, & the follwing code.
private void trkBrightness_Scroll(object sender, EventArgs e)
{
VideoProcAmp_prop Brightness;
Brightness = capture.Get_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness);
Brightness.lValue = (long)trkBrightness.Value;
capture.Set_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness,Brightness.lValue);
}
private void trkColor_Scroll(object sender, EventArgs e)
{
VideoProcAmp_prop Saturation;
Saturation = capture.Get_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Saturation);
Saturation.lValue = (long)trkColor.Value;
capture.Set_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Saturation,Saturation.lValue);
//capture.Set_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Saturation,64);
//Settings.Default.Color = trkColor.Value;
//Settings.Default.Save();
}
private void trkContrast_Scroll(object sender, EventArgs e)
{
VideoProcAmp_prop Contrast;
Contrast = capture.Get_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Contrast);
Contrast.lValue = (long)trkContrast.Value;
capture.Set_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Contrast,Contrast.lValue);
//capture.Set_VideoProcAmpProp(DShowNET.VideoProcAmpProperty.VideoProcAmp_Contrast, 64);
//Settings.Default.Contrast = trkContrast.Value;
//Settings.Default.Save();
}
but it is not working, Please give me a solution how can i apply the change made by the trackbar control vaues to the video which is going to record & recording.
Thanks & Regards
Balaji.V
|
|
|
|
|
hi
im desperately looking for a third party control or software that can print a windows form,eg my windows form has a picturebox with some labels Frown
thanks very much
regards paula
|
|
|
|
|
Cross posting is considered rude. Don't do it.
|
|
|
|
|
Hi,
I want to fill the ComboBox with All the Database Names those are present in SQL Server. Is it possible? If yes, Then How???
|
|
|
|
|
You can use SMO to retrieve database names from sql server instance or you can issue a query that retrieves all database names using sqlcommand object and then populate combobox.
|
|
|
|
|
Hello everyone,
Im wondering if its possible to make my control behave in the way described below:
during editing text when user types enter normally cursor moves to the next line creating new emtpy line and then user can keep on writing. I would like to make it possible to move to another line by typeing enter only when the current line contains 10 characters.
Hope taht my description of the problem is clear,
thanks for any hint,
Witek
|
|
|
|
|
Should be possible. Check the length of the text and only allow the enter key though if the length of the text is a mutliple of 10.
Put you code in the keydown(?) event of the text box.
Hope this helps.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi Witek,
Use events of Keys (KeyDown or KeyPress or may be you may use TextChanged event) and check for the conditions (if the control contains 10 characters or so). Then put the code for execution, may be forcing a line break or something as per the requirements.
I hope this would be helpful.
John Adams
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
As the others have mentioned, wire together logic in the KeyDown event procedure. You'll have to make sure the textbox is set to handle multiple lines, as well.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi
I would like to design a video chat application. Please help me how to start this
|
|
|
|
|
Open Visual studio and create a new project. From that point on you're on your own.
Seriously, if you don't know how to start this then it's doomed to failure don't you think?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
How to set desktop icon on status bar
|
|
|
|
|
Hi,
Try this [^] link.
I hope this would resolve the problem.
John Adams
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hi All,
I started programming with C#. I have a very primary (read that little) knowledge of C++ and C.
I am mainly interested in Windows Applicaton programming with C# .Net. I realize for developing a good professional applcation one cannot escape an encouter with Windows API function call. Be it Windows animation, some super control or some threading inticacy, API call has to be there.
I am not very much familiar with the old programming languages and the references they made to call the Windows API.
Can somebody please give a pointer for a good C# book which elaborately explains every nook and corner of API programming realm in light of C#? Articles, I have gone through enough on the internet, haven't provided much help save a few syntax. I want to have a complete command and understanding which can only be possible with a good printed book.
Eagerly waiting for a reply!
Best Regards,
Sid
|
|
|
|
|
babai28 wrote: I realize for developing a good professional applcation one cannot escape an encouter with Windows API function call.
I totally disagree. It is completely possible to develop full professional applications using .net without ever calling the windows API.
API calls are only required for doing things that the .net library does not naturally support. (There are plenty of classes for animation, and .net fully supports threading without using the windows API)
My suggestion would be that you get yourself a copy of Pro C# 2008 and the .NET 3.5 platform[^] by Andrew Troelsen. It's an excellent guide to .net. It covers all the bases, including how to do platform invoke (i.e. API calls). Then, when you hit up against a task that .net doesn't support, you can google for specific help in tackling that task via the windows API.
Simon
|
|
|
|
|
That is an excellent book! As far as programming literature, i would suggest any of the books from Apress.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi Simon,
Thanks very much for your reply. Even I have come to think that .Net has ample of classes to fulfil almost every need of the developer.
I have a situation in which I need to insert a table in a rich text box and it is not just about generation of rtf and appending it to the rtf property of the RichTextBox it should be movable like it is in MSWord and also resizable. This means I need to insert it like an object. Can you please name a .Net class that can help me achieve this? If there is no direct class perhaps, you would like to suggest a pure .Net work around.
Thanks in Advance,
P.S. I am working with VS 2005 C#2005.
Best Regards,
Sid
|
|
|
|
|
Stuff like this is quite difficult to do. If the RTF box doesn't support it (Can't remember if it can do things like that), then you really have 3 options:
1) Write a custom control (Or extend the current RTF control) - A lot of work. Don't try doing this if you are new to .Net. a custom control of this complexity will be quite a big project. I would suggest it would probably need to be fully owner drawn. If you do go down the custom control route, WPF tends to offer better and easier customisability (but it's still not easy to do something like this).
2) Look for an existing "editor" control. There are stacks of commercial editor controls around that offer features way beyond the standard winforms controls. Companies like Infragistics[^], DevExpress[^] etc. offer this kind of thing. There are loads more out there. (I think DevExpress even offer some of them for free). You can also try looking for open source projects that have editor controls, I'm sure they'll be a few around. You need to spend some time googling to find something that meets your needs. Email the companies and ask if they support what you want to do - some of these companies controls are very complex, so it may not immediately be obvious if you can do what you want.
3) I think it's possible to embed a MS-word "control" into your app. I'm not at my work PC right now, so I can't check, but I've done it with Visio in the past for displaying Visio documents in one of my apps. It might prove difficult to control/limit what the user can do, and it may be total overkill for what you are doing, but it's something to consider.
Personally, option 2 is probably the best.
Good luck.
Simon
|
|
|
|
|
Thank You very much Simon.
Best Regards,
Sid
|
|
|
|
|
No problem.
I did some checking at my dev pc. There isn't a way to embed word directly into your app, but you can do it indirectly buy hosting a word document in a web browser control.
Check out this blog post. It's in foxpro, but the principle is the same
http://www.west-wind.com/WebLog/posts/1299.aspx[^]
It seems rather messy though, and obviously requires that the user has word on their system. I'd still go with option 2.
Thought I'd let you know.
Simon
Simon
|
|
|
|
|
Thanks a lot Simon.
Even I think getting a word app work through the browser control and then training the browser control to behave like a tesxt box will become very messy.
I will go ahead with option 2.
Best Regards,
Sid
|
|
|
|
|
For a semi-detailed explanation of various API commands, i would suggest that you google: API-Guide and API Viewer. API-Guide is discontinued (last I heard, find a mirror download), but it provides detailed descriptions and use of various API commands. All examples are in VB6 (not sure about .NET), but it is only used as a guide for what functions to look into. API Viewer is an excellent program that contains syntactically correct API calls in a variety of languages (all .NET and more).
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|