|
hey howzit.
I am looking for a component that can extract information about fields in a PDF. e.g. their height, width, location etc.
PDF fields are used in electronic forms and are becoming quite popular.
I am looking for a component which is of reasonable price or freeware.
|
|
|
|
|
Hi,
I have a ListView control holding more than 3000 items (which means sorting can take a while). Therefore, I want to display a message saying "Sorting list" while the list is being sorted. The problem is I don't know how to tell when the sorting process has completed.
Any suggestions?
|
|
|
|
|
You might be able to create a thread to sort the items and once that thread has finished then you can say that sorting has finished. You may run into a few problems because I think that using multiple threads to update UIs is messy, your best bet might be to disable the ListView first thus ensuring that the user can't change anything inside it.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
You can show the "Sorting List..." message before performing the sort, and then hide the message after the sort operation completes by doing something like this:
private void btnSortAsc_Click(object sender, System.EventArgs e)
{
this.statusBar1.Text = "Sorting List...";
this.listView1.Sorting = SortOrder.Ascending;
this.statusBar1.Text = "";
}
private void btnSortDesc_Click(object sender, System.EventArgs e)
{
this.statusBar1.Text = "Sorting List...";
this.listView1.Sorting = SortOrder.Descending;
this.statusBar1.Text = "";
}
Josh
|
|
|
|
|
Hi all i have a small problem
I am creating a new blank bitmap in a program, then using the lock bitmap i edit pixels. the Purpose iss to build a spectograph.
Now my problem is that when i create the bitmap
Bitmap pane = new Bitmap(800, 800);
then edit it using pointers the image remains blank
the only work around i could find is initialiazing the bitmap with setpixels one by one.
This is obviously very slow and ive been trying to find a faster way :/
any suggetions ??
|
|
|
|
|
If you posted some code, we could perhaps suggest where it was broken. Obviously, the answer is to lock bits and edit the pixels, so you're doing something wrong. My image processing articles have lots of examples on how to do this, they are on this site, just search for graus and you'll find them
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sure
i Create the bitmap here
Bitmap pane = new Bitmap(800, 800);
then i had to init the bitmap with a colour to get it working
<br />
for (int i = 0; i < pane.Height; i++)<br />
{<br />
for (int j = 0; j < pane.Width; j++)<br />
{<br />
pane.SetPixel(j, i, Color.Black); <br />
<br />
}<br />
<br />
}
basically i have to get rid of the code above
then i use unsafe mode to set colours to individual pixels
public Bitmap backup(Bitmap pane)<br />
{ <br />
BitmapData panedata = pane.LockBits(new Rectangle(0, 0, pane.Width, pane.Height),<br />
ImageLockMode.ReadWrite, pane.PixelFormat);<br />
<br />
int stride = panedata.Stride;
IntPtr Scan0 = panedata.Scan0;<br />
<br />
unsafe<br />
{ <br />
byte* p = (byte*)(void*)Scan0; <br />
<br />
int nOffset = stride - pane.Height *3 ;<br />
int nWidth = pane.Width * 3;<br />
<br />
for (int y = 0; y < pane.Height; ++y)<br />
{<br />
for (int x = 0; x < pane.Width; ++x)<br />
{ <br />
*(p + 0) = (byte)255;<br />
*(p + 1) = (byte)0;<br />
*(p + 2) = (byte)0;<br />
p += 4;<br />
} <br />
}<br />
}<br />
pane.UnlockBits(panedata);<br />
return pane; <br />
}
like that it works but its takes ages to start
|
|
|
|
|
Is there any particular reason you are using pointers to do this? It could be accomplished whithout them. You could tie your bitmap to a graphics object...
Graphics g=Graphics.FromImage(myBmp);
...
then you could fill the image (much faster than indexing)
g.Clear(Color.Black);
Next, I take it you are setting the RGB value of each pixel in your for loop, but you are setting them all to Red as it looks, so why not just use....
g.Clear(Color.Red);
This will work very fast. If this isnt the solution you are needing, let me know,
Aaron
|
|
|
|
|
i pasted only part of the code, the g.clear to fill the bitmap worked nicely just what i needed
and basically im trying to build a spectograph so not every pixel is being drawn and everypixel i draw has a different weight thats why im going tthrough it pixel by pixel.
the program is still in the early stages though thats why it may look a bit raw.
Thanks a lot for your help !
|
|
|
|
|
I think you are not seeing any changes because you don't set the alpha value and when it is left to 0 you won't see anything (everything is transparent). Adjust the contents of your inner loop:
*(p + 0) = (byte)255;
*(p + 1) = (byte)0;
*(p + 2) = (byte)0;
*(p + 3) = (byte)255;
p += 4;
|
|
|
|
|
erm yes that was it ! forgot about the alpha component :/ silly me
|
|
|
|
|
Having read the thread, I can't believe you need to set alpha. I've never, ever had to set the fourth value, and it's not actually used for alpha by windows, unless the Bitmap object uses it.
int nOffset = stride - pane.Height *3 ;
This is wrong, you mean pane.Width. However, as you're using a 32 bit image, you don't need an offset, anyhow.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Is it possible to set ip address and computer name remotely or through MAC address?
lmyo
|
|
|
|
|
Yes, if you write a DHCP server which can assign IP addresses based on MAC addresses.
dhcpd on Linux can do this.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi All,
I wand to read mail text and attachments from mail server(mailbox folder). If the message contains any image (in attachment also) then I want to pick that image and save it to desired location. Please help me to sort out this problem or send me any link for the same
Thanks in advance.
Amit
-- modified at 3:40 Monday 24th April, 2006
|
|
|
|
|
Well, you're looking for a POP component for reading Mail. Here's one I found on Code Project.
Yuvi Panda T
Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
|
|
|
|
|
That's a good start but its a bit more grim than that. Attachments are stored according to the MIME specification usually in base64. So, having got the content of the mail you need a mime parser to turn the attachments into something usable. I'd look at 3rd party components to help you with this.
Regards,
Rob Philpott.
|
|
|
|
|
Hi Yuvi Panda T
Thanks for your response. It respond me when it got new message. It just display , “has 1 message” in status box, but What is message number and which number should I pass in message number box.
Thanks again
Amit
|
|
|
|
|
Haai everyone,I just want to know if it is possible to run your file systems web site on your IIS as oppose to asp.net web development server. Coz I want to host it as an intranet site.
Spokione@NtiyisoConsultants
|
|
|
|
|
i am taking input from the user using Console.Read but automatically it is taking enter key (13) as input how to avoid this ,i used console.Clear but is not working
sunny
|
|
|
|
|
Console.Readline() can be tried
Console.Read() will allow only one char to read
|
|
|
|
|
Console.Writeline() then
Console.Readline() then user does not need to press enter
|
|
|
|
|
Use Console.ReadLine();
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
This is my code below..the problem ofcourse progress bar once started works fine..after browsing thru other forms and returning back to this form only repaints it when progress bar functionality is complete.
private void button2_Click(object sender, EventArgs e)
{
demothread = new Thread(new ThreadStart(ProgSafe));
demothread.Start();
}
private void ProgSafe()
{
if (this.progressBar1 .InvokeRequired )
{
SetProgCall del = new SetProgCall(ProgSafe); //SetProgCall is a delegate.
this.Invoke(del);
}
else
{
Progress();
}
}
public void Progress()
{
for (int i = 0; i < 100; i++)
{
Thread.Sleep(200);
this.progressBar1.Value = i;
// Application.DoEvents(); It is fantastic when using tis statement but not good programming..so is there other way out....(backgroundworker is good )
}
}
|
|
|
|
|
This way it doesn't make much sense. You are starting a thread which calls Progress in the GUI thread (which will block all repainting because of the Thread.Sleep).
It should more look like the following:
private void button2_Click(object sender, EventArgs e)
{
demothread = new Thread(new ThreadStart(ProgSafe));
demothread.Start();
}
private void ProgSafe()
{
for (int i = 0; i < 100; i++)
{
Thread.Sleep(200);
if (this.progressBar1.InvokeRequired)
this.Invoke(new SetProgCall(IncreaseProgress));
else
IncreaseProgress();
}
}
private void IncreaseProgress()
{
this.progressBar1.Value += 1;
}
Now the whole work is done in the thread and just the update of the progress bar is delegated to the GUI thread.
|
|
|
|