|
Here is some pseudocode.
class MyForm
{
private Bitmap myBitmap;
MyForm()
{
InitialiseBitmap();
}
OnSizeChanged()
{
InitialiseBitmap();
Invalidate();
}
OnPaint()
{
e.gr.DrawImageUnscaled(myBitmap, 0, 0);
}
InitialiseBitmap()
{
if (myBitmap != null)
{
myBitmap.Dispose();
myBitmap = null;
}
myBitmap = new Bitmap(the size of your drawing window);
using (Graphics gr = Graphics.FromBitmap(myBitmap))
{
draw some stuff on the bitmap
}
}
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to make the start of OXY system coordinates not on the left-top, but left-bottom... Is it possible?
|
|
|
|
|
I'm not sure if there is a transform which does this. Either way, do you want this to work while drawing on a bitmap, for your entire Windows app, or what ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I just want to have point in the left bottom corner when i draw it on the screen with coordinates (1,1) .... So Y scale is inversed....
|
|
|
|
|
Yes, I know
This[^] article is as good as it gets. Otherwise, if you're doing drawing only, you can always invert the image at the end.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi:
Can you please guide how to use SecureSockets in C#? Is there a latent support out natively in the framework or should we necessarily go for a third party or open source library?
Perhaps if you could guide me with some SecureFTP stuff too, it would be great. But it is not still a standard right?
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
http://www.mentalis.org/soft/projects/ssocket/[^]
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
Hello Friends,
I want to inherit from Label control and draw the Text of the lable myself. This is because of the standard Lable control doesn't have any property to justify text within it. How can I use System.Drawing.StringFormat and DrawString method to gain this goal.I want to justify both left and right edges of text ! Like the following sample :
Sample Text
Sample Text
Sample Text
Always there is another way !
|
|
|
|
|
What about the TextAlign property?
---
b { font-weight: normal; }
|
|
|
|
|
Hi all,
try this:
StringFormat sf = new StringFormat()
sf.Alignment = StringAlignment.Near;
sf.LineAlignment = StringAlignment.Center; drawParams.Graphics.DrawRectangle(Pens.WhiteSmoke,col.Rec);
drawParams.Graphics.DrawString("Test",yourFondHere,Brushes.Black,yourRectangleHere,sf);
GanDad
|
|
|
|
|
It has been worked.Thank U very much !
Always there is another way !
|
|
|
|
|
Why another way? Haven't you seen the TextAlign property?
---
b { font-weight: normal; }
|
|
|
|
|
Thanx NassosReyzidis.It has been worked !
Always there is another way !
|
|
|
|
|
Happy to help man, don't mention it
GanDad
|
|
|
|
|
it's work really nice thank you so much for this code
|
|
|
|
|
Hi! Im trying to create a program where i need to filter out a group's salary deduction amout based on their monthly taxes. Although i can't seem to find the right code that declares a month's last day since not all months have the same ending day (31, 30 and 28 for feb). Can someone please give me the concept behind this code? I was thinking of doing an if...else or switch...case statement but it occured to me, what if it was a leap year...? Thanx so much for your help!
thanx
|
|
|
|
|
|
woah that was quick! thanx so much that did the job
thanx
|
|
|
|
|
Hi All,
I have converted the TypeLibrary to assembly using TypeLibConverter class's ConvertTypeLibToAssembly mehod.
But i want the GUID of the Type Library. How to get GUID from TypeLibrary ??
Thanks
TusharM
|
|
|
|
|
If .net isnt installed, my app wont run.
Can i get it to display a message saying that the user needs to install it?
(I'm doubtful that you can but, you never know...)
|
|
|
|
|
You might create a proxy application that does not use .NET.
This first checks if the .NET runtimes are installed and the decides whether to display an error or to start the .NET applocation.
/cadi
24 hours is not enough
|
|
|
|
|
No,this tool is provided by Microsoft Check it out[^],and it the .NET redistibutable with it and it will check if .net isn't present it will launch the .NET setup and then Your application immidete after the .NET setup is finished,if the .NEt is already installed it will launch your your application setup.
|
|
|
|
|
Like cadi said, you have to write a proxy application that checks for the existance of the .NET Framework, preferrably the correct version of it. Then it launches your application is the requirement is met.
The catch is, you can't use C#, J#, or any of the Managed languages to do this. It either has to be written in unmanaged C++ or some other language that doesn't need the .NET Framework to run.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i overrided ProcessCmdKey to capture enter in datagrid and its working. now how do i catpure this keypress on application level when enter is pressed. (or how do i send signal form overrided ProcessCmdKey in mydatagrid class to application...i want to run method on that event).
need help ..please
bye
|
|
|
|
|
client recieve bitmap data in thread from server.
when this data assigne to pictureBox from thread it is halt.
|
|
|
|