|
Solid bars are just a property you can set. For the colour, you'll need to draw it yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
they're all options of the progress bar, but if you want a totally customized progress bar, look into owner drawing, or you can write your own class its easy for a progress bar
IM PROUD TO BE A GMAIL;
|
|
|
|
|
The Undefeated wrote:
I want to pick my own colour of the bar instead of those green bars, and i want to have solid colours instead of bars of colour.
There are so many custom progress bar controls here on CP, you should be able to find exactly what you want.
Marc
My website
Latest Articles:
Object Comparer
String Helpers
|
|
|
|
|
Hi all,
I am using a KerberosToken for my signing and encryption when calling a WebMethod on my WebService. It all seemed fine, until our work domain changed, and now we manage our own domain (domain controller).
Everytime I call a WebMethod, I get an exception "The signature or decryption was invalid". I've looked around online, but can't find anything that will help.
I then tried the Kerberos sample that comes with WSE 2.0 SP3. I had the client on a XP SP2 machine, and the WebService on a Win 2003 Server SP1 machine, an I get the same exception even with the Microsoft sample.
Can anyone shed some light on this, as I don't know what to look at next?
Appreciate any help anyone can give, or even a direction I go in to look into it further.
Cheers
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
I believe most of this was to do with a time difference between the client and the server.
Future tests showed that my software worked with a Kerberos token for 'n' amount of time, and then I would start getting errors. I'm not talking about, constantly working. I mean, closing the application and starting it again, I would still get bizarre Kerberos token errors.
I've therefore stopped using it. It was a good at the start, but too unpredictable.
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
All,
I am currently working on a program that has a couple different classes that are called from the main windows form. I would like to be able to show the status when one of these classes is called, either by text or by a progress bar. For instance, when a method runs in a class I have called, I would like to be able to say show the name of that method on the windows form. Please forgive me, I am only 6 months into C#!
Eric
|
|
|
|
|
You should probably consider reading about Debug.Assert() or Write(), you could put that wherever you want to note that youre calling a method at runtime, and it will be output to your output window in vs.net
|
|
|
|
|
Hi,
I'm using the AxWebBrowser component in a c# application. Is there a way to disable javascript error messages or at least ensure that they don't pop out in an alert box. i've tinkered with IE setting in the advanced tab to disable notification, and i don't get pop up error messages in IE anymore, but i still get them in my app.
Is there any way to get around this? is there a way to intercept these warnings from code and handle them?
Please, help! Thank you very much.
|
|
|
|
|
To prevent javascript error messages in your mshtml web browser, set the Silent property of your web browser control.
this.axWebBrowser1.Silent = true;
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
Graphics g = this.CreateGraphics();
g.DrawImage(g, new Rectangle(new Point(0,0), new Size(40, 70)), 30, 40, 40, 70, GraphicsUnit.Pixel);
myImage = g.???????
how can i convert a graphic object to Image or how can i draw a graphic object inside an image object?
|
|
|
|
|
Sasuko wrote:
how can i convert a graphic object to Image or how can i draw a graphic object inside an image object?
No, not at all. Thing about Graphics object like about drawing surface.
btw AFAIK Graphics.DrawImage() method doesn't take Graphics object as parameter... Does this compile:
Sasuko wrote:
Graphics g = this.CreateGraphics();
g.DrawImage(g, new Rectangle(new Point(0,0), new Size(40, 70)), 30, 40, 40, 70, GraphicsUnit.Pixel);
myImage = g.???????
?
Use static Graphics.FromImage()[^] to perform drawing into Image object, or pass Image as argument to Graphics.DrawImage method if you want to draw image INTO that Graphics (surface).
Does it help?
David
"Stay Kul And Happy" I.A.
|
|
|
|
|
ok but how can i draw the contain of that g graphic inside an picturebox?
|
|
|
|
|
And you write it *where* with Graphics object?
Usualy you do that like:
Image img = new Image();
using( Graphics g = Graphics.FromImage( img ) )
{
g.DrawLine(...)
..
}
pictureBox1.Image = img;
and all that drawing will be applied to that image. ( I hope )
David
|
|
|
|
|
i use this code:
Image tmp1 = Image.FromFile(path);
Graphics g = Graphics.FromImage(tmp1);
g.DrawImage(tmp1, new Rectangle(new Point(0,0), new Size(40, 70)), 30, 40, 40, 70, GraphicsUnit.Pixel);
pictureBox1.Image = tmp1;
but it draw the perfect original tmp1 image without cutting...
|
|
|
|
|
I am not sure why, but problem is that you use same object as source and destination...
Image tmp1 = Image.FromFile("../../Bitmap1.jpg");
Image img = new Bitmap(100,100);
Rectangle srcRect = new Rectangle(0,0,50,50);
Rectangle destRect = new Rectangle(0,0,20,100);
Graphics g = Graphics.FromImage(img);
pictureBox1.Image = img;
g.DrawImage(tmp1, destRect, srcRect, GraphicsUnit.Pixel);
g.Dispose();
tmp1.Dispose();
David
|
|
|
|
|
|
i've loaded a png file.
now i want to cut a rect from it and draw in a specific Top-Right position of a picturebox.
What functions i heve to call?
|
|
|
|
|
Make a brush form this image.
|
|
|
|
|
i know there is image.fromRect or functions similar, but i don't remember.
|
|
|
|
|
No,in the Brush class you cna make Brush.FromImage ,try it.
|
|
|
|
|
Hope this helps
public void Clone_Example(PaintEventArgs e)
{
// Create a Bitmap object from a file.
Bitmap myBitmap = new Bitmap("Grapes.jpg");
// Clone a portion of the Bitmap object.
RectangleF cloneRect = new RectangleF(0, 0, 100, 100);
PixelFormat format = myBitmap.PixelFormat;
Bitmap cloneBitmap = myBitmap.Clone(cloneRect, format);
// Draw the cloned portion of the Bitmap object.
e.Graphics.DrawImage(cloneBitmap, 0, 0);
}
|
|
|
|
|
ok now if i want to draw cloneBitmap in a particular position of a pictureBox how can i do?
Becouse i've tryed to do this:
pictureBox1.Image = cloneBitmap;
and it draw nothing while pictureBox1.Image = myBitmap; yes
|
|
|
|
|
OK I've found the problem!
I load a png file so i can't execute the cutting.
I don't know why but if i load bitmap and i try to cut it it works!
Someone can tell me why?
How can i do about using png files?
|
|
|
|
|
hi there.
iam developing an application but i don't know how can i make my application upgraded by adding some new features to it ? how can this be done theoritically anybody here has an idea how can i make my application after finishing it to add new features by upgrading like accepting new dll files from my website of this application like any famous programs ??? any body here as an idea about that
Miss With The Best And Die Like The Rest
|
|
|
|
|
When I wrote my firs (and only ) "self updating" program, I use teh following method:
- I create a static string in teh code for the version number
- I create a folder in my website in the folder there is a textfile called version.txt contains only one line, the current version number, and int his folder also in the new verson of tehe .exe and a nother file called updater.exe
- when my app starts meka a web request, and read the version number from the version.txt and if it's not same as the number in the exe:
- download the updater.exe, and run it
- the updater.exe close the real app, and download the new app.exe from the web
- then start it, and close themselves
- now, the new version is on the machine, and run
Perhapes the app delete the updater.exe from the computer, vhen finishing the update
I know It's a crazy, nd maybe stupid way, but when I do this I haven't a better idea, and It's work fine
But the exper CP aunthors shud tell you a better way :->
|
|
|
|
|