|
i have smartcard dll which support smartcardmanager.oncardinsertevnthanler. How i use the event handler for detcting the event when i insert the card into reader or ejec from reader.iam using c# language
|
|
|
|
|
|
Hi,
I am trying to export gridview data to excel. It is working fine except the first row in the excel is blank.
The code i used for the excel is shown below:
HttpContext.Current.Response.Clear();
Response.ClearContent();
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=GrpFile.xls");
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
HtmlForm frm = new HtmlForm();
gvCampGrp.Parent.Controls.Add(frm);
frm.Attributes["runat"] = "server";
frm.Controls.Add(gvCampGrp);
frm.RenderControl(hw);
HttpContext.Current.Response.Write(sw.ToString());
HttpContext.Current.Response.End();
I also included the following code.
public override void VerifyRenderingInServerForm(Control control)
{
return;
}
How to export data to excel without making its first row empty?
Please help.
Dhyanga
|
|
|
|
|
i removed the htmlform code from the section and now it worked fine.
HttpContext.Current.Response.Clear();
Response.ClearContent();
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=GrpFile.xls");
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
gvCampGrp.RenderControl(hw);
HttpContext.Current.Response.Write(sw.ToString());
HttpContext.Current.Response.End();
and
public override void VerifyRenderingInServerForm(Control control)
{
return;
}
Dhyanga
|
|
|
|
|
hello everyone. i believe u have seen the apps that put some christmas lights on ur screen that keep blinking while u use ur desktop or whatever. i am planning to write a similar app. i have quite a good programming experience but i am not sure how to achieve this thing, i mean how to i make a bulb appear on desktop while the desktop can be used by the user aswell. btw i am working in c#.
|
|
|
|
|
Create a transparent[^] form, and make sure that the border isn't transparent.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
but that transparent form will recieve click events rather than desktop itself, right?
|
|
|
|
|
Johnny English wrote: but that transparent form will recieve click events rather than desktop itself, right? Wrong. Alternatively, you can set a specific color to become transparent.
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Collections.Generic;
static class Program
{
public static void Main()
{
using (var f = new Form())
{
var b = new Button();
b.Text = "Hello world";
f.Controls.Add(b);
f.BackColor = Color.Red;
f.TransparencyKey = Color.Red;
f.AllowTransparency = true;
f.WindowState = FormWindowState.Maximized;
f.ShowDialog();
}
}
}
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
well using ur technique if i draw something on form that is red, it wont appear.
|
|
|
|
|
I'd recommend using a different transparency-key than red. Pick one that's not in use yet.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i am making an app that will display lots of light bulbs of different colors, so i dont think this transparency key thing will work.
|
|
|
|
|
Anytime there is a completely transparent item in WPF it is basically invisibile. I often will have a minimum transparency when I actually want to be able to interact with a control.
|
|
|
|
|
You are looking at widget development.
Developing a gadget for Windows Sidebar[^] should help you get started.
This will help you create a widget which can run in the background while you can continue and work on the desktop.
|
|
|
|
|
not a widget, have u seen twinkle bulbs app?
|
|
|
|
|
|
Sooooo what is this post about again??
I'm not clicking that link.
|
|
|
|
|
C'mon Dave, where's your sense of adventure...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I'm married. My sense of adventure was killed about 7 years ago.
|
|
|
|
|
About time to think about divorce, Seven year itch, right.
|
|
|
|
|
No question to be found, only a (suspicious) download.
Post a question and the relevant code, and you'll have more chance to receive useful answers.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i have a task to show phone number on application when any calls come.scenario is, there is a restaurant where customer calling for order. when call comes there phone number show on our .net application.
Please tell me how i achieve this task.
|
|
|
|
|
have you checked to see if there is an API for the phone?
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
If I were you, I'd start by downloading JulMar's ATAPI[^] source. This wraps the unmanaged TAPI 2.x functionality. Then it's a simple matter of hooking into the TE_CALLINFOCHANGE event in the Tapi class.
|
|
|
|
|
Hi all,
I've a strange problem on my app.
I have one app that works fine and uses this instruction:
<pre lang="c#"> xlWorkbook = excelApp.Workbooks.Open();
</pre>
This works fine and all is ok.
The problem occurs when I run the .exe from another program, I execute (Process myProcess = Process.Start(myProcessInfo);) and the program start correctly, but crash on the instruction xlWorkbook = excelApp.Workbooks.Open();.
Is very strange because if I run the .exe via command line all works fine... The app that execute the other one run with administrator privileges...
Someone can help me?
Thank you very much!
|
|
|
|
|
Is the app used to start your .exe a .Net application? If so, are the framework versions the same? Different framework versions can cause strange effects.
Does the app run from a non-local disk? If so, security mechanisms may cause trouble.
Furthermore, when you call a .exe from some other program, it inherits the environment variables of that other program - also check here for differences.
And of course, different users (administrator vs. "normal" user is equivalent to different users) have different environments.
|
|
|
|