|
cudnt find any...
Don't try to make someone love you..Try to be the one who can be loved...
|
|
|
|
|
|
you zoom an image by drawing it bigger - look at the DrawImage overloads on the Graphics class that let you specify the area to draw AND the area to draw it to.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
So yeah, like Chris said, use the DrawImage overloads.
To zoom 40% you need to multiply the width of the image by 0.4, so something like DrawImage???(myImage, myImage.Width*0.4...);
I'm not sure on what the overloads actually are, or what parameters they take.
You will of course be needing to draw the image yourself, rather than using a pictureBox.
My current favourite word is: Bacon!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
I am trying to get these 2 programs to work together.. one prevents autoplay in windows xp and the other detects the drive letters for newly inserted media.. The problem is, autoplay is in VB and the drive detector is in C#..
Currently, I only know a little C# and no VB.. and using online converters has not helped any, as there is always an error of some sort.. The main thing I'm trying to do, is convert one language to the other, and put them together into one program, with the end result of a program that stops autoplay while detecting new drives..
If somebody finds this file on this site.. tell me and i will change it..This is the program to prevent autoplay..
PreventAutoplay(VB)[^]
and this one detects the drive letters..
DriveDetector(C#)[^]
|
|
|
|
|
To convert VB.net to C# download sharp develop.
If it's VB6 you're SOL and will have to do a manual port.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4....
-- El Corazon
|
|
|
|
|
Great program...works just as good as the website ive been using..but it has an issue after converting...a few errors that i am unable to fix..would somebody who knows what they are doing please help out a bit?..convert real quick and help me fix any errors it has?
|
|
|
|
|
No conversion program is perfect. IF you posted the code in question, perhaps we could help.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Is there a way to view the contents of a merge module through VS.NET or through some other free viewing tool?
|
|
|
|
|
|
|
Also the Files property in the setup project provides a popup that lists the files.
|
|
|
|
|
hi
i add a grid in my wpf window and load data from database.
now i want to bind grid control to dataTable, but i didn't found any DataSource property in Grid, how to bind it to display data ?
thanks
|
|
|
|
|
The Grid can't bind to a datasource. You can set the DataContext of the grid but then you have to create the layout etc and all the handlers for adding new rows etc.
If you are looking for a replacement for the DataGrid which is what I suspect you're after then Xceed give away a capable datagrid[^] for free which will do what you want.
I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
|
|
|
|
|
Hello, I am new at C# and I am having difficulty 'starting' to write a program I am working on because I can't find any good resources on the WWW to answer my two questions.
Can anyone recommend some relief for me?
Here is what I have.
I want to save some test data is xml and generate a html report from the data. I seems like an xsl is the way to do this but I am not real sure how to read write xsl/xml and generate a report in html with Visual Studio 2008?
Does anyone know of any easy to understand examples, on how to do this.
I think it would also be useful to use linq to select values in the xml file and process them first.
Thanks for your help.
|
|
|
|
|
Try here, I started doing XML/XSLT reports and this has good info for beginners.
http://www.w3schools.com/[^]
What was the SerialPort question?
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
Hi there,
After reading msdn, looking for answers in google and testing a lot of different things, I gave up and now I'm here hoping for an answer.
The Problem:
I'm having a big problem trying to delete a row from a DataTable wich is related to its father. The exception I'm receiving is "Null Reference exception" (or something like that, my visual studio isn't in english)
The structure:
DataSet dsData contains:
DataTable dtbClients -> PrimaryKey: 'MotherAccount'
DataTable dtbAccounts -> PrimaryKey: 'ClientName'
DataTable dtbProducts -> PrimaryKey: 'CodeProduct'
Wich are related like this:
dtbClientes -> dtbAccounts (through column 'MotherAccount')
dtbAccounts -> dtbProducts (through column 'ClientName')
The data:
In this specific case, dtbClients has only 1 client wich has 1 account (in dtbAccounts) with no products.
What am I tried to do:
First I tried to remove the client directly because I though that the cascade constraint automatically created when we make a relation would take care of deleting the associated row in dtbAccounts. But that didn't happend.
The application threw and Null Referenec exception, and the stackTrace pointed to a function with 'Cascade' in its name.
Question 1): Is it possible to fix this exception and make c# delete everything associated to the removed client?
Well, with this exception I quited trying to delete the client directly and tried something else.
This time I'm removing the account related to the client first, this way when deleting the client there would be no problems since there are no rows related to it (I've no problems deleting clients with no accounts associated).
The problem:
It gives me the same Null Reference exception when trying to delete the account first! And it doesn't have any product related to it. My guess is that somehow the parent row(client) is related to it, so I can't delete it.
Question 2): How do I delete this account?
Can anyone help me with this ?
I hope I was clear enough.
Thanks in advance!
Oscar
|
|
|
|
|
Oh, another thing,
What I'm trying to do over there is actually one part of a mergin process of 2 datatables.
Actually is not a merge, it is an update.
The old dataset will be updated to look exactly like the new one, wich means that new rows will be added, old rows will be updated and old rows will be removed.
Well, I've just discovered the DataSet.Merge(DataSet) function and it is quite usefull.
The problem is that it doesn't seem to remove old rows in the target dataset that are not in the (updated version) source dataset.
Is there a way to do this not manually? A function? A property? I don't know... something that would make the Merge function delete rows from the target dataset.
Thanks in advance!
Oscar
|
|
|
|
|
Can no one help me with this ?
Thanks
Oscar
|
|
|
|
|
Hello,
1) What is the best way to check the anonymous proxy?
2) How to check whether a particular proxy server is enabled SSL or not?
Let's say there is a list of anonymous proxies [^]. I wanna check which server is up and running and which server is enabled SSL...
How can I do that?
Initially, I was thinking to use "My.Computer.Network.Ping(url)" method but we can't specify the port so that I can't use it in my case.. What about WebRequest?
In this page[^], they wrote like below
What is a free proxy checker?
Free service trying to provide daily updated list of public HTTP proxy servers. Usually provide small list of proxies with low percent of functioning servers due to hosting restrictions on CPU time (they simply can't allow themselves to check many proxies every second especially in parallel).
So, I believe that there are some ways to check the proxy server and SSL..
Any idea? Thanks in advance
|
|
|
|
|
Which platform (asp.net or C# client)?
|
|
|
|
|
Bert delaVega wrote: Which platform (asp.net or C# client)?
Either one is okay for me.
|
|
|
|
|
Try using Tcpclient to connect to the listed ports. That'll give you an indication if the proxy is active or not.
Namespace: System.Net.Sockets
|
|
|
|
|
thanks.
#1) Will it be worked with URL?
#2) How can I check whether a particular server is enabled SSL or not?
|
|
|
|
|
private Bitmap rotateImage(Bitmap b, float angle)
{
Bitmap bmp1 = new Bitmap(b.Width, b.Height);
Graphics g = Graphics.FromImage(bmp1);
g.TranslateTransform((float)b.Width / 2, (float)b.Height / 2);
//rotation
g.RotateTransform(angle);
g.TranslateTransform(-(float)b.Width / 2, -(float)b.Height / 2);
g.DrawImage(b, new Point(0, 0));
return bmp1;
}
I found this code in a site..This deals with Rotating an image..
But when i crop with this... Image is getting vanished on its edges..
How to perform rotation without any modifications in the image size? Any modidications in this or any clues?
|
|
|
|