|
Write the service.
Make a debug build.
Install the service.
Start the service.
Attach the debugger -- Visual Studio -- to the process that is the service. That service has to already be installed and running (or at least asleep in its OnStart method).
|
|
|
|
|
Use the diagnostics namespace:
#if DEBUG
System.Diagnostics.Debugger.Launch();
#endif
This will launch and attach a debugger to the process. Theres a bunch of other useful methods on that class as well.
|
|
|
|
|
hi
i have a main form, when i click on button, the datails form show via showdialog() method, in DetailsForm_Load event, i use delegate to loading data from another thread, here is my code :
myDelegate delInctance = new myDelegate(this.gu2.Show_WaitingForm);<br />
delInctance.BeginInvoke("در حال بارگذاري اطلاعات ...", null, null);<br />
if (this.isNewMode)<br />
{<br />
this.LoadLookUp_TypeResource();<br />
this.LoadLookUp_Group(); <br />
<br />
this.bar_btn_edit.Enabled = false;<br />
this.bar_btn_delete.Enabled = false;<br />
<br />
this.barStaticItem1.Caption = "آماده";<br />
}<br />
else if (this.isEditeMode)<br />
{<br />
this.LoadLookUp_TypeResource();<br />
this.LoadLookUp_Group();<br />
this.InitData();<br />
this.dataNavigator1.Position = this.currentRowIndex;<br />
this.barStaticItem1.Caption = "آماده";<br />
}<br />
this.gu2.Hide_WaitingForm();
but when i load event, finish operation, my form and my app get lost focus window, how to solve my problem and keep focus on my DetailsForm ?
thanks
|
|
|
|
|
SELECT COL1,COL2,SUM(COL1,COL2) AS COL3 FROM TEST;
THAT, sounded logical to me but it's not working!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
sum will add all values for a single column and give a total. Try col1 + col2 as col3, and in future try reading the docs instead of guessing, and try defining 'it's not working' when you ask a question.
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 )
|
|
|
|
|
Oops, sorry
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Also, the SELECT COL1, COL2 part will return one row for each row in your table. The SUM function will return only one row no matter how many you have. They are not compatible like that, without grouping by something. See GROUP BY docs.
|
|
|
|
|
Dear all,
i made a package using set up and deployment project of visual studio. now every time i made a change in my code i just recompile the package and i get the new package.. it just happened that i got the spelling of product wrong. To make the setup again very is lengthy process. how can i just rename the setup package and recompile the setup..
i.e i have a package name stepup1 i need to rename it as setup1. Is there any way.
|
|
|
|
|
Hello,
my utility works ok on small data samples, but it's throwing an "Out of memory" exception on me whenever I try to apply it on a bigger data sample (a couple of hundred MBs). The exception is thrown during the sort.
Is this a physical limitation of the DataTable or am I missing something?
This is the dump of the exception description:
System.OutOfMemoryException was unhandled
Message="Exception of type 'System.OutOfMemoryException' was thrown."
Source="System.Data"
StackTrace:
at System.Data.RBTree`1.TreePage..ctor(Int32 size)
at System.Data.RBTree`1.AllocPage(Int32 size)
at System.Data.RBTree`1.GetNewNode(K key)
at System.Data.RBTree`1.Insert(K item)
at System.Data.Index.InitRecords(IFilter filter)
at System.Data.Index..ctor(DataTable table, Int32[] ndexDesc, IndexField[] indexFields, DataViewRowState recordStates, IFilter rowFilter)
at System.Data.DataTable.GetIndex(IndexField[] indexDesc, DataViewRowState recordStates, IFilter rowFilter)
at System.Data.DataView.UpdateIndex(Boolean force, Boolean fireEvent)
at System.Data.DataView.UpdateIndex(Boolean force)
at System.Data.DataView.SetIndex2(String newSort, DataViewRowState newRowStates, DataExpression newRowFilter, Boolean fireEvent)
at System.Data.DataTable.get_DefaultView()
at TickConvertor.Program.Main(String[] args)
Thanks much for any input!
Michal
|
|
|
|
|
Seems like using DataTable.Select() instead of the DataTable.DefaultView.Sort might be the solution.
Michal
|
|
|
|
|
DataTable.Select() is throwing the same exception.
Any ideas?
Thanks,
Michal
|
|
|
|
|
Hi, I was wondering if theres a utility that can convert C# projects to vb.net projects (2005). I know there are many free converters online, but I cannot find any that can convert project files. I do have one, but its for the older 2003 files. Any ideas?
|
|
|
|
|
There are numerous commercial products that do this. I've used them in the opposite direction and found that the same one worked great for a winforms app, and terribly for an ASP.NET app. Having said that, VB being weakly typed, I'd expect a conversion from C# -> VB to go smoother.
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 )
|
|
|
|
|
Try SharpDevelop (free IDE, open-source equivalent for VS), where u can convert the code by one click. When you have *.vb files converted, just create a new VB project (in VS or SharpDev, whatever) and include all of them.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
How would you go about converting files in SharpDevelop? I have the program, but cant find any option to convert C# > VB.net
|
|
|
|
|
Hi,
I looking some way to find the Regular expression of some string -
What i mean is that i will give some function string and this function will return some Regular expression that match to this string.
Is there is some way to do it in c# ?
Thanks.
|
|
|
|
|
Nothing built in, you could write a parser to work out, for example, how many alphabetical characters occur, etc, and build *something* that will match.
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 )
|
|
|
|
|
Yeah, what he said. Plus, to get anything useful from such a routine, I think you'd need to provide several sample strings to get something worthwhile.
If you put in "Hello world", would any of the following be satisfactory?
"^Hello world$"
"^..... .....$"
"^\w\w\w\w\w\s\w\w\w\w\w$"
"^.+ .+$"
"^\w+ \w+$"
|
|
|
|
|
Just curious Yanshof, but what do you need this for?
If you are looking to find a string in another (long) string, then theres a fair few functions on the string class for doing this. RegExs might be very powerful and flexible, but don't assume they are *fast* for simple tasks.
|
|
|
|
|
Sorry, but this question makes no sense, because if you want some regular expression then just return the string itself as pattern.
A much more interesting question would be to find a regular expression of minimal length but I don't think that this is an easy task
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
i want to send date time picker details to oledb database.under code not work.my languege is visualstidio c#.net.plese help.
"insert into Query1(accountdate) values('" + datetimepicker1.text+ "')";
|
|
|
|
|
1 - try meaningful subjects. All the posts here are about C#, or they are in the wrong place. Honestly, you have 9 posts here, and 8 are named 'C#'
2 - I answered this yesterday. So did several other people. If you can't understand the answers, then you need to ask further questions.
Try using parameterised queries. Otherwise, you may need to do a cast on the type of the data being passed in, in your SQL.
This is ultimately an SQL question. Have you tried working out what you can type into your database directly to perform this action ? If you're going to string mash your SQL, that's the best way to work it out and get meaningful error information while you work through it.
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 )
|
|
|
|
|
Christian Graus wrote: answered this yesterday. So did several other people.
Here we go again, huh?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Use a more meaningful subject line, instead of just c#.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I need to be able to do JPEG lossless rotations/transformations in C#. Unfortunately, the methods available in C# are not reliable enough.
Does anyone have a wrapper for jpegtran for use in C#?
|
|
|
|