|
I seem to recall, but am not sure, that when you have a Form.Paint() event,
that it paints its' background and borders, then iterates through all controls issuing their Paint() method.
Now I have some logic that is keying off of the DataGridView.RowPrePaintEvent but I want to make sure that once I did the painting of the rows the very first time, that I no longer go through the long chunky code I have to implement. So my thinking is this:
I overload my Form.Paint method
Form.Paint does a base.Paint();
the base form paint method then calls all the controls
each DataGridView.RowPrePaintEvent is fired and processes correctly.
since it is the first event I also execute the ugly code that is long and bulky
when base.Paint() returns, I can safely say I painted my form the first time and set my state to processed.
Does that sound quite accurate in the sequence of events???
|
|
|
|
|
Hi guys,
I am having a weird problem. I have always had this working and now suddenly after moving to a different computer and reinstalling visual studio 2003.NET; my application doesn't show the tree structure for the FolderBrowserDialog. here is my code for the browse buttons.
private void cmdBrowse1_Click(object sender, System.EventArgs e)
{
TBSrc.Text=GetFolderPath();
}
private string GetFolderPath()
{
string sTemp=string.Empty;
folderBrowserDialog1.ShowNewFolderButton=true;
folderBrowserDialog1.ShowDialog(this);
sTemp=folderBrowserDialog1.SelectedPath;
return sTemp;
}
Please help!!!!
sasa
|
|
|
|
|
Someone mentioned the same issue a few weeks back. IIRC, it was to do with the app running in MTA. Search the forum
|
|
|
|
|
Thank you; you were right, I searched and found the reason and solution.
sasa
|
|
|
|
|
I have a Ipscaner.exe programe which is for scanning the live ip addresses of pcs in a network.I have got the dll file of the programe.Can u pls suggest me how to call the dll from the C#.
sxasxaxaxasxaxasxasxasxaxxasx
|
|
|
|
|
If the DLL which contains the method (function) was written with managed code, then simply add a reference to it in your Visual Studio project, and call the method.
If the DLL is COM-based, create an RCW from the DLL's TLB, and then call into the RCW.
If the DLL is just plain old native code, use PInvoke.
If you have any questions about how to do any of the above, search CP or Google for examples.
|
|
|
|
|
Hello,
The users require a shortcut key to allow them to navigate from one groupbox to the next. I am catching the key press event in the forms base class. The group boxes that will be available for navigation are in an arraylist that is available to the base class. How can I determine which groupbox is currently active? I tried the Focused property, but it always returns false. I have looped through each groupbox's Controls collection, and tested the Focused property of each control, but they all return false as well.
Is there any method or property that I can use to determine the active control? Or will I need to do this manually?
-- modified at 13:01 Monday 7th August, 2006
I am using C#, VS 2003.
|
|
|
|
|
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?
|
|
|
|