|
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.”
|
|
|
|
|
if anyone has any source code sample- please post it.
|
|
|
|
|
how can i get registry operations associatd to a given executable files?
in other words,
how can i get subkeys names that are created by a given process?
|
|
|
|
|
There are tools that watch what a process is doing and can inform you of the changes to the registry that it makes. Alternatively you can use a disassembler and look for registry strings, or calls to the Registry APIs and see what it is doing.
|
|
|
|
|
I already found such tool(procmon) but i need to get subkeys
associated to a given process using c#.
|
|
|
|
|
|
Change the line
List1.Items.Add(Text1.Text);
to something like
List1.Items[List1.SelectedIndex] = Text1.Text;
Maybe first check for the selected index being valid, and adding a new item in case it's invalid.
|
|
|
|
|
Hi,
This is essentially a follow up question to that found in the thread:
http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=3004643[^]
I am going out of my mind here and have a deadline that is approaching fast.
My problem is that I have a label printer of which the printed output needs to be rotated 180 degrees to match the labels coming out of it.
The problems:
1. The label printer does not have a native reverse mode in its driver.
2. I am using a Graphics.GetHdc() to receive a handle which is being used to put rich text into.
3. using:
Matrix m = new Matrix(...);
m.RotateAt(180f, width/2, hight/2);
e.Graphics.Transform = m seems to totally ignore the rich text written directly to the hDC. It prints quite well where it would be anyway not using the the 'Transform;
4. Creating a Bitmap and using GetDC() from it, putting the rich text onto that bitmap and drawing it with e.Graphics.DrawImage() works quite well, but it is so pixelated that it is unacceptable for commercial use.
5. Thought I had found an answer when I discovered the SetResolution() method of the Bitmap, but that made absolutely no difference to the printed output what-so-ever.
I have tried all sorts of combinations to get any of the above to work but to no avail. I am now desperate. Any help, ideas, good links or suggestions would be appreciated.
Regards,
David Bailey.
|
|
|
|
|
Hi David,
never did such things, but a quick "hdc transform" Google showed lots of things including this[^].
|
|
|
|
|
Thank you.
I never thought to use "Transform" as a keyword. That might be just what I needed to keep going.
I searched on "rotate hdc" and got lots of answers, none of which were doing me any good.
Thanks again.
David.
|
|
|
|
|
I can not connect MySQL with Smart device (Windows mobile) by C# Language.
Any body can help me.... its urgent.
I will be great full to you
Shafik
|
|
|
|
|
For anyone to make any suggestions they would need to know what you have tried already. For instance what Libraries are you using, what does the code look like (not all of it, just the connection part)?
Edit your first post, to put that information in and maybe you will have more luck.
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.”
|
|
|
|