|
Simon Stevens wrote: 1) Read the PDF spec, and the Word doc spec and write your own converter.
If that could be done, that would be an excellent CodeProject article
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thomas Stockwell wrote: If that could be done, that would be an excellent CodeProject article
It would indeed be a insane task. (Although, there are clearly people who have done it).
I thought I'd take a quick look at the PDF spec.
http://www.adobe.com/devnet/pdf/pdf_reference.html[^]
Turns out it's provided in some sort of "PDF package" where multiple PDFs are bundled together into one file. It's a new feature, and Foxit doesn't seem to support it, and I refuse to use adobe reader. I'm convinced they just do things like this to annoy the hell out of developers. Why on earth are "PDF packages" needed? If you want multiple files in one, zip them.
Simon
|
|
|
|
|
http://www.pdfforge.org/products/fly2pdf[^] is an ActiveX library for creating pdf files.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hi All
Can we change progress style from blocks to fill.
I dont want dotted line in progress bar, I want a solid line.
thanks
Syed Shahid Hussain
|
|
|
|
|
No, you can't.
The progress bar is a base windows control. When you request that the API create one, you will get a progress bar in the windows style. There are different themes available that change the styles. If you run your app in vista, you'll see the progress bar will adopt the vista style.
Your only option would be to create a custom/user control and manually create a progress bar. The disadvantage of this though is that it won't automatically fit the users theme, or change style for vista.
See Ravi's reply below.
Simon
modified on Thursday, July 31, 2008 10:47 AM
|
|
|
|
|
You have to write (or find) a custom control that does that. There just happens to be one here on CP. Search for "SmoothProgressBar".
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Other than looking for a progressbar custom control on the CodeProject, you can always modify the .NET 3.0 progressbar color scheme(WPF).
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thomas Stockwell wrote: you can always modify the .NET 3.0 progressbar color scheme(WPF).
Assuming he wants to use WPF, of course. I wish the questions posted here would be more complete.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Set the control's Style property. See this[^] MSDN link.
/ravi
|
|
|
|
|
Nice one. Never spotted that.
Simon
|
|
|
|
|
Thanks
But I'd already checked that property.
Both Blocks and Continous shows dotted line.
Have u checked that?
Syed Shahid Hussain
|
|
|
|
|
Hi Syed, it works fine for me (as does Marquee mode).
/ravi
|
|
|
|
|
I'd changed the style to continous but it gives the same result as blocks
can u give me code example.
Syed Shahid Hussain
|
|
|
|
|
Hey everybody!
I'm trying to find an event that will be fired every time there is a change in the ROT.
Does anyone know about such a function (WIN32 API maybe?!) ???
If there is no such event I was thinking about creating a thread that will re-enum the ROT every 500ms and notifies me if there is such change, but I still hope there is a better way...
Thanks!!!!
|
|
|
|
|
Yesterday, I posted a message here about creating a modeless form with a single label control that was not being rendered by the form. Towards the end of the work day yesterday, we had all thought it might just be a problem on my computer (VS2005/SP1 on Vista). However, when I brought the code home and tried it, it happened there too (VS2005/SP1 on XP). It also happened on VS2008 using .Net 2.0 and then using .Net 3.5.
What's really disturbing is that two people here on CP tried the same code, and it did not occur for them.
--------------
This morning, I figured out how to force it to render the control. I added this function to the modeless form:
public void UpdateForm()
{
this.label1.BringToFront();
this.Update();
}
and then modified the code that opens/closes the form (remember, this code is in the DoWork() handler of a BackgroundWorker object) looks like this:
private void splashWorker_DoWork(object sender,DoWorkEventArgs e)
{
BackgroundWorker thisWorker = sender as BackgroundWorker;
SplashPanel splashPanel = new SplashPanel();
splashPanel.Show();
splashPanel.UpdateForm();
while (!thisWorker.CancellationPending)
{
Thread.Sleep(500);
}
splashPanel.Close();
splashPanel.Dispose();
}
I couldn't find ANYBODY ELSE on the net that had experienced the non-rendered controls problem that I've experienced. In the process of trying to figure t=out the problem, I tried using calls to MessageBox.Show() within various form event handlers, and discovered that the act of displaying a message box caused the label control to be properly displayed. Invalidating the control didn't have any effect. Hiding/showing the control didn't work. It was only out of desperation that I finally discovered that calling BringToFront() would show the control.
I want to know WHY this is necessary, or what is wrong with my Visual Studio (or .Net) install that would cause this problem.
[EDIT] I've come to the conclusion that this is a bug in the .Net framework, starting all the way back at .Net 1.0, and is probably related to the Event loop not being fired correctly. I added a bunch of other types of controls and all of them exhibited the same behavior as my original label control. Everything is fine as long as you are using a modal form (using ShowDialog() to display the form). However, displaying the form as modeless, you get screwed up up results.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Thursday, July 31, 2008 7:18 AM
|
|
|
|
|
HI all
Can any one tell or provide code for calling a c# dll(class library) from VB6.0 applicaiton
Thanks in advance,
urs friend
|
|
|
|
|
|
This code is working perfectly BUT am seeking help with the three possible error codes codes in the places numbered 1,2,and 3
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Stackbuilder
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
stackTop = -1;
}
private int[] stackArray = new int[10];
private int stackTop;
private int val;
private int topValue;
private int peekValue;
private int k;
private void displayStack()
{
string nextItem;
displayBox.Clear();
for (int i = 0; i <= stackTop; i++)
{
nextItem = stackArray[i].ToString();
displayBox.AppendText(nextItem);
displayBox.AppendText("\n");
}
}
private Boolean emptyStack()
{
return (stackTop == -1);
}
private void displaybutton_Click(object sender, EventArgs e)
{
displayStack();
}
private void initbutton_Click(object sender, EventArgs e)
{
stackTop = -1;
displayStack();
}
1. // add error-checking code here
private void pushbutton_Click(object sender, EventArgs e)
{
try
{
val = Convert.ToInt32(valueBox.Text);
valueBox.Clear();
}
catch
{
MessageBox.Show("Please enter an integer.");
valueBox.Focus();
return;
}
stackTop = stackTop + 1;
stackArray[stackTop] = val;
displayStack();
valueBox.Focus();
}
2. //add error-checking code here
private void popbutton_Click(object sender, EventArgs e)
{
stackTop = stackTop - 1;
displayStack();
}
3. //add error-checking code here
private void topbutton_Click(object sender, EventArgs e)
{
topValue = stackArray[stackTop];
displayBox.Clear();
displayBox.AppendText("Most recently added item is \n");
displayBox.AppendText(topValue.ToString());
displayBox.AppendText("\n");
}
//add code here to implement peek function
private void peekbutton_Click(object sender, EventArgs e)
{
peekValue = stackArray[stackTop - 1];
displayBox.Clear();
displayBox.AppendText("The item below the most recently added item is \n");
displayBox.AppendText(peekValue.ToString());
displayBox.AppendText("\n");
}
}
}
|
|
|
|
|
Can you please explain a little what you mean by "Error Checking Code"
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Hello everyone,
Some URL representations, like "www.google.com" is not legal and will cause format exception when we use it to form URI class. In this specific case, it is because http:// is missing.
My questions are,
- Is what URI class doing conforming to industry standard about what is legal form of URL? Or URI class is doing something special to decide whether or not format exception will be thrown?
- Suppose we have URL strings like "www.google.com", how to make such strings "good format" to URI class? Any utilities' class to transform?
thanks in advance,
George
|
|
|
|
|
George_George wrote: Some URL representations, like "www.google.com" is not legal
That's because it is not an URL, its a hostname. Prefixing a protocol will turn it into an URL. IE and browsers, normally help the user out with this (by prefixing http:// automatically).
|
|
|
|
|
Thanks leppie,
Using IE is a manual solution. Is there any ways (e.g. .Net built-in class or some other samples) to automatically convert URL into good format?
regards,
George
|
|
|
|
|
I don't think there is one as it would never be definitive.
IE assumes http:// if it's ommitted, but it could be https://, ftp://, etc... etc...
You need to decide yourself what you expect and check/format it as needed.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Thanks Dave!
1.
No reference document/samples and no built-in class to normalize a string to an URL?
2.
DaveyM69 wrote: You need to decide yourself what you expect and check/format it as needed.
Some manual work? No automatic way?
regards,
George
|
|
|
|
|
Is it possible to change the accessiblity of a property in code?
Why? I have a multi-function textbox class which has MinLength, MaxLength and RestrictionType (enum) properties.
1. If RestrictionType == Restriction.None the MinLength and MaxLength properties are read/write.
2. If RestrictionType == Restriction.IMEI I set the MinLength and MaxLength properties to 15. At this point I'd like to make MinLength and MaxLength read only as they shouldn't be changed while this RestricionType is active.
Obviously, at the moment I check the RestrictionType in the setters and reject the change if RestrictionType == Restriction.IMEI but I wondered if another way was possible.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|