|
Hi,
How do you make a smooth motion on your windows form??
For example, I'm making a button that will show more/less options on a form and tried to make it move smoothly but I couldn't.. I'm basically using a normal for loop with a timer but it looks like it's not the way it is done
Please help
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
You mention using a for loop - I'm not sure you need one for a smooth motion (or you have might not fully understand the timer object).
Set up a timer and have an Event handler that responds to the Tick event of your timer. That should give you a smooth motion. Once you reach the motion limit, stop the timer.
Hope that helps - if not, I may have misunderstood the problem.
|
|
|
|
|
Hi,
I am trying to create a compact framework 2.0 application which is using WebBrower.Navigate to go to a certain web page.
To do this, I need to pass in a System.Uri object which contains the url to the web page. I need to pass in a variable which contains a &. For example, http://www.test.com/test.aspx?var=varname&part2
varname&part2 is one whole string which i pass in.
since the unicode %26 = & ,
I tried to pass in "varname%26part2" into New Uri() constructor but the result url created is always "varname&part2". After searching the net for answers, there seemed to be no way to tell Uri object to ignore the % escape character. There seemed to be a way to do this with normal .net 2.0 framework but compact framework does not seemed to provide for this.
Anyway to overcome this?
|
|
|
|
|
Hi.
Have you tried with "\&"?
|
|
|
|
|
Now you are just guessing wildly...
---
single minded; short sighted; long gone;
|
|
|
|
|
What is the exact code that you are using?
If you escape the & character as %26, the Uri constructor should not unescape it. If it does, there is something that is seriously wrong.
---
single minded; short sighted; long gone;
|
|
|
|
|
Don't have time to test this but you might try Server.UrlEncode("varname&part2") and see what it gives you.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Hi guys! Thanks for the reply. I saw one of the articles...
Features Missing From .NET Compact Framework
As mentioned earlier, the .NET Compact Framework is a subset of the full .NET Framework and major sections were ignored because they implemented features that were specific to the PC platform, which did not make sense in the device world. The following is a brief summary of the features that are excluded from the .NET Compact Framework.
No application configuration files.
No support for COM Interop.
No support for remoting.
No support for printing.
No support for the SoapFormatter or the BinaryFormatter classes.
No support for XPath and XSLT.
No support for the System.Web namespace.
Ok, enough of basics!! Entire books have been written on the Compact Framework, but we don't have space for it. So let's start writing a simple application.
So i could not use System.Web.HttpServer.UrlEncode method otherwise available in dot net 2.0.
Seems like there is no workaround...
Regards and thanks guys!
|
|
|
|
|
I'm creating an setup project for an application I'm working on. The unusual thing about this installation is that the application (via its dependency on various other projects) uses two different versions of the Enterprise Library. The problem with this is that setup project detects this then appears to install a random version of each "duplicate" assembly.
So, I have (and need) a version 1.1 and version 2.0 of Microsoft.Practices.EnterpriseLibrary.Data.dll. This setup project decides to install version 2.0
I have (and need) a version 1.1 and version 2.0 of Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll. The setup project decides to install version 1.1
There doesn't seem to be any rhyme or reason behind which one is actually installed.
The version 2.0 files will be installed in the GAC, so they don't interfere with each other, but I can't seem to get the installer to ignore the 2.0 files. It sees them as dependencies and refuses to allow me to remove them.
I know this is an extremely unusal problem, but does anyone have any ideas of how I should proceed? Or is there something obvious I've missed that would make everything fall into place?
|
|
|
|
|
One posibility could by code optimizations the compiler does when compiling. It could be thinking a certain assembly is being used or not used and updates the assembly manifest accordingly. My thought is that it could be confused as to the exact dependancies due to the information in the assembly manifest.
Hope this helps a bit.
|
|
|
|
|
andre_swnpl wrote: My thought is that it could be confused as to the exact dependancies due to the information in the assembly manifest.
No, it isn't being confused. I've checked that the correct assemblies are being included. The problem is that the application does indeed use both versions of Enterprise Library
The dependency tree looks something like this:
WindowsApplication
/ \
/ \
/ \
Legacy NewCode
/ \
/ \
/ \
Enterprise Enterprise
Library 1.1 Library 2.0
|
|
|
|
|
How to capture a screen shot, and then save it as JPEG format?
Thanks in advance..
|
|
|
|
|
|
|
int screenWidth = Screen.GetBounds(new Point(0, 0)).Width;
int screenHeight = Screen.GetBounds(new Point(0, 0)).Height;
Bitmap screenShot = new Bitmap(screenWidth, screenHeight);
Graphics gfx = Graphics.FromImage((Image)screenShot);
gfx.CopyFromScreen(0, 0, 0, 0, new Size(screenWidth, screenHeight));
screenShot.Save(@"C:\YourScreenShot.jpg");
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
By the way, what are you trying to do?? I saw your posts here in the forum since February and it looks like you're trying to develop some sort of a Trojan/ hacking application.. Just hopping we're helping in that
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
thanks, it works.
but the size of image is still huge 1.5 Mb.
i would like to be as usual JPEG image, in Kbytes.
is there a way to do so.
|
|
|
|
|
i'm developing a client\server application, the application consist of two part
1- server control the clients log in to computers ( as internet cafe).
2- server monitor client (( what i hope for, is to do as Remote Administrator).
it's for college, and since i'am a new programmer, i have a lot of difficalties ..
thanks, any way .. please, excuse my bad english.
|
|
|
|
|
Hello,
Maybe you could try to use:
System.Drawing.Imaging.ImageFormat.Png Format instead of JPEG
It's amazing how good the quality is.
Hope it helps!
All the best,
Martin
|
|
|
|
|
Yes.. Sana'a university .. I've been there too!!
By the way, as Martin saied, try this:
screenShot.Save(@"C:\YourScreenShot.jpg", System.Drawing.Imaging.ImageFormat.Png);
Hussam Fattahi wrote: thanks, any way .. please, excuse my bad english.
It's ok, I'm Yemeni as well.
Good luck Hussam
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
A mini hacker's lounge within C# forum?
|
|
|
|
|
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello,
I’m having some difficulties using simple databinding on properties on a collection.
First of all, I’ve searched google for hours now, and I’ve tried numerous approaches. I’ll try to explain the problem as detailed as possible.
For simplicity I won’t be using any custom implementations here (even though I am in my application).
I have a collection named “Matrix” which consists of “Rows “(which again consist of Fields, but I’ll leave that out here).
<br />
public class Matrix : BindingList<Matrix.MatrixRow><br />
{<br />
private Guid matrixId;<br />
private string name;<br />
private string description;<br />
<br />
public Matrix(){}<br />
....<br />
<br />
public class MatrixRow : BindingList<MatrixRow.MatrixField><br />
{<br />
private Guid matrixRowId;<br />
private string name;<br />
private string description;<br />
<br />
public MatrixRow(){}<br />
....<br />
<br />
}<br />
}<br />
<br />
public string Name<br />
{<br />
get { return this.name; }<br />
set { this.name = value; }<br />
}<br />
<br />
public string Description<br />
{<br />
get { return this.description; }<br />
set { this.description = value; }<br />
}<br />
}<br />
The Matrix collection have properties such as “Name”, “Description”, etc which I would like bind to some textboxes.
this.wmTxtName.DataBindings.Add(new Binding("Text", this.matrix, "Name"));
This implementation produces the error: “Cannot bind to the property or column Test on the DataSource. Parameter name: dataMember”
As mentioned earlier I’m using a custom implementation of BindingList named SortableBindingList. SortableBindingList doesn’t do anything else than sorting the collection in different ways. Well, when I’m using SortableBindingList instead of BindingList I don’t get the error, it just won’t bind. That’s also freaking me out a bit, because I really don’t understand why it doesn’t produce the same error.
I also tried implementing ITypedList, but it’s not helping me perform simple databinding on the properties on the collection.
I would like to think that I’m not the only one who’s experiencing this problem, so if anyone have the same problems, or have a solution to this, please answer.
Best regards,
Jan-Erik Romøren
-- modified at 5:40 Wednesday 23rd May, 2007
|
|
|
|
|
Hi!
I'm working on a webservice project with around 10 types of XML files.
Each type is described by a XSD schema file.
Having such an XML file, I'd like to print it in a friendlier format(like HTML) so the user can make sense of it.
I know that this is done with XSLT, but for that I need XSL style sheets, which unfortunately I lack.
Is there any way to create an XSL style sheet starting from the XSD schema that describes the structure of the XML document?
What kind of XML software could prove helpful itself for this task?
Thank you.
|
|
|
|
|
Hi All,
How can i connect to a FTP server and down load the files from there in a C# application.
We are using .NET frame work 1.1 and cant use any third party components. I have tried using Webclient class. Its working fine when i use a http URL But generating the following exception while connecting to a FTP server.
System.NotSupportedException: The URI prefix is not recognized.
Any help is appreciated.
Thanks and Regards
Mahe
|
|
|
|