|
thanks for giving time.
here i am providing a link from where you can download win apps not wpf where people did the nice scroll with panel and flow layout panel. the link as follow https://onedrive.live.com/embed?cid=C4A6F16F34D7540A&resid=C4A6F16F34D7540A%21133&authkey=AC-BXcngO7n2g9Q[^]
the UI link as follows http://i.imgur.com/ZYzVMuV.gif[^]
the above UI is designed in winform.
i just copied and follow their code to implement same in winform but mine is not working. i guess i am missing or making a small mistake for which my scrolling is not working.
so please first see image preview link and if u have trust then download the apps from one drive and run at your end.
you will see writing a very minimum line of code how a nice automatic scrolling can be done. looking for your help. if possible please investigate my code and tell me what mine is not scrolling. thanks
tbhattacharjee
|
|
|
|
|
I've looked at your sample, run the code, and I do not call what it produces "smooth animation" at all.
You are using Sven Walter's Metro FrameWork for WinForms; it's always good to reveal things like that in your first post.
You can easily produce the quality of animation shown in Sven's code if you take the ideas I've given you, and start to work.
I'll be happy to help you learn to how to build your own animation function for WinForms, but you have to take the first steps. Helping you fix some problem with code copied from Sven is not going to teach you anything.
Please, come back with your own code, and specific questions.
cheers, Bill
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
He wrote this code to scroll his panel
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
int _myval = 5;
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (e.Y < metroPanel1.Top || e.Y > metroPanel1.Top + metroPanel1.Height) return;
if (e.X <= metroPanel1.Left && e.X >= metroPanel1.Left - 40)
{
if (metroPanel1.HorizontalScroll.Value <= _myval)
{
metroPanel1.HorizontalScroll.Value = _myval;
}
else
{
metroPanel1.HorizontalScroll.Value -= _myval;
}
}
if (e.X <= (metroPanel1.Left + metroPanel1.Width + 40) && e.X >= (metroPanel1.Left + metroPanel1.Width))
{
metroPanel1.HorizontalScroll.Value += _myval;
}
}
and i follow the same but mine is not working. i am not trying to do any animation rather i want when i will place my mouse/left at the right most area of the panel then panel controls should start scroll. trying to simulate win8 start screen where lots of tiles are there and when people place his mouse at right/left most area then everything start scrolling.
please help. if u can help with code then answer.
thanks
tbhattacharjee
|
|
|
|
|
If you use your version of Sven's code, you need to use Visual Studio's debugging capabilities ... set break-points, single-step, etc. ... and isolate the problem in your code. Since you have Sven's code, which is working, you have something to compare directly with.
I am interested in helping people who develop their own solutions because that, I think, results in the maximum contribution of value to both the individual learning C# and writing code, and to CodeProject as a whole. Debugging/fixing a copy of another person's obscure undocumented code is not an activity that contributes to CodeProject, or you.
I repeat my assertion that you can achieve better looking, smoother scrolling, animation, than what Sven's code does.
You'll learn a lot writing your own version !
cheers, Bill
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
how do i delete my visual stuio project
|
|
|
|
|
Try this[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Hi,
I am writing an application with Windows forms which has to enable user to select a webcam connected to his computer via USB and print the video stream in the window. I need to get some of the frames (let say every 5th frame, but it depends on fps I get) and search it for an graphic object that was defined earlier by the user.
As I am new to c# and Visual Studio I was searching for an example of an application similar to what I want to do. I found a few examples on AForgery, but I would like to print original video with just added a few markers on it and AForgery gives me processed frames. Also, when I aded simple processing in the receving new frame event, the performace was pretty bad. I tried the WIA and what I get is an error when I try to call device selection dialog.
Device dev = dialog.ShowSelectDevice(WiaDeviceType.CameraDeviceType,true,false);
What I get is HRESULT exception with error code 0x80210015. I am not sure if WIA is exactly what I need, but because of this error I can't check it.
I need help with selecting the best video stream fiting that kind of application and the more I search, the more I am confused. I do not need to send video over IP or save it. I just need to present the video stream from the camera and sometimes get a frame (the best would be RGB) for processing. I would appreciate any suggestions on stream selecting or linking documentations/examples.
|
|
|
|
|
You may want to check out this[^] article.
admbrt wrote: AForgery I think you meant AForge.
/ravi
|
|
|
|
|
Thanks, I think this will do it.
And of course i meant AForge
|
|
|
|
|
|
Thanks, while working on this project I came across OpenCV and I think that is exactly what I need as in the future there will be some imageprocessing in my project. So I guess I'll use OpenCV to do all the work with Webcam.
|
|
|
|
|
Hi,
I am wondering when I can get the finger print attendance device without any finger print system.
I want to use it for testing finger attendance system in C#
I tried searching the net for it but I couldn't find it and I am not sure what do you call the device?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
This[^] vendor seems to sell inexpensive devices and SDKs.
/ravi
|
|
|
|
|
How to use entity frame work in MVC web Application to fetch bulk records from database by joining multiple tables in MVC Web Application.
|
|
|
|
|
See this[^] tutorial.
/ravi
|
|
|
|
|
Seriously? There are entire BOOKS written on that very subject. You want someone to copy and paste and entire book into a forum post??
|
|
|
|
|
|
How to get the screen shots of dynamic display chart for a list of values?
In a loop need to change the line graph for each iteration and have to get the screenshot for the same.
|
|
|
|
|
Where are you stuck?
And: why do you want to take screen shots? What about saving the charts as images to disk?
|
|
|
|
|
You do know that it's dynamic data don't you? So, change the data and then capture the screenshot. There's even an article on here that shows thow to capture the screen[^].
|
|
|
|
|
anyone can help me,.,
i try to make a graph in c# like this video in youtube :
http://www.youtube.com/watch?v=Tay4t1Wo-As[^]
i have been doing all of procedure like this tutorial..
in tutorial
when program running..no error happend..
when i try run my program that i made, error happend
error program is = "axMathworks_Strip1.AddXY(0, a, Convert.ToDouble(textBox1.Text));"
this is a full program
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace nyobaan_library1
{
public partial class Form1 : Form
{
Double a,b;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Start();
button1.Enabled = false;
}
private void timer1_Tick(object sender, EventArgs e)
{
a++;
axMathworks_Strip1.AddXY(0, a, Convert.ToDouble(textBox1.Text));
}
}
}
iam using library MWStrip.ocx active X
computer say :
"nput string was not in a correct format."
any one can help me????
|
|
|
|
|
What value is in your TextBox? You might want to try something like this:
double coordinate;
if (double.TryParse(txtBox1.Text, out coordinate)
{
axMathworks_Strip1.AddXY(0, a, coordinate);
}
|
|
|
|
|
thanks so much ....^_^
i am still not understand..
why this coding error
"axMathworks_Strip1.AddXY(0, a, Convert.ToDouble(textBox1.Text));"
in video tutorial, error is not happening???
Convert.ToDouble(textBox1.Text)); error in this section....
and your coding
double coordinate;
if (double.TryParse(txtBox1.Text, out coordinate)
{
axMathworks_Strip1.AddXY(0, a, coordinate);
}
i add "a++" when i run, the program successfully executed....can u give me short explanation...sorry for my english..
|
|
|
|
|
The reason my version works and yours didn't is because of what TryParse does. Basically, if it cannot parse the value into a double then it will not execute the Add section. Using Convert.ToDouble will throw an exception if it cannot convert the value.
|
|
|
|