|
Can Visual Studio.net create applications that will run on different computers that do not have the visual studio.net compiler?
|
|
|
|
|
Yes, it can. .NET applications only need the the .NET runtime, it's not necessary to have VS .NET.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
If you're asking because you've tried, you can only build applications as you have done, they are reliant on the .NET framework ( as someone said ) and there's nothing you can do about that. The framework is a seperate download, it comes with the compiler.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a stituation where a method is accessed over remoting which takes a reference to an object as a parameter. But running the client chucks an exception.
The object that I am trying to pass by reference does extend MarshalByRefObject
And below is the exceptions I get:
Unhandled Exception: System.Runtime.Serialization.SerializationException: Because of security restriction
s, the type System.Runtime.Remoting.ObjRef cannot be accessed. ---> System.Security.SecurityException: Re
quest failed.
at System.Security.SecurityRuntime.FrameDescSetHelper(FrameSecurityDescriptor secDesc, PermissionSet d
emandSet, PermissionSet& alteredDemandSet)
at System.Runtime.Serialization.FormatterServices.nativeGetSafeUninitializedObject(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
--- End of inner exception stack trace ---
I don't know if what I am trying to do is even possible. So any advice would be much appreciated.
Cheers
Naren
|
|
|
|
|
Can somebody help me with a regex expressiion that will match all regex keywords (\w, \s, \d, ., ^, |, ?, (), etc...) and escape them?
So, i have a string like this, "\w\s\d.|" and I want it to be like this "\\\\w\\\\s\\\\d\\.\\|". Any ideas?
/\ |_ E X E GG
|
|
|
|
|
Do you really need to replace one slash with four ?
string.replace will probably do this just as easily, I'd have thought.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Java does. For example, "\w" already has one slash, I need another to escape it from the regex engine and two more to escape it from javac. Hence, \\\\w==\\w
/\ |_ E X E GG
|
|
|
|
|
You only have to escape the special characters. A pattern like this should do:
"\^$*+?.()[]"
---
b { font-weight: normal; }
|
|
|
|
|
I need \w\s\d {}'s etc... too!
/\ |_ E X E GG
|
|
|
|
|
Hello, my problem is how do draw an grind with GDI+, i need a grid for my furst game so the
object will be able to move in cells. that was my way:
private void GrindPaint(object sender, PaintEventArgs pea)<br />
<br />
{<br />
<br />
Graphics gfx = pea.Graphics;<br />
<br />
int space = 2,cwidth = 10, cheight =10, amount =30;<br />
<br />
Pen pen = new Pen(Color.Black);<br />
<br />
int cx=1,cy=1;<br />
<br />
<br />
for(int j = 0; j<amount; j++)<br />
<br />
{<br />
<br />
cx = 1;<br />
<br />
for(int i =0; i<amount; i++)<br />
<br />
{<br />
<br />
gfx.DrawRectangle(pen,cx,cy,cwidth ,cheight);<br />
<br />
cx = (cx+cwidth+space);<br />
<br />
}<br />
<br />
cy =(cy+cheight+space);<br />
<br />
}<br />
<br />
}<br />
<br />
My question: confused: is , is there another, better way or easier
tnx for help!!
i'm learning
|
|
|
|
|
Personally, I'd just draw lines, not rectangles.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to have cellspace , so i draw rectangels with distance 2px,...
is my way ok?
i know stupid questions,... but i started c# and GDI+ 1 weag ago
tnx for all replies
i'm learning
|
|
|
|
|
Your way is fine, if you see a grid, then you got what you want. If it's not drawn over and over, it doesn't matter, but unless you're making less API calls ( you didn't check the box to show <, so I couldn't read all you code ) because of the size of the boxes you draw, I thought lines may be quicker.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How can I convert a datatable in MS Access into a comma delimited text file.
thanks.
|
|
|
|
|
If you have Microsoft Access, you can open the database and do an export and choose the save as "text file" option. If you do not have Microsoft Access, then you could write a simple routine to loop the data and write each field value out to a text file.
|
|
|
|
|
|
Ok, I am trying to retrieve a list of names from the database and based upon the number of rows retrieved from the DB, I am trying to do the following:
1. Instantiate a array of command buttons.
2. Add those command buttons to the list view.
I am assuming step 2 is possible since the item property is a collection of objects, I can add anything I want to add to it. Well it works fine except instead of actual command buttons, I am seeing the following , "System.windows.forms.Buttons, Text="rwqr""
What am i doing wrong.
|
|
|
|
|
What you are trying to do is not directly possible with the listview provided with .NET. The items collection is a collection of data associated with each element in the list, not a collection of controls to be displayed within the list. By default, if no string is supplied when adding items to the collection the objects ToString method is used to get the string to display. This is why you are getting the output you are getting. There are articles here on Code Project that show listview implementations that are capable of docking other controls within the listview. Note that it's not something you will be able to do with a trivial amount of code (though not an unobtainable goal either).
|
|
|
|
|
HI dears!
i m having a finger print scanner Digital Persona U.R.U 4000. i wnt to create an application for thumb recognition. i need the guide line sdk given with it is out of my under standing. Is there any body who may help me in this regard. or some one already done such sort of work using its sdk. Waiting 4 reply anxiously
|
|
|
|
|
For something this specialized I'd look for a help forum from the hardware developer, or failing that try posting on a large broadbased forum or newsgroup, with only a few dozen heavy posters it's unlikely that anyone here will have used the same hardware you're having trouble with. YOu could also try searching sourceforge for a program doing something similar.
|
|
|
|
|
I just received my DigitalPersona SDK, for an application I'm developing, but I've had no chance to look into it yet. So, if you find something, you could write an article for CP. I would read it
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I've developed a web page in c#.Net (VS 2003).It has a page (exportExcel.aspx) with same data in a table an a button to export this data to excel. The code of the button use Response object to do it:
Response.Clear()
Response.ContentType = '...Excel...'
Response.write('...data....')
Response.flush()
It works, but the file's default name in the dialog window to save the file has aspx extension 'exportExcel.aspx', not 'xls' extension. Somebody know how put a defaul name different of the page name?
sorry my english
Thanks for your help
Carlos
|
|
|
|
|
Carlos,
I wrote this class to export a datagrid to excel, you may modify it for any other control.
<br />
public class ExportToExcel<br />
{<br />
private Page m_pPage = null;<br />
public ExportToExcel(Page pPage)<br />
{<br />
m_pPage = pPage;<br />
}<br />
<br />
public void ExportDataGrid(System.Web.UI.WebControls.DataGrid dg)<br />
{<br />
System.Web.HttpContext context = System.Web.HttpContext.Current;<br />
<br />
context.Response.Clear();<br />
context.Response.Buffer= true;<br />
context.Response.ContentType = "application/vnd.ms-excel";<br />
context.Response.Charset = "";<br />
m_pPage.EnableViewState = false;<br />
<br />
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();<br />
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);<br />
<br />
this.ClearControls(dg);<br />
dg.RenderControl(oHtmlTextWriter);<br />
<br />
context.Response.Write(oStringWriter.ToString());<br />
<br />
context.Response.End();<br />
}<br />
<br />
private void ClearControls(Control control)<br />
{<br />
for (int i=control.Controls.Count -1; i>=0; i--)<br />
{<br />
ClearControls(control.Controls[i]);<br />
}<br />
<br />
if (!(control is TableCell))<br />
{<br />
if (control.GetType().GetProperty("SelectedItem") != null)<br />
{<br />
LiteralControl literal = new LiteralControl();<br />
control.Parent.Controls.Add(literal);<br />
try<br />
{<br />
literal.Text = (string)control.GetType().GetProperty("SelectedItem").GetValue(control,null);<br />
}<br />
catch<br />
<br />
{<br />
<br />
}<br />
<br />
control.Parent.Controls.Remove(control);<br />
}<br />
<br />
else<br />
<br />
if (control.GetType().GetProperty("Text") != null)<br />
{<br />
LiteralControl literal = new LiteralControl();<br />
control.Parent.Controls.Add(literal);<br />
literal.Text = (string)control.GetType().GetProperty("Text").GetValue(control,null);<br />
control.Parent.Controls.Remove(control);<br />
}<br />
}<br />
return;<br />
}<br />
<br />
}<br />
|
|
|
|
|
To specify filename you have to add header:
response.AppendHeader("content-disposition", "inline;filename=Filename.xls");
|
|
|
|
|