|
i have a unmanaged dll in c++ that calls a
callback function in c# module
I want the c# code to fill an array for me
so the c++ code can use it
I can send an array but how can I do it by reference ?
osiliti
|
|
|
|
|
Hello there!
I am trying to create an export for DataGrids and Bitmaps into Excel.
To do this, I created an overloaded function with the ability of exporting into a specific worksheet.
Right at the moment, the function looks a little like this:
public void datagrid(GridTab gt_toexport, int sheetnr)<br />
{<br />
Excel.ApplicationClass excel = new ApplicationClass();<br />
Excel.Workbook excelWorkbook;<br />
<br />
<br />
if (File.Exists(target))<br />
{<br />
excelWorkbook = excel.Workbooks.Open(target,<br />
0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",<br />
true, false, 0, true, false, false);<br />
}<br />
else<br />
{ <br />
excelWorkbook = excel.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);<br />
}<br />
<br />
Excel.Sheets excelSheets = excelWorkbook.Worksheets;<br />
<br />
Excel.Worksheet excelWorksheet = (Excel.Worksheet)excelSheets.Add(null, excelSheets.Count, 1, true);<br />
<br />
System.Data.DataTable table = gt_toexport.Table;<br />
<br />
<br />
excel.Save(target);<br />
}
All the things I marked with ***'s are things I am not sure about.. or dont actually work
Another thing is ... I dont know how to export a Bitmap object or an jpeg File into an excelsheet ... ;(
Would be great if you could help me out
Big TIA
|
|
|
|
|
Hi
Is there a way how to check if a workstation is locked and/or logged of?
|
|
|
|
|
Hi, im new to C# and i need some help printing HTML files programmatically.
Currenly i have created a windows application (C#), that scans a specified directory. For the files it should print. I am able to print the HTML files currently to any printer that is specified (without prompting at all). I use the Windows API SetDefaultPrinter to set the printer to which IE Must print.
The program scans the HTML files for this information.
Currenly i am also able to set the Headers,Footers,Margins by editing the registry.
But i need some help with setting the PaperSize,Copies (Or i could just loop),Orientation
Please let me know thanx.
|
|
|
|
|
I've been working for days on a project that creates a BAND OBJECT(BHO)in IE. This BAND has a button which when pressed finds a text box in the current HTML page, fills it in, then finds a button and clicks it to submit the page changes.
So far, I've found a terrific C# template that allows you to create a Band Object in IE. http://www.codeproject.com/csharp/dotnetbandobjects.asp
I've commented this code extensively and have done some Regional grouping to make the code clearer. Let me know if you'd like to see it.
Anyways, so I'm down to the part where I'm trying to access the HTML page. From my research, I've found that AxShDocVw, SHDocVw, mshtml references are needed to work with the browswer. Honestly, that's all the solid information I know. How do I take advantage of these references to access the browser and it's DOM?
I'm really pressed for time, so I'd appreciate your help...A LOT!
Thanks,
Dustin Lyday
~D
|
|
|
|
|
Hi,
am sure this question or one very much like it has been asked already by someone else but I can't find the thread so sorry for asking it again.
I have a screen with 1 listbox and 1 datagrid. The listbox is populated (via a stored procedure) with users.
I have another stored procedure which displays user info depending on whether 1 user is selected or all users are selected. What I need is to be able to select various users and then display the info.
How do I loop through the listbox?
Sorry again for re-asking old questions, please point me in the direction of the old thread if thats easier.
Really basic code sample below, I know the loop code has to sit in the 'else' section somehow.
private void btnRefresh_Click(object sender, System.EventArgs e)
{
if(chkSelectAll.Checked == true)
{
AllScannerCount();
}
else
{
SelectedScannerCount();
}
}
Thanks in advance
Scotty
|
|
|
|
|
I wrote a program that would change edi to xml.
Anyway the problem is to be able run the program from a network drive.
I keep getting Security Exception errors, regardless of how much I tried to play with the Security class (FileIOPermission or PermissionSet ....)
My question is:
Is there a way to request for the permission without using the .NET configuration or caspol.exe?
Thank you so much.. please help if you can
Elapid For The Win
|
|
|
|
|
No. The network is not a trusted source of executeable code. The application can't get permissions when the code is not trusted in the first place. You MUST configure CAS to allow the appropriate permissions for code running from a remote location.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am writing an email client application in C#. Do you know if there is any .net Component that I can use to show the email message body..(since sometimes the message contains html)
|
|
|
|
|
Yes, use the Microsoft web browser control (put %system32%\shdocvw.dll in your Visual Studio toolbox, then drop it on your form). For advanced manipulation of the Microsoft web browser control, you may also need to add a reference to %program files%\microsoft.net\primary interop assemblies\Micrsoft.mshtml.dll
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Lies of Our Fathers: A Must-Know About Lent
Judah Himango
|
|
|
|
|
Yes that is what i used but i thought maybe there is something else to handle every type of email message
|
|
|
|
|
Hello folks,
I would like to personalize my windows forms based on my security setting.I will define some user rights into my code and then I will try to apply these rules to my windows forms.
How can I start?What must I do?
Do you have any advices??
|
|
|
|
|
Hi All!
How to add controls dynamically inside a Richtextbox and set properties for the same......I know how to add controls to a Richtextbox dynamically but when i start typing in the Richtextbox the control overlaps whatever i type... how can i make it look like a normal text and the controls should be links..
I have a another question is it possible to identify the text which is getting deleted in a Textbox.... i mean the exact character which gets deleted when i press backspace.
Regards
Deepak.S
|
|
|
|
|
<br />
public enum Colors {Green, Red, Blue}<br />
How do I programatically know how many items are in that enum ? I need to create an array with the size of how many items are in that enum. For example when I have two items in the enum (Green, Blue), I have an array of size 2 (int[2]).
Regards,
Desmond
|
|
|
|
|
This will do it.
Enum.GetValues(typeof([type name of your enum])).Length;
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Very simple (if you know how, of course ):
Enum.GetValues(typeof(Colors)).Length GetValues() already returns an array, so perhaps you can use this one directly instead of creating one yourself.
Regards,
mav
|
|
|
|
|
I have a customized Print Preview dialog made of a Print Preview control.
When I increase zoom property, the document inside it gets enlarged and two scroll bars appear. But when I scroll down with Vertical scroll bar, it doesn't go till the bottom and bounce back upwords if I resize(enlarge) the Dialog it self. It doesn't show the bottom of the document in any case.
More over when the dialog is compressed and the document in side the preview control is not 100 % visible widthwise, the expected horizontal scroll doesn't appear.
What is the reason for such behavior?
Please guide
|
|
|
|
|
hi
i use a requer validator to control a textbox in a web page.
it works correctly on local but when i upload it to server the validator dosnt works.
whats the problem?
thanks
|
|
|
|
|
hi
Check if all the necessary file are there in the root directory of ur application in the IIS, the important file is aspnet_client.
cheers
chettu
|
|
|
|
|
hi
i checked and copy the aspnet_client folder to host root
but the problem still exist..
|
|
|
|
|
Hi
I had the same prob and the solution i gave solved the prob..... is that only ur app is not working properly or all the app running on the IIS.
|
|
|
|
|
Hi,
I want to insert a windows media player into my PDA program.
I find that the methods used in windows application can't be used in PDA.
Any default method can be used?
Or any other approach should be used?
Please help
Regards,
RockRock
|
|
|
|
|
hi friends.
i am facing a problem.
i want to display some text in a multilined texebox. actually its a text box, displaying some status. I want to show different color text for some perticular status. i tried using the color property of the textbox, but it changes the color of the entire box.
please help.
|
|
|
|
|
Get a textbox that supports multiple colours.
Either that, or I remember doing this years back in vb4 (with extras) using subclassing to do the job. If i remember rightly i trapped the paint event, got the position for the line i wanted to colour etc and printed the new coloured text directly over the exiting one in the listbox. This worked surprisingly well especially since I only did it to piss off a mate who said making colour listboxes was the only thing he couldn't do
|
|
|
|
|
Have a look at the RichTextBox control coming with the framework.
|
|
|
|