|
since the user is not an administator , i'm managing to create a batch file that runs this application at windows startup using the runas command with Administator privilege.
This way , the user cannot stop the application using the Task manager , the UI for this application is visible and i've change the security policies to disable the regedit .
|
|
|
|
|
hi
your problem has been solved by me
i have a program that nothing can close it
and it can watch your application and when something closes it my program
will restart it agane
all you have to do is send me yor application process name(the one that apear in task maneger) and your application path (like c:\windows\myapp.exe)
mmfatemi@yahoo.com
have fun
|
|
|
|
|
I want to extract attachments from a PST or OST file from C# code and save the attachments to my local drives. I use OUTLOOK 2003 with the exchange server.
Any idea is appreciated.
|
|
|
|
|
I'd start here[^]
which should get you started.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
|
I've written some code that takes 2 or more files and joins them together into a single file, essentially duplicating the functionality you see when you use the DOS copy /B file + file + file outputfile command. The problem is that it takes what I consider an exorbitant amount of time to perform this action. Granted the source files are as big as 1gb in size, but it just seems to me that I can make this process faster, so I'm here asking for possible approaches to the problem.
Essentially, I'm opening up each source file and reading blocks of the file at a time, and then writing to the target file. Due to the total size of the target file, I can't simply read in the entire set of files at once (as big as 8gb) and then write it out all at once) I've tried 256k blocks, 512k blocks, and 1mb blocks, but they all perform about the same (no empirical data to back this up, just an "impression"). Is it better to go with reading larger blocks or smaller blocks? Anyone have any insight?
"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
|
|
|
|
|
So you're still pissing about with those videos, don't you have something constructive to do, lets see
John Simmons / outlaw programmer wrote: Anyone have any insight
yep but you should have asked for some HELPFUL insight. Well I'm off the the VB forum to see if I can annoy someone there.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Are you doing the read and write synchronously? Did you try using the asynchrounous BeginRead/BeginWrite methods?
|
|
|
|
|
For maximum performance I would:
- not use .NET File and Stream classes, instead use low-level Win32 file operations (CreateFile, ReadFile,...)
- if coding in .NET make sure all buffers are managed, and marshaling is not copying data, just passing pointers (use byte[] and GCHandle)
- try and get the files NOT cached (don't recall how that was done)
- use two separate disks, one for source, one for destination
- transfer a moderate amount of data at a time, try and make it an exact multiple of the cluster size (if unknown try 2*3*5*7*11* 64KB)
- make sure system activity is low (i.e. no other disk accesses)
and for file concatenation I hope each file's size is a multiple of your sector size (512B), if not can you accept padding? when unaligned with respect to sectors, I would compensate for that on the reading half of the code, i.e. as much as possible write at file address that are multiples of 512.
What are the copy numbers you are getting (MB/sec)? you should be able to achieve 30MB/sec on moderate hardware.
|
|
|
|
|
By passing FILE_FLAG_NO_BUFFERING to CreateFile perhaps? I never tried that, maybe it doesn't work, but it sounds like it has a chance
|
|
|
|
|
The followin code scrolls the text file contents, for a single line entry. how can i scroll the contents (in a single line) if i have more than one line in my text file ????
My main aim is to make a scrolling news application, by giving the input through a text file !!!
plz help
---mist---
------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace WindowsApplication1
{
public partial class FormMain : Form
{
Timer timer;
public FormMain()
{
InitializeComponent();
this.DoubleBuffered = true;
}
private void FormMain_Load(object sender, EventArgs e)
{
Streamreader re = File.Opentext("C://test.txt");
string input=null;
while((input=re.ReadLine()) !=null)
{
label1.Text=input;
}
label1.BackColor = Color.Red;
label1.Left = panel1.Width;
timer = new Timer();
timer.Interval = 10;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
void timer_Tick(object sender, EventArgs e)
{
label1.Left -= 1;
if ((label1.Left + label1.Width) < 0)
{
label1.Left = panel1.Width;
}
}
}
}
|
|
|
|
|
mist_psycho wrote: while((input=re.ReadLine()) !=null)
{
label1.Text=input;
}
this is reading all text and throwing away all but the last line.
You need to read and store all lines in memory first, in the Load handler. File.ReadAllLines can be used for this.
Then set your Control's Text property to whatever you want it to show; probably do this in the tick handler.
FYI: You could do without the string array, keeping all text inside the Control, but that is much harder to do correctly.
|
|
|
|
|
Hi
in sql server, u can set some extra properties to any object in database (like description).
u can query for this ExtendedProperties via this command :
SELECT o.Name AS ObjectName,
o.type AS ObjectType,
s.name AS SchemaOwner,
ep.name AS PropertyName,
ep.value AS PropertyValue,
ep.major_id As ObjectID,
c.name AS ColumnName,
c.colid AS Ordinal
FROM sys.objects o INNER JOIN sys.extended_properties ep
ON o.object_id = ep.major_id
INNER JOIN sys.schemas s
ON o.schema_id = s.schema_id
LEFT JOIN syscolumns c
ON ep.minor_id = c.colid
AND ep.major_id = c.id
WHERE o.type IN ('V', 'U') and ep.name <> N'microsoft_database_tools_support'
Howeve, i'm looking for a way to retrieve this properties via this code :
this.Text = this.users.ExtendedProperties["MS_Description"].ToString();
Is there anyway to do this ?
Thanks
|
|
|
|
|
If you parse out the ProprtyValue field (I assume ms_description is in there) I see no reason you can't do what you want. You could create a method to support users.extendedproperties to support ["some property name"].
AFAIK there is no internal method to do this.
[edit] It would make a useful article as well [\edit]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Mycroft
i know it'll be implemented by providing a method, but i think Ado.net has easier way to do this automatically, but how to do ?
|
|
|
|
|
You have probably already considered this, but from some time ago, when I was playing about with some of the SQLServer samples, I remember there being an ExtendedProperties property which I think was a ExtendedPropertiesCollection . All of this was in the SqlServer.Smo namespace, if memory serves.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi,
i want to be able to load a form design from a file so that i could change the file and the design will change(more text boxes, combo boxes etc').
how can i do it?
thanks,
samy
|
|
|
|
|
Here be dragons. So you want to make a use configurable form, I'm sure there are articles which will help you with this BUT be very sure you want to pursue this type of app before getting any deeper, this needs some very strong business reasons for developing such a beast and you will NEVER be satisfied with the result until you build another IDE.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You could always try WPF.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi
Anyone knows how to create a burning text efect in GDI+ like they have in the
cooltext website ? (http://cooltext.com/[^] )
(I already know how to create animated gif, I just need the drawing algorithm for a burning text )
thanks
|
|
|
|
|
And I thought I was bored, it's a quiet Sunday evening and I'm half a bottle into the red and you want "burning text". I'd like to make some sarcastic comment about getting a life but I'm the one replying to this puerile request.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Well, sorry for bothering your highness, but I actually need this for my job.
I've got better things than this to kill time (if that was my intention).
So, keep the sarcastic patronizing to yourself or just answer the question.
|
|
|
|
|
It looks pretty complicated as you have to process the font drawing yourself (i.e. read the font TTF description and draw it to a series of bitmaps or memory buffers). Doing this on the fly for a website or similar would be very processor intensive.
The easier way would be to pregenerate individual .GIF files for each character and display those instead?
ErezRozn wrote: Well, sorry for bothering your highness, but I actually need this for my job.
Give him a break - it's Sunday and he's "relaxed". "Relaxed as a newt" by the sound of it!
|
|
|
|
|
Hi
thanks for your kind reply.
I already know how to pre-generate the frames,
I just don't know how to create the desired 'burning' effect
around the text in each frame.
I suppose it involves some form of looping over the text with various brushes or pens.
Do you know how to draw such an effect, even in a static non-animated gif ?
it would be very helpfull/
thanks
Erez
|
|
|
|
|
The only thing I've been able to find is this[^], but it is Java based. Might be useful for ideas, though.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|