|
In Visual Studio, go into your project settings. Go to the Publish tab. Click the "Updates..." button. Uncheck the "the application should check for updates" checkbox.
Now your app won't automatically check for updates.
To enable your app to check for updates when you click your Update button, you can use the APIs in .NET's System.Deployment dll, in particular, the methods in the ApplicationDeployment[^] class. For example, something like this:
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CheckForUpdate()
|
|
|
|
|
what /// means in c# i know that // means comenting one line
|
|
|
|
|
It creates comments which are built into an XML file, from which documentation can be auto generated.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi there,
I would much appreciate if anyone could help me on this problem that is sligthly driving me crazy,
I've a string ... say "abc§123§§456§§§xyz"
I'd like to split it in a string[] , using '§' as separator , now the trick is that '§' is (in this case) also an 'escape' char.
(i.e. in the original string "§§" represent the '§' ... and therefore is not to be considered to be a separator for splitting).
So I am expecting a split like :
abc
123§456§
xyz
My code is (so far):
Regex regExSplit = new Regex("(?<!§)§(?!§)", RegexOptions.IgnoreCase |RegexOptions.Compiled);<br />
string[] splitResult = regExSplit.Split("abc§123§§456§§§xyz");
That split as
abc
123§§456§§§xyz
Thanks for any help
Marc
-- modified at 4:51 Monday 16th April, 2007
|
|
|
|
|
Escape char as seperator ...maybe I'm misunderstanding the question, but wouldn't you simply type a double §§ in the regex string?
|
|
|
|
|
Sorry if I was not clear enough,
if I use "§§" as a pattern the split of "abc§123§§456§§§xyz" will give
abc§123
456
§xyz
and this is not my expected
abc
123§456§
xyz
To try to make it clearer let's say that in the original string a substring like "§§" is to be understood as :
since a "§" is followed by another "§" , then in the result string this second "§" is to be kept as is and not considered to be a separator
(think of "\" instead of "§" if you prefer : "\\" means a real '\' not to be considered as a 'special' char. ... but that makes things quite unreadable in regex patterns)
Thanks
Marc
hooktrack.girollet.com
|
|
|
|
|
I tried a couple of different regexes but wasn't able to accomplish this. Perhaps this is better asked in a regex forum?
|
|
|
|
|
Thanks much to have drop an eye, and spent of your time on this topic
I'll take your advice and try the regex forum
Take Care
Marc
|
|
|
|
|
hai,
I want to be able to set the PictureBox.AllowDrop property in the designer
but it doesn't appear in the properties list.Other controls like Panel do show this property but not PictureBox. Why is this?
how can i drag a picture from one picture box to other
sree
|
|
|
|
|
You mean in the designer, or in your app ? The picture box does not support this behaviour in your app. You'd have to write it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi
I have been busy getting my skills up with C# Windows development because I been working with ASP.NET for ways too long.
I have been looking into Remoting with C# , and I would like to know is there a way I can use Visual Studio's databinding tools with the development of a Remoting site.
As in a Server tier that contains the database , with a remote layer between that and multiple client applications ?
I have worked with Java RMI before So I am not that new to Remoting or CORBA.
Le Roux Viljoen
Web Developer
PCW New Media
South African Branch
www.pcwnewmedia.com
|
|
|
|
|
Chona1171 wrote: s there a way I can use Visual Studio's databinding tools with the development of a Remoting site.
A remoting site? What do you mean by "remoting site"?
And no, Visual Studio's databinding tools don't work with remoting at all. Instead, you use remoting to get data to and from the server, then you can bind to the resulting objects as necessary.
|
|
|
|
|
Sorry what I meant to say was a remote server application
Le Roux Viljoen
Web Developer
PCW New Media
South African Branch
www.pcwnewmedia.com
|
|
|
|
|
Ok. Given that you're going to be working with a .NET remoting server, what is your question?
|
|
|
|
|
I am trying to fetch some data from the net. I want to show the progress bar to show the percentage of download.
How can i effectively set the value of progress bar,according to the download
My small attempt...
|
|
|
|
|
Well, which bit do you need help with ? How are you doing the download ? Do you know how big the file is, and how much you've downloaded ? If so, it's trivial to set a progress bar. If not, it's not possible.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Actually i am try to do one web service.
My c# application will fetch a dataset with two tables from the server. I cant tell the size of the dataset.
i just want to see a progress bar to show the progress of this operation,like download in windows
My small attempt...
|
|
|
|
|
sujithkumarsl wrote: I cant tell the size of the dataset.
i just want to see a progress bar to show the progress of this operation,like download in windows
Windows knows the size of the downlaod. How can you tell someone how close they are to finishing, if you don't know the size ? You can do a progress bar that just moves back and forth, but not one that tells people how long it will take.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
yes. i know that.....
Actually i am getting the dataset as a return type by the webservice.....
Is there any relevent method to sortout my problem?
My small attempt...
|
|
|
|
|
No, again, if you're just getting a dataset, then there's no point writing the code to send it a bit at a time, so you can do proper progress, so just do a dummy one.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
hi,
i'm having a silly problem and i'm trying to describe it as simple as possible
i'm accessing a device which takes images. this device has a timeout property, which i have to set high (for some seconds). if a timeout occurs, it is "catched". after an image is taken, it is shown in my gui window.
so, i put the device accessing part in a thread which is getting the images and sending the images to the gui. in code it looks like this:
public delegate void newimg_handler(object sender, newimage_args e);
public class camerathread
{
public event newimg_handler newimg;
bool quitthread;
imageobject img;
public camerathread()
{
img = new imageobject();
quitthread = false;
OpenImageDevice();
}
public void exithread()
{
quitthread = true;
}
public void run()
{
while (!quitthread)
{
try
{
GetImage(out img);
if(newimg != null)
{
newimage_args nia = new newimage_args();
nia.img = img;
newimg(this, nia);
}
}
catch
{
}
}
}
}
public class newimage_args : EventArgs
{
public imageobject img;
public newimage_args()
{
}
}
and in the main form it's called like this:
public Form1()
{
...
ct = new camerathread();
ct.newimg += new newimg_handler(ct_newimg);
camerawork = new System.Threading.Thread(new System.Threading.ThreadStart(ct.run));
camerawork.Priority = System.Threading.ThreadPriority.AboveNormal;
camerawork.Start();
...
}
void ct_newimg(object sender, newimage_args e)
{
img = e.img;
display(img);
}
my BIG problem is, that the gui form is not responding while the thread is waiting for an image from the device (it can be many seconds, according to the timeout property). but why? i wrote the same application in c++ and everything is working fine (but c++ is at the moment not an option, the application has to be in c#.net). i also tried asynchron BeginInvoke calls on a method which is taking the images, but the same result. it looks like it's working sequentially, like i would use a timer for getting the images.
how can i make the thread completely independent working from the gui form, so i can also interact with the gui? i'm confused about the threading under .net. any hint is welcome. help
regards,
criss
|
|
|
|
|
Explain to us what makes you believe that you're starting a seperate thread ? All I see is a seperate class, which ,being on the same thread, would indeed lock the UI.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
hi christian,
in the forms constructor i'm having the following lines of code earlier listed, which should start my camerathread (the another/seperate thread) or am i wrong? and if this is not doing what i'm thinking it should do, how should it be?
ct = new camerathread();
ct.newimg += new newimg_handler(ct_newimg);
camerawork = new System.Threading.Thread(new System.Threading.ThreadStart(ct.run));
camerawork.Priority = System.Threading.ThreadPriority.AboveNormal;
camerawork.Start();
criss
|
|
|
|
|
OK, yes, that should work.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi,
it seems like you have a thread with a priority above normal (hence above the UI
thread) and with a "busy loop" (while !quitthread GetImage). It is not
apparent from the code shown that this loop ever relinquishes the CPU;
if it does not, there is a design error (not a language issue) and I would
suggest you add a Thread.Sleep(100) somewhere, possibly in the else of your
newimg test.
Hope this helps.
|
|
|
|