|
The process of creating an instance of a class is called?
|
|
|
|
|
Instantiation?
Paul Marfleet
|
|
|
|
|
this is very rubbish do send some what acceptable questions...:->
|
|
|
|
|
What the hell are you talking about?
Paul Marfleet
|
|
|
|
|
do post info regarding developers perspective..
its not like school boy like attitude...
|
|
|
|
|
Sounds like a school boy's homework question though.
|
|
|
|
|
I have no idea what you are talking about. I answered the original poster's question, although it wasn't much of a question. What is your problem?
Paul Marfleet
|
|
|
|
|
better shut your mouth
|
|
|
|
|
hi all,
Is it possible to display an image in all buttons in a
datagridview(Windows Forms) button column?
if yes,
can anybody help me how to do it?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
I have a Class Library in which i have lot many functions to implement my service but the problem is maximum of functions are Having similar names and similar parameters etc. when i want to use any of these functions i am some what confused which one is the one which exactly i shoould use. So is there any way to "Provide the Description of the function" along with the Prototype of the function which comes as default due to intellisence of MicroSoft.
I tried the [Description("xgdfgdfg")] attribute above the function defination but no use.
Can any body know how to get the user defined description for a function
Thanks in Advance.
|
|
|
|
|
Hi,
just type /// before your function name , VS will then build some 'comments tags' you just have to fill.
such as
///
/// my summary for intellisens
///
/// <param name="a_parameter" />my param descr. for intellisens
Hope it helps
|
|
|
|
|
Wow.........
It really helped...
Thanks grim.
|
|
|
|
|
oops < > where missing
/// <summary>
/// my summary for intellisens
/// </summary>
/// <param name="sender">my param descr. for intellisens</param>
|
|
|
|
|
What you are looking for is known as XML comments. They provide a lot of documentation possibilities for you code. You can look on MSDN or Google for "Xml comments" and find a lot of information about them. The Description attribute is a runtime concept and doesn't have any affect on the Visual Studio IDE.
|
|
|
|
|
Hi iam new to window services.
I developed a window application which is an desktop alret.
I need to run this application with a window service.
Is there any way to use window applications in window services.
Help me out from this.
Lakshmi.
|
|
|
|
|
Never tried it, but you can try building you windows application as a class library (dll file) from Project Properties->Application->Output type->Class Library. After that you can add to you windows service as reference, and open the form(s) whenever you want. This way your windows application doesn't have to be at specific path.
Hope it helps.
Do your best to be the best
|
|
|
|
|
Hi
I tried the way you said, but iam not getting the result.
Is there any other way? Please do inform me.
Lakshmi
|
|
|
|
|
Hi,
There are several ways try this.
1. First create windows service application(minimal application)
2.
<br />
private static Form Form1;<br />
protected override void OnStart(string[] args)<br />
{<br />
Form1=new Form();<br />
base.OnStart(args);<br />
<br />
}<br />
Ravi
|
|
|
|
|
I would suggest that the best way would be to refactor the application logic away from the form (into a dll) and refactor the form to use this. Then you can create a service project to call the relevant app code.
Paul
|
|
|
|
|
You really shouldn't do this. What you are looking for is a service that has the "Interact with desktop" option selected. This is not recommended practice. Services are intended to be run at the system level, even when someone is not logged in so they aren't supposed to have any UI.
To do what you want, you need to create a Windows service and a Windows client application (2 different executables). The client application can run at Windows startup (when a user logs in). When the service needs to display an alert, it needs to inform the client application that there is something to display to the user. There are a lot of different ways to do this, from shared memory to remoting/wcf calls.
|
|
|
|
|
hi there,
i placed a picture box in my app, and i want to open image through the data which is in byte[]
can some tell how?
Becoming Programmer...
|
|
|
|
|
You need to assign that byte[] to be the contents of a MemoryStream ( from memory ) and then you can construct a Bitmap using a Stream in the constructor.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hy,
<br />
byte[] buffer;
Bitmap bmp = new Bitmap(width, height);<br />
BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);<br />
Marshal.Copy(buffer, 0, bmpData.Scan0, buffer.Length);<br />
bmp.UnlockBits(bmpData);<br />
This is an example of how I used to copy rgb values from a byte array to a bitmap. Of course you have to know the width, height and pixelformat of the image.
Hope it helps,
Do your best to be the best
|
|
|
|
|
Yep i know pixel format (BGRA)
ok buddy i will try then tell you the result
Edited
yeah its working but i have problem that is my format is in BGRA and i didnt find any PixelFormat for it so i convertered my format to ARGB but it isnt showing anything but if left it as BGRA then its showing half correct pict
can you please take a look on the codes
byte[] byt = new byte[0];
.............................................................................
.............................................................................
.............................................................................
byte[] dirtybyt = new byte[width * height * 4];
fs.Position = offset;
fs.Read(dirtybyt, 0, width * height * 4);
byte[] temp = new byte[width * height * 4];
for (int i = 0; i < width * height; i++)
{
temp[i * 4 + 0] = dirtybyt[i * 4 + 3];
temp[i * 4 + 1] = dirtybyt[i * 4 + 2];
temp[i * 4 + 2] = dirtybyt[i * 4 + 1];
temp[i * 4 + 3] = dirtybyt[i * 4 + 0];
}
byt = temp;
.............................................................................
.............................................................................
.............................................................................
Bitmap bmp = new Bitmap(width, height);
BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
Marshal.Copy(byt, 0, bmpData.Scan0, byt.Length);
bmp.UnlockBits(bmpData);
pictureBox1.Size = new System.Drawing.Size(width, height);
pictureBox1.BackgroundImage = bmp;
-- modified at 2:52 Wednesday 3rd October, 2007
-- modified at 3:03 Wednesday 3rd October, 2007
Becoming Programmer...
|
|
|
|
|
The code seems to be OK. It's important how you read from the file and copy the data into the byt array.
Do your best to be the best
|
|
|
|