|
dnh wrote:
try to use punctuation (e.g. points and commas) between sentences... it really helps
I totally agree. I remember getting embarrased in Primary 4 (about age 8) for missing out puctuation in a little story I had to write for class. The teacher read my story by first taking a very very big breath, then reading the entire page very fast in one breath without stopping. Everyone was laughing and I was red. She didn't say who wrote the story, but I recognised it as mine. Never again have I missed out punctuation.
[EDIT]
Curious.... I wonder why that was worth a 1-vote???
[/EDIT]
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Yes. These are the best learning experiences... everytime I feel like an idiot in front of blackboard (and whole class) I make sure next time I'll be perfect :->
Colin Angus Mackay wrote:
about age 8
You are not implying anything about that person, are you?
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
dnh wrote:
You are not implying anything about that person
Me?!? Make implications? I think you'll find that you are inferring* things.
I hope this doesn't mess with your head. I'm referring to The Simpsons:
HOMER: What are you inferring?
LISA: I'm not inferring anything. You infer; I imply.
HOMER: Well that's a relief.
After that episode I had to check the dictionary several times over the following couple of weeks every time someone said "infer" or "imply".
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
|
hi,
I have created a GUI .net application and I am creating an object of a class XYZ.In class XYZ i have created a thread for an function.My intention is when we click an button the object of this class is created and creates the thread which I have achievedNow what I am trying to do is once the thread is executed(which atually is playing an audio file)just before getting distroyed it has to call some function in the GUI.
I once again give the architecture it is like this
GUI----->creates object of xyz -------> which has Thread object which starts one function.
Now can any one help me how can I achieve this.
Satish.
|
|
|
|
|
I would like to get database name, table's names...
How to get in oracle
|
|
|
|
|
Hello,
I am new to c# and indeed microsoft .net framework so please be gentle...
I am trying to use a c# service to allow session recording so that an application can start stop and playback sessions as required.
I have been using examples from the web as a base and although the image capture demos work very well and example source builds and runs also, when I use the image capture class within the service I get a blank image. The reason for this is that the source HDC returned is null.
I have been racking my brain cell as to what I have done that is any different than the examples and can not come up with anything.
The question is this... Is there soemthing that needs to be set/configured within a service that is not required within a regular application to allow taking of desktop images from either the desktop or application tree? If so please, what is it?
Many thanks for any advice or help in advance.
Best Wishes
Peter
|
|
|
|
|
I'm assuming your talking about a Windows Service and not a Web Service...
Yes, your service must be tagged "Allow service to interact with desktop". Go into the services control panel, click on your service, get the Properties on it, click on the LogOn tab and make sure that little box is checked.
Services normally run under a seperate desktop, that you can't see, and doesn't really have a rendering surface. So anything you need to do Window- or graphics- wise will return null's for window handles, device contexts, ... which is what is happening in your case.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Many Thanks Dave,
Your help is greatly appreciated and has led to my also
discovering from this site that this attribute can be set in software (see article by Robert H. Davis II - Interacting with Desktop when Installing Windows Service).
Cheers
a very happy bunny - Peter
|
|
|
|
|
i am storing all my documents in database as binary..while retrieving i shuld open them in their respective office documents.And how shuld i open them do i need create document at server or can i create a document at client and open it thier itself? if so how help me out...
for Ex:if i am storing a word document while retrieving it shuld open in microsoft office only...similarly powerpoint,excel,etc...others
help me out how to perform above action in C#?
|
|
|
|
|
i have a some lines of code in the button which is providing a functionality of saving data into database.I like to do the same funtionality(saving data into database),what i have to do.,write the same code in menu item ????
or any shortcut way to complete this task.
|
|
|
|
|
hi,
of course you should have this code only once!
you can call same handler for button (e.g btnSave_Click ) from menu handler (miSave_Click ) as
void miSave_Click(object sender, EventArgs args )
{
btnSave_Click(this, null);
}
or you can have method, say OnSave() with code for saving and both in menu and button hanlder call this function.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
You can write a separate method and call it from button and menu events. It's called code centralization (I think). At least I do that.
|
|
|
|
|
|
Thanks for the help.The problem is that i am desinging my
own harware stereo fm radio which has a usb connector
which is plug into the usb port of the system,whether
i write driver for this particular device or a dll for
using it in c#.Net and control it?.kindly tell me the
proper solution for the above query.waitng for your replys....
@hs@n
|
|
|
|
|
I am trying to write a C# program to read a binary file. The records have a predefined strucutre. Problem is I have no idea to to define the struct in C# in the way I did in C++. I also need the strucutre to be in 1 byte alignment.
In C++ the structure looks as follows:
#pragma pack(1)
struct my_struct_
{
unsigned char fld1[10];
long fld2;
short fld3;
};
#pragma pack()
I tried the MSDN but the examples looks so complicated I can't understand a thing..
|
|
|
|
|
Take a look here[^] for a good tutorial on C# structures.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Thanks for that. However, I still don't know to force 1 byte strucutre member alignment and array of bytes?
|
|
|
|
|
You can declare an array of bytes like this:
byte[] <code>buffer</code> = new byte[1];
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Thanks, but I am not sure that's what I need.
In C++, my structure looks as follows:
struct sample_
{
unsigned short f1;
long f2;
unsigned char filler[1000];
}; // total 1006
I declared it in C# as follows:
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=1)]
public class sample_
{
public ushort f1;
public int f2;
public byte[] arr=new byte[1000];
}
But it's not good because the size should 1006, and it is actually 10 (2+4+4).
sample_ mySample = new sample_();
Console.WriteLine ("sizeof={0}", Marshal.SizeOf(mySample));
Is there a way I can declare the array without new? Or do I have to declare 1000 byte fillers?
|
|
|
|
|
Packing size is done as follows:
[StructLayout(LayoutKind.Sequential, Pack=1)]
public struct WhoCares
{
public int x;
public int y;
}
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I got the same problem.at last ,I found a question that the size of the struct is very complex as we thought.But there is a way to read the blok of memory that stored as struct type.Maybe we can disguss it together.
|
|
|
|
|
Not until you start your own question as a new thread. I'm not responding to someone who thinks they can just hyjack someone elses 4 year old thread and I'l magically know what they're talking about.
|
|
|
|
|
Hi. I have finished my app and now would like to have an installer which would copy the files to a dir chosen by the user, register my file type and an icon in the system and also an uninstaller which would unregister and delete the dir.
Are there any components for that or do I have to do it myself?
|
|
|
|
|