|
I believe that the static Form.ActiveControl property is what you need.
|
|
|
|
|
Thank you, that gets the job done. BTW it is an instance, not static, property.
No eternal reward will forgive us now for wasting the dawn.
- Jim Morrison
|
|
|
|
|
dennisd45 wrote: BTW it is an instance, not static, property.
Doh! Of course, it doesn't make sense for it to be static. Sorry about that.
|
|
|
|
|
I want to know how to rotate text when I print to my printer.
I try this
/////////////////////////////////////////////////
e.Graphics.TranslateTransform(0,0);
e.Graphics.RotateTransform(40);
e.Graphics.DrawString("XXXX",
new Font(fontName, fontSize, fontStyle),brush, 20,40);
////////////////////////////////////////////////////////
but this move the text out of the page
what I need to do that the text will stay on X and Y I put??????????
|
|
|
|
|
Since you want to preserve the drawing coordinates, rotating the graphics will not work well. Instead, use the DrawString overload that takes a StringFormat parameter. Using StringFormate.FormatFlags will allow you to draw the text vertically, IIRC.
|
|
|
|
|
hey guys.
I wanted to create a form that could contain any 3D object i put inside and the put couple buttons to circle left and right around the 3D object if u could direct me on a source code or give me a source code THANKS!
|
|
|
|
|
Try the samples in the managed DirectX SDK.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
I am having trouble understanding how all the print objects work together.
I have tried a few different ways and get compile errors every time.
Basically, i am trying to define a custom page size to be printed on, then specify where on the page the image needs to be printed.
My first thought was to figure out how to make a custom page size, then change the margins to constrain the image to a certain area of the page. Is there a better way?
I am working in VS .NET 2003 on the .NET 1.1 Framework. I am trying to find a solution to this so that it is automatically done. I don't want the user to be able to change the place on the page that the image is to be printed.
In my code now, I am only using a PrintDocument to handle all the printing.
Any help will be greatly appreciated.
|
|
|
|
|
Is there any API or code that can enable me to Play a continuous stream of PCM data....
Thanks in advance
-- modified at 10:58 Monday 7th August, 2006
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
|
for example execute help.chm
|
|
|
|
|
System.Diagnostic.Process.Start("help.chm");
|
|
|
|
|
|
Good day
Im writing a little application sends information to a Sql Express database for a duration of time (maybe 5 minutes). The application works fine but when I run it from two workstations at the same time, i get deadlocks. I have gone through my code a lot of times and i dont see anything wrong there.
Could there be a problem with Sql Express and concurrent transaction?
Kulile --- RSA
|
|
|
|
|
Where does it say that the deadlocks occur, and what do you do with those tables?
If I'm not mistaken, SQL Express uses the same transaction handling as SQL Server, which is up to version 9.0, so it's rather well tested. It's quite more likely that the problem is in your code than the database server.
---
b { font-weight: normal; }
|
|
|
|
|
Damn! You beat me to it.
|
|
|
|
|
kulile wrote: Im writing a little application sends information to a Sql Express database for a duration of time (maybe 5 minutes).
Are you saying that you have a transaction that lasts 5 minutes?
If yes, then I guess this would cause a deadlock because while the transaction is in progress on one workstation it will lock things in the database untill the transaction is committed or rolledback. Obviously the other workstation needs those resources too.
kulile wrote: Could there be a problem with Sql Express and concurrent transaction?
No. SQL Server 2005 Express is unlikely to be the problem.
|
|
|
|
|
I want to make a 3rd party program that listen packets sent between a server/client application running on my PC. I think that it’s done by placing a hook that capture the packets sent, but I don’t know how to do it. Can anyone help me please?
|
|
|
|
|
There are lots of articles in codeproject for that:
http://www.codeproject.com/cs/internet/sharppcap.asp
http://www.codeproject.com/csharp/pacanal.asp
http://www.codeproject.com/dotnet/dotnetwinpcap.asp
http://www.codeproject.com/csharp/pktcap.asp
|
|
|
|
|
|
lol... I voted 5 for your reply!
|
|
|
|
|
Hello everybody.
I create a relation between two table by using below code.
ds.Relations.Add("REL", ds.Tables["Parent"].Columns["A"], ds.Tables["Child"].Columns["B"]);
After that I delete a record from table Parent which is parent table. Deleting proccess running truly however child rows have not been deleted from other table.
What must I do.
Thanks.
|
|
|
|
|
I believe you need to set up the relation with a cascade delete to remove the child rows.
This can be done by setting delete rule of the relation to Cascade.
e.g.
DataRelation rel = new DataRelation(ect);
rel.ChildKeyConstraint.DeleteRule = Rule.Cascade;
ds.Relations.Add(rel);
(I have not tried this so am not 100% sure it will work)
|
|
|
|
|
I used below codes but it didn't work.
ds.EnforceConstraints = true;
ds.Relations["REL"].ChildKeyConstraint.DeleteRule = System.Data.Rule.Cascade;
ds.Relations["REL"].ParentKeyConstraint.DeleteRule = System.Data.Rule.Cascade;
|
|
|
|
|
Sorry.
There is a Constraints property on the DataTable. Try creating a ForeignKeyConstraint object and setting the DeleteRule = Rule.Cascade, then add it to the child table.
|
|
|
|