|
Is there any .NET framework class which exposes Windows Terminal Services API?
omkamal
|
|
|
|
|
I have a string ,if somethings happen in my applicaion it ends with "AND" statement,I check if it ends with "AND" withEndWith() ,if return true I want to remove "AND",I can't do it with Remove() ,because I don't know the starting position.
How can I manage this operation?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
string s=MyString.Substring(0,MyString.Length-3)
Jerzy
|
|
|
|
|
To draw a transparent bitmap on the form I use the old trick from VC++ which is to draw a bitmap that is stored in ImageList. When you set TransparentColor property of ImageList to the color of the bitmap's transparency color, the bitamp is drawn transparently on the form.
My problem is that this doesn't work when there is another bitmap on the form behind my bitmap. I want to see this another bitmap through the transparent bitmap.
In VC++ a was using SRCCOPY, SRCAND and SRCINVERT in BitBlt(). I don't see any equivalent of raster operation codes in C#.
Any ideas?
Jerzy
|
|
|
|
|
Bitmap bmp = Bitmap.FromFile( strFilename );<br />
bmp.MakeTransparent( clrTransparentColorInBitmap );<br />
<br />
Graphics g = GetGraphicsObjectToPaintOn();<br />
<br />
g.DrawImage( bmp, x, y );
Took a bit of searching to find it
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Thanks James
Yes, it's a nice alternative to was I was doing (using ImageList class). But I forgot to explain that I was using PictureBox control not device context. I still wonder if I could use two PictureBox controls, one transparent over the other.
Thanks again
Jerzy
|
|
|
|
|
ive got an inherited form base class (BannerDialog) that has a banner on top and buttons on the bottom. the banner and buttons are anchored to the form using the ide'd design window.
my problem is that on the inherited form (MyDialog : BannerDialog) the banner and buttons dont move when MyDialog resizes.
|
|
|
|
|
Did you call base.OnResize() ?
Jerzy
|
|
|
|
|
im not certain what you mean. i currently do not call base.OnResize().
If i do, do i override BaseClass.Resize()? and if so, how do i resize the base class's window size? where do i get the dimentions?
*** added ***
if i delete the inherited form's "this.ClientSize = new ..." in the Initialize component, and do nothing else, it seems to work. the form snaps to the inherited window's size and anchors properly. but i dont understand why.
|
|
|
|
|
well, after toiling around the msdn i found a little blurb stating that controls on inherited forms that have anchor properties MUST be set to PROTECTED and not PRIVATE..
exposing controls is the absolute wrong way to write inherited forms (im no architect, but im pretty sure that breaks the model). -- unless there's a way to block the user from directly accessing the PROTECTED control aside from setting it's anchor.
so the solution..? in base.Resize() i simply made the layout recalculations myself. years of vb experience pays off.
|
|
|
|
|
Hello, I've a datagrid with a dataset wich I get from a WebService. When I insert, update, etc there are some messages that I want customize (null value not allowed, duplicate key, etc). This messages are created "locally" before to send modifications to the database, but I don't know how to catch it before show it in order to customize.
Any idea or suggestion?
Thank you.
|
|
|
|
|
any idea??
big thx!
Pawel
|
|
|
|
|
generate a random no , convert it to string, take out the first five characters and then convert it back to no.
You can look at how to generate random nos in the System.Security.Cryptography namespace.
There is a class for random no generation.
Hope this helps.
Cheers
Kannan
|
|
|
|
|
cool!!
and thx..
but can you give me a code sample how i can generate a #?
becouse i can´t find any code sample in the msdn.
thx
|
|
|
|
|
I am still pretty new to C#, but on a hunch I would check out the Random class...
|
|
|
|
|
By default windows form are resizable,How can I make it fixed size?
Thanks
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
MyForm.FormBorderStyle=FormBorderStyle.FixedSingle;
MyForm.FormBorderStyle=FormBorderStyle.Fixed3D;
MyForm.FormBorderStyle=FormBorderStyle.FixedDialog;
Jerzy
|
|
|
|
|
Thanks,I don't know why I didn't see that property.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
when i choose project-new-c#-windows-app i only get one form and the corresponding class.
but when you look at the c#-scribble example in the msdn-lib, and especially the readme.txt-file there, you see that some wizzard created a "mainframe"- a "doc"- and a "view"-class. like in good old mfc-times
so where is that wizzard? does anyone know? of course i could just take the scribble-code and change it to fit my needs, but i want to know the ide i'm working with. so where is that thing hiding?
i'm working with vs.net
thx in advance
:wq
|
|
|
|
|
Sorry Rupel,C# does not have Doc/View artichecture up to now.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
so these redmontonians build there examples with some next version we get in 6 months? shame on them!
:wq
|
|
|
|
|
I overheard somewhere, sometimes, some people actually write code themselves...
|
|
|
|
|
sure? really?
what do you think i did that day? go and cry? i did code the thing myself - but if there is already a wheel invented, you don't have to do it again and again... right?
:wq
|
|
|
|
|
There isnt any doc/view implementation in the framework.
But chris sells is developing something new, check out his page
genghis
hope this helps.
cheers
Kannan
|
|
|
|
|
Hi,
How would i go about making an external application, disappear from the task bar in windows?
If anyone can help me with some code sample or maybe a pointer i would appreciate it.
|
|
|
|