|
Good link, thanks Greeeg!
regards,
George
|
|
|
|
|
Just to add to the pot:
The C# keyword int is a compiler accessor to the System.Int32 type. You may use the below code to validate this as an excercise on each platform:
typeof(int) == typeof(System.Int32)
The above code will return true .
/F - .NET Developer
|
|
|
|
|
Cool, thanks ElSpinos!
regards,
George
|
|
|
|
|
|
Good link, thanks PIEBALDconsult!
regards,
George
|
|
|
|
|
I have a situation where im trying to get TCP connection "netstat" type traffic from a remote machine
in the past i would have used SNMP to perform a simple get and would give me the desired listing of TCP connections however this environment does not have SNMP loaded (hardened environment)
I was thinking of using a WMI Win32_Process to start the process/cmd "netstat -nab" then pipe the results back to the reomte machine. i soon found that i couldn't pass the results back and would need to >> redirect the output to the systems temp directory of the machine and then transfer the file back using some method
has anyone else had or can advise a beter method to get the file off the machine, these machines must be agentless ie no software/code can be install on the remote machines
|
|
|
|
|
What you're trying to do is impossible if you can't put software on the remote machine.
"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
|
|
|
|
|
|
I want to convert my Word.Document object in C# to pdf on runtime in windows application.
Thanx in advance
|
|
|
|
|
.Net doesn't have PDF support. You have several options
1) Read the PDF spec, and the Word doc spec and write your own converter.
2) Find a commercial PDF library. There are several around.
3) Use ITextSharp[^]. It's an open source PDF creator. It allows you to create PDF files on the fly from C# (Note, it is not a converter, you'll have to process the word file and manually work out what to put in the PDF)
4) Automate software that does the conversion for you. (Like openoffice) There is an article on CP about this http://www.codeproject.com/KB/files/generatepdf.aspx[^]. You would either need to ensure the user has open office installed on the system, or provide the conversion as some form of web service which you can call. (This is good if it's an internal only company app, and you can host a service on the network)
Simon
|
|
|
|
|
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
|
|
|
|