|
|
Hi,
can you kindly give me an example of how can I zoom an image in a PictureBox using the Matrix method (as I had shown in the code-snippet) or any other method please?
Thanks
C.N.
|
|
|
|
|
You are not zooming the image itself. Instead, you are telling the view (Graphics) how to render the image.
This is the advantage of using Transforms... drawing code does not change. Just the parameters of the rendering. Derive a class from PictureBox (or control type of choice...) and modify the OnPaint routine appropriately.
public class ZoomPictureBox : PictureBox
{
private float m_zoom = 1.0F;
public float Zoom
{
get{ return m_zoom; }
set{ m_zoom = value;
if( this.Image != null ) Invalidate();
}
protected override void OnPaint(PaintEventArgs e)
{
Matrix matrix = new Matrix();
matrix.Scale( m_zoom, m_zoom );
e.Graphics.Transform = matrix;
e.Graphics.DrawImageUnscaled( this.Image, 0, 0 );
// base.OnPaint (e);
}
}
|
|
|
|
|
:
Hi all,
I am developing a c# application and there are two version of .net Framework installed in my computer. They are <1.0> and <1.1> I want to know exactlly which .net framework I am using and how to choose a framework to run.
I can run my application successfully with the enviroment that <1.0> and <1.1> frame are installed together.But when I install my application onto anther computer which only <1.1> framework is installed.The applicaiton can not run as same as the previous one.I am wondering?
Any suggestions.Thanks in advance
|
|
|
|
|
1.1 should be able to run 1.0 apps fine, minus a few minutia quirks, mostly involving remoting.
To see which version you've got running, go into %windir%\Microsoft.net Framework\ and you see the versions installed. Visual Studio 2003 uses .NET 1.1, Visual Studio 2002 uses .NET 1.0.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Hi,
Does anyone know of a .NET library for reading and writing PalmOS database files (pdb/prc) on the desktop?
Cheers!
|
|
|
|
|
Palm database records are pretty basic things, they are basically a header, and then raw data in the format specified by the app. I reckon you'd do as well to read the docs for the app that's writing the file, then reading it yourself.
Can you write some Palm stuff ? I'd start by creating some small databases that contain a small number of known values.
I don't know of any library.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'we allready written a DB reader/writer in MFC/C++ for a previous project and I think I now have figured out how to best invoke it through C#, allthough it would have been nice with a finnished .NET library for this.
(I'm writing the Palm app that reads the data and the desktop app that generates the data, so the raw data format is not a problem.)
Thank's anyway.
|
|
|
|
|
hi, how i can make a trial version of the windows project that i do using c# language,.... help me plz
Thanks alot
Hamody
|
|
|
|
|
You can make it by taking the date within the first runtime to the application and store it in the config file in the same directory,and then after finishing your period jst disable the application.
|
|
|
|
|
But, what if the user re-installs the application again after the trial period expires? Will it not reinstall the config file with a fresh trial period?
Secondly, can't the user directly edit the date in the cofig file? Even if you encrypt it, the encryption key will have to be strored somewhere in the config file or the program itself, so that the user can still decrypt the date and edit it, may be after some efforts.
So, will this solution work?
|
|
|
|
|
That depends on your thoughts, you can create a registry entry to act like a flag to you ,or you can try anything else.
|
|
|
|
|
You can make it by taking the date within the first runtime to the application and store it in the config file in the same directory only .
|
|
|
|
|
hi omar, could u please help me by some code plz
Thanks alot
Hamody
|
|
|
|
|
|
Hi, Sir and Madam!
Regular Expression for repeat string Please.
Thank You.
|
|
|
|
|
What do you mean? Can you give us an example?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have a String
I wish to check that are there repeat substring in the String and what substring repeat.
Sorry fro bad English
Thank You.
|
|
|
|
|
hi,
These contents i want to insert after farm elements where farm is equal to dev2
<database state="0" name="one" sourceType="amacs">
<database>
I want Xml(database) to be inserted after farm where farm is equal to "dev2"
I am giving you the structure of XML file
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm name="dev1">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
<database state="0" name="bd_plc1_house1_14022005" sourceType="amacs">
<tables state="0" name="feed_delivery">
</table>
</database>
</farm>
<farm name="dev2">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
i have the code pls anybody can modify it
This code givens syntax error
xmldoc.DocumentElement["farm name='dev2'"].PrependChild(databaseElement);
regards
sanjeev
|
|
|
|
|
Hi
I want to add string to an array and retrieve that string from Array
Pls send me code for that regards
sanjeev
|
|
|
|
|
ArrayList myStrings = new ArrayList();
Add item to array:
myStrings.Add("string1");
myStrings.Add("string2");
myStrings.Add("string3");
Get item at index "index":
string getString=(string)myStrings[index];
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If you mean add ONE string as array,you can add it by several methods as Split(),and Substring(),or ToCharArray().
|
|
|
|
|
Hi,
I want to create a textbox which shows text in black when disabled.
Unfortunately the selecting, deleting and editing the text don't work and it's in a different font.
Does anyone know what code I need to add to make the textbox work like a textbox except for the enabled = false part?
Thanks,
Serdar YILMAZ
Senior Developer
|
|
|
|
|
Have you inhereted your class from TextBox() ?
|
|
|
|
|
If someone know yahoo messanger or msn know i can press a button in the chat window and other play a sound to make quaver the chat window.
How can i do it using c#?
Tnx
|
|
|
|