|
Good find!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
The difficult bit was figuring out which keywords to put into Google. Eventually after much trial and error I stumbled across "Autocad C#" ...
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Nah. Unless it is "help please", the first thing to do is paste the OP's subject line into the Google search box. Really easy.[^]
|
|
|
|
|
Er, I was being facetious Luc.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Really?
|
|
|
|
|
so then maybe this[^] would have worked beter.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
Hi,
I have a list of urls from where I need to download images. The images are being served from a database. Here is a sample url:
http://csmedia.mris.com/platinum/getmedia?ID=90217207979&LOOT=50045650620[^]
Since it is not an absolute path to the image, I am having trouble with it. Need your valuable expert guidance on a C# function to download image from the urls of the type above.
thanks.
|
|
|
|
|
you can use WebClient to download files from url
string url = "http://csmedia.mris.com/platinum/getmedia?ID=90217207979&LOOT=50045650620";
System.Net.WebClient wc = new System.Net.WebClient();
wc.DownloadFile(url, "test.jpg");
|
|
|
|
|
Hi,
Thanks for the prompt response. Will try it out.
Cheers.
|
|
|
|
|
Greetings Gurus,
Could you please advise?
My app needs to read the Windows Security log which means that the system's local policies > Audit policy has to have all its members enabled.
I have hunted high-and-low to find an example of how to do this in C# and although I have come across some WMI stuff allowing reading of the policies and some SystemEvents and SessionSwitch classes that monitor events I can't find anything that can a) check whether Audit Policy members are enabled and b) enable them should they not be enabled.
Can someone please let me know where I can find some information on doing this?]
Many thanks,
|
|
|
|
|
hi all,
I'm new to c#, so please forgive me if i ask some entry level questions.
currently, I have a little windows form that have cancel button on it. I noticed that when i run it on local machine the cancel button works fine. but it gives me security exceptions when running from network location on xp machine.
the exception is telling me I cannot call unmanaged code etc ....
but my form only has one button and the code within eventhandler is: Application.Exit();
after googling around I found that I can make changes through mscorcfg.msc to give permission to intranet. this worked for me.
the other workaround I found is http://msdn.microsoft.com/en-us/library/aa288469(v=vs.71).aspx[^]
and this does not work for me.
however, this is a workaround for one machine only, what if I have a hundred machines????
so I assume there must be some other ways to deal with this problem, can anyone please help??
|
|
|
|
|
The most efficient way is to write a small app in Lazarus or something similar, copy your .NET app to the local machines TEMP folder and ShellExecute it there. See if there's already an older version of you in there, and overwrite that - otherwise you'd clutter up the folder pretty quickly.
Bastard Programmer from Hell
|
|
|
|
|
When you have hundreds of computers, they will be in a domain. And then you can use Group Policies for the domain.
|
|
|
|
|
Hello Experts,
I am using System.Windows.Controls.Button and want to set image to button or background as a image.However i didn't find image property to button.I use following code but still not working.My main aim is setting up an image.
Thanks.
|
|
|
|
|
Um. I did:
Button myButton = new Button();
myButton.Image = Image.FromFile(@"D:\Temp\MyPic.jpg");
I don't know where you are looking, but it isn't in the Button properties...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I am not able to find Image property of Button. I searched on google too but i didn't get anything. I am working with WPF and C#.
|
|
|
|
|
|
|
|
I have a custom ComboBox control that I am working on. I do all of the painting myself. When the DropDownStyle is "DropDownList", meaning there is no TextBox area, it displays perfectly. However, when in "Simple" or "DropDown" mode, the TextBox area has a black area under it about 6-8 pixels tall and the font of the TextBox is bold. Even if I take out ALL of my code in OnPaint and I leave "base.OnPaint" it does this.
If I remove "AllPaintingInWmPaint" and "UserPaint" from the call to "this.SetStyle" for the control, it displays correctly. Except the ComboBox itself is drawn with the Windows default. Only the drop-down items are painted with my custom drawing. How can I style the TextBox area of the ComboBox?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
As an alternative solution;
Take a Panel with the height of a TextBox . Put a TextBox on there, and position it on the left, leaving 23 dull pixels from the Panel visible.
You'd get something along these lines;
public partial class MyComboThingy : Panel
{
const int arrowLen = 23;
Panel dropDownPanel = new Panel();
bool open = false;
TextBox TextBoxValue = new TextBox();
public MyComboThingy()
{
this.MaximumSize = new Size(9999999, this.Height);
this.makeSmaller();
this.Controls.Add(TextBoxValue);
TextBoxValue.Location = new Point(0, 0);
makeSmaller();
Paint += this._Paint;
}
void makeSmaller()
{
TextBoxValue.Width = Width - arrowLen;
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
makeSmaller();
}
protected override void OnMouseClick(MouseEventArgs e)
{
base.OnMouseClick(e);
open = !open;
if (open)
{
dropDownPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
dropDownPanel.Parent = this.Parent;
dropDownPanel.BackColor = Color.White;
dropDownPanel.Location = new Point(
this.Location.X, this.Location.Y + this.Height);
dropDownPanel.Size = new Size(this.Width, 150);
dropDownPanel.BringToFront();
dropDownPanel.Show();
}
else
{
dropDownPanel.Hide();
}
}
private void _Paint(object sender, PaintEventArgs e)
{
Rectangle myRect = new Rectangle(
e.ClipRectangle.X + e.ClipRectangle.Width - arrowLen,
e.ClipRectangle.Y,
arrowLen,
e.ClipRectangle.Height);
try
{
ControlPaint.DrawComboButton(
e.Graphics,
myRect,
open ? ButtonState.Pushed : ButtonState.Normal);
}
catch
{ }
}
}
Bastard Programmer from Hell
|
|
|
|
|
Ah, okay, I appreciate it. I was hoping to simply extend the existing ComboBox but this looks simple as well. I am not too lazy to do it. I just did not want to go through that if it was simpler. :P Thanks.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Is there a tool to keep track of user objects consumed by UI controls for a process ? I want to know the User objects/GDI objects consumed by different UI controls available within a single process. Please help.
|
|
|
|
|
Please don't crosspost. It's bad form.
|
|
|
|
|
Pete O'Hanlon wrote: Please don't crosspost. It's bad form.
Many newbies probably don't know what cross-posting means
|
|
|
|