|
|
Yes thank you, this is ok for beginning, and I used this method.
But what if I need to draw each letter of the word with different angle?
My thought was to create a number of fonts(30,45,60) degrees and draw each letter with such font. What do you think?
Thank you!
|
|
|
|
|
I made a simple control which has some additional fields and properties and inherits from Label. I also override the OnPaint method. The control has a border, which has a color and thickness. If I set the boreder thickness to 30 pixels, I don't see the first lie of text. Is there any way to make the control show the text inside the border? I know I can draw the string in the OnPaint method, but I want the base OnPaint to draw the string becouse it can center it, wrap and so on. Pls help!
|
|
|
|
|
No,
The base class doesn't know that you've drawn to the surface, once you start doing custom drawing your taking responsibilty to do all of the drawing (unless it doesn't interfer with the base class drawing).
|
|
|
|
|
Hi!
I have been making some .net controls lately which I have tried to expose as ActiveX controls. Exposing them and registering them went smooth, but now I'm trying to access them from unmanaged C++. How should I do this? I expect I'll have to define a C++ interface so the compiler knows how to interpret the pointer to the interface, but how should I make it?
|
|
|
|
|
My understanding of this is that when you expose a .NET assembly to the COM world, the compiler will generate the necessary COM interfaces for you.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
Well... it does.. that is.. it generates the necessary code, but it doesn't generate any headers.. And I'll need a header with these definitions to use the code in C++ don't I?
|
|
|
|
|
|
Hi every body,
I want to generate a random number between 0 and 30,000. How this can be done in C#.
In C, it is like this.
int Random = rand()%30,000;
Could any one please help in this regard.
thanks a lot.
|
|
|
|
|
|
Random random = new Random();
int randomNumber=random.Next(30000);
/\ |_ E X E GG
|
|
|
|
|
Hi...
I have a richtextbox, it has about 200 lines, and i want to go to line 125 when i press a button!
I have made this code...
int count = 0;
int GoTo = 125;
for(int i = 0; i < GoTo; i++)
{
count += richTextBoxText.Lines[i].Length;
}
richTextBoxText.Select(count,0);
but this does not work.
My idea was to get all chars from the lines until it reached 125, and then go to the line using the select method.
Can anyone help me how to do go to a line in a richTextBox?
Thanks
QzRz
|
|
|
|
|
RichTextBox.Lines won't return the number of lines in the box that are due to word wrapping, but rather, it will return the number of lines due to new line breaks (Environment.NewLine) in the text.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
I am with a problem in a program to which I am elaborating and I wait that they help me.
In the program a button will be pressured, it must send the information to the other program that keyboard key ENTER was pressured.
In this another program keyboard key ENTER has a definitive function.
This is the logic, however my only one doubts this in:
As to determine that the keyboard key was pressured, being it for the program and not for the keyboard.
|
|
|
|
|
I don't think anyone here understood your question. Could you explain it better? what do you want to do? differentiate when the Click event of the Button was raised because of the user actually clicking the button or because the user pressed the Enter key?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Sorry my English is bad, more one day I learns to speek correctly. XDD
In the game, when pressuring keyboard key ENTER, open the Console. I have code of send information, what I need is simple, when pressuring the button in the program that I am creating, it will send the information that keyboard key ENTER was pressured, however I do not know to define that this keyboard key in specifies was pressured.
Thank you, for your attention and patience.
|
|
|
|
|
So, you want to simulate the Enter key being pressed when the user Clicks on your button?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
|
See SendKeys.Send[^]. It't might do what you want. And be sure to take a look at the NOTE at the very botton.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Thanks.
Case that it will simulate keyboard keys of number 0~10, how to make?
|
|
|
|
|
Hi!
I would like to make a custom control with a menu that drops down when the user clicks it (sort of like a combo box) - but I can't seem to find a way to make parts of the control (the drop down menu) overlap other controls like the combobox does. Any suggestions?
|
|
|
|
|
Search MSDN or codeproject, there are many articles on doing custom control drawing.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
Yeah... I've done alot of custom control drawing, but this is a bit different since it's supposed to be able to pop up over all the other controls... I guess I'll end up using a normal control that makes sure it's topmost all the time while it's visible. The best thing would be to be able to make a custom ContextMenu (since they're able to hover over other controls)
|
|
|
|
|
Ah, I understand your problem now. Have you tried setting the Region of the control? I think with that you could draw past your control bounds...
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
hello friends i m making a project in ma university and for that i need to get image from scanner and display it in the picture box in c#...i found the relative code for vc and vb but couldnt not find it for c #....i found one that was of Twain but it has copy rights ...........
so plz any bodu plz can help me and send me a code in which to get image from scanner and display it in the picture box in c# plz i will be looking forward for the code as soon as possible thnx u very much palz...tc u all
Momi
|
|
|
|