|
Professional C# by Wrox Publishers
Akif
|
|
|
|
|
please ,send me the C#.NET step by step programming.
signature:
chandrasekhar
|
|
|
|
|
You may wish to consider purchasing it yourself. That way the author will be compensated for the considerable time and effort put in to writing the book in the first place.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
Hi.
There are a variety of good books to learn C# besides the one just mentioned to you. Programming C# by Jesse Liberty is good, the same goes for C# Unleashed by Joe Mayo and the same goes for C# The complete reference by Herbert Schildt.
If you look them up on amazon you might be able to see their content there.
Good luck,
FJ
|
|
|
|
|
|
Hi,
My add-in will debug for a distribute program, so I need to set different break points to diff "Node"s. I insert new ones and remove old break points at runtime when node switchs, this is done successfully, but my program still stop at the old break points, and the break point's BreakPointLastHit property is null (because I remove old ones already).
what shall I do to stop my program at the new ones.
|
|
|
|
|
Hi
I have a simple WinForm I've created. With the following code:
//////////////////////////////////////////////////////////////
public void DrawXYAxes(Graphics g)
{
g.DrawLine(axisPen, xIndent, yIndent + 200, xIndent + 400, yIndent + 200);
g.DrawLine(axisPen, xIndent + 200, yIndent, xIndent + 200, yIndent + 400);
}
This will then draw X Y Axes on the form.
Let's say the screen coordinates at the drawn origin are "200, 200".
What's the most efficient way to get "200, 200" to display "0, 0"?
So now when I move the cursor around the Form it will have both positive and
negative axis coortinates?
ps--I know how to display the screen coordinates as text on the screen, I just can't seem to get the system to be correct....
Thanks very much......
|
|
|
|
|
I think that you may want to investigate Graphics.TranslateTransform() . If you translate the Graphics object by 200 left and 200 down, you'll have what you need, methinks. To see this in action, you can check out my recently published article Y(et)A(nother)TabControl in which I perform these kinds of transformations to translate the origin all over my control.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Curtis,
Thanks a lot for your help. I'm now at least able to draw a 'translated coordinate' Rect on my form inside the Paint Handler.
Now I just need to figure out how to tie this in to OnMouseMove event.
|
|
|
|
|
i want to set my own images for the scrollbar object to the up and down arrow button, for the bar, and the base.
How?
|
|
|
|
|
Best to create this control from scratch. I've tried in the past to OwnerDraw with the .NET scrollbar, but you end up recreating the entire control. You can construct one quick easily with a few buttons and a little GDI+ magic.
|
|
|
|
|
Hallo,
I'm not sure if here is the right place to post this question...
I'm using D3D 9.0c with C# and I have a little problem with Texture. Can anyone help me?
The strange things happens is the follow:
When I use PositionNormalColored and lighting=true it is all ok, all lights and shadows,
When I use PositionNormalTextured and light=true I see all black. When I set lighting=false the objects are correctly rendered, clearly without lights and shadows. Does anyon know why I'm having this problem? Maybe I'm doing something wrong?
Thank you very much...
_Comet_Keeper_ (from Italy)
|
|
|
|
|
Have you applied an actual texture? PositionNormalTextured won't have colored vertices. If you've assigned a texture, you may need to set the texture mappings. I'm not an expert myself in Managed DirectX 9 (or DirectX for that matter), so you may have better luck in a MDX forum (such as the GameDev.net Managed game programming forum[^])
|
|
|
|
|
i wanted to create an program to show an image as a crosshair in the center of the screen for some games. ive created the crosshair with a transparent form, the image background is transparent also, it works when im running a normal program like a web browser, but when i run a game such as Wolfenstein or Counter Strikc Source (running some resolution as windows) the form loses its always-on-top property. it is moved to the background. is there a way i can make the form ALWAYS stay on top?
thanks in advance,
sam kline
|
|
|
|
|
Not in a DirectX game. The window IS "on top" of the all the other windows on the desktop. But the game isn't drawn in a window on the desktop. DirectX draws directly to the video cards frame buffer, overwriting what GDI draws in a window.
Your form is still on top, but is only drawn when the form is visible. Since the DirectX games completely hides the desktop, your form is no longer visible and will no longer get any WM_PAINT messages to tell it to repaint itself.
You'll have to re-write this as a mod to the games. There's no "generic" way to do this for all games.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Have a very simple form (form2) that checks for the credentials.
The following code works but it leaves the dialog (form2) open. I just want to display Form1 if credentials are good.
if(textBox1.Text=="username")
{
//MessageBox.Show("good user, check password","Info");
if(textBox2.Text=="password")
{
//credentials are good, display Form1
Form1 firstForm = new Form1();
firstForm.ShowDialog(this);
}
else
{
MessageBox.Show("Bad user or password","Info");
}
}
else
{
MessageBox.Show("Bad user or password","Info");
} }
|
|
|
|
|
This is very easy to do. I just need to understand a few things of what you are trying to do:
1. Does this check happen on start up? If yes, there is a better way to do this.
2. After the MessageBox tells you "Wrong password...etc. what do you want to happen - everything to close?
3. You seem to have only OK button n the MessageBox that displays wrong password... do you want the same thing to happen if a person presses OK or cancels the dialog?
This will close and release all the resources associated with the form (including memory) the main form after the dialog has opened that tells the password is incorrect and OK is pressed or that dialog has exited.
if (MessageBox.Show("Bad user or password", "Info") == DialogResult.OK)
{
this.Dispose();
}
Let me know if this helps.:->
|
|
|
|
|
Hi peshkunta
I started the main project then later I decided to add another form (form2)to check credentials.
So what I did is change the code to point to second form2
-Application.Run(new Form2());-
This causes the second form2 to be displayed first.
Then if credentials are OK, form2 dispaears and form1 is displayed
I tried this code
using (Form1 f = new Form1())
{
this.Hide();
f.ShowDialog();
}
this.Show();
but when I close the main form (Form1), the first form (Form2) is displayed again.
|
|
|
|
|
I think you are making this harder than it has to be - your approach.
The most straight forward and easier for you in the long run would be:
1. Leave Form1 to start in the Application.Run function
2. Go to the Form1 events and add an on Load event handler(function). In this function add your code to start and show your Form2 - the authentication form. This will make Form2 open first and get the focus (be in front). Although both forms will be open (not sure if this is a problem in your case) if you make it as modal with ShowDialog() - that way the person will have to work with Form2 and not be able to mess with Form1 until it's been authenticated.
OR
If you want when you close Form1, Form2 to not be displayed, go to the event handler for Closing in Form1 and tell it to close Form2 when form1 is closing and that should solve the problem. I would use Dispose().
|
|
|
|
|
Hello, if I have a string object with RTF tags and I want to display it on richTextBox, is there a way to convert it so that the text would appear bolded (for example) instead of the tags for bold?
Mike - I love to program!
|
|
|
|
|
how can i send email using net.mail namespace. it gives me always unreadable adresess error.
Thanks
|
|
|
|
|
if you have same prob you should add
Mesaj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","0");
anybody didnot answer but nop
|
|
|
|
|
I have started a thread. And in the process of this thread I need to show another form and wait until user clicks OK. Since form is shown and until user clicks "OK" I need to pause this thread.
myThread.Suspend() dont work:
Warning 2 'System.Threading.Thread.Suspend()' is obsolete: 'Thread.Suspend has been deprecated. Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources. http://go.microsoft.com/fwlink/?linkid=14202'
How can I make Suspend() work ... or is there any another way to do it?
|
|
|
|
|
First, you cannot start a form from another thread. Create and use forms & controls ONLY on the UI thread. This is a golden rule of Windows UI programming.
If you need to show a form, show it on the UI thread. If a background thread needs to wait, have it watch a variable and Sleep(0) in a while loop while that variable is true:
while(myFormIsVisible)
{
Thread.Sleep(0);
}
I might be misunderstanding what your problem is. If you could better explain what you're trying to do, we might be able to help you further.
|
|
|
|
|
Judah Himango wrote: First, you cannot start a form from another thread.
That is a common misconception. The actual rule is "You can only access and manipulate UI/Form elements from the thread they were created on."
It's perfectly legal to create forms on separate threads as long as you obey the above rule.
Jared Parsons
jaredp@beanseed.org
http://jaredparsons.blogspot.com/
|
|
|
|