I am trying to create an app that allows multiple search requests to occur whilst maintaining use of the user interface to allow interaction. For the multiple search requests, I initially only had one search request running with user interaction still capable by using a backgroundworker to do this. Now I need to extend these functions by allowing more search functions and basically just queueing them up. I am not sure whether to use multiple backgroundworkers or use the threadpool since I want to be able to know the progress of each search job at any time.
In visual basic, when in the "frmMain Events: Load", I get the following error
The type initializer for 'projData.projDataModule' threw an exception.
when running the code:
var = 180
"var" is defined in projDataModule as
Module projDataModule
Public var As Double
End Module
When I rebuild the solution, It says "0 errors, 0 warnings" and will actually compile, however the Error list shows the following error:
Error 1 Custom tool error: Failed to generate file: There is an error in XML document (1, 1). I:\Documents and Settings\Bill\Desktop\Projects\Data\My Project\Application.myapp 1 1 Data
Any ideas or help at all would be greatly appreciated. Thanks in advance.
I actually don't link #region in my code. BUT for some reason call me crazy, I would like to have them in my XAML. I would like whole sections to have a #region-like thing and collapse them (e.g. my <Window.CommandBindings, <Grid.*Definitions, <Menu, <Toolbar, etc..
Does this exist? If not, how about <RegionCollapse
I have a solution file that requires a third party library (open source). The containing solution uses the typical configuration names of "Debug" and "release".
The 3rd party one has debug and release configs for both DLL and static libs - their names are not "Debug" and "Release".
How do I tell the solution to build the dependency first and how do I correlate which config to the dependant config?
i.e.
MyProject:Debug should build either 3rdParty:debug_shared or 3rdParty:debug_static
I have a project with 100's of usercontrols. When I load the project in VS2010 and try to open a designer, the toolbox spins and spins until they're all loaded.
Winforms has a "AutoToolboxPopulate" switch under Tools/Options/Winddows Forms Designer/General.
I cannot find a similar switch for the XAML designer. Does one exist?
I've got in-memory dataset with couple of tables that is populated in code. Data-bound grids on the gui show table contents without a problem.
Then I try to export the dataset into XML:
ds.WriteXml(fdSave.FileName, XmlWriteMode.WriteSchema);
and get empty XML (with couple of lines regarding dataset names but without any tables)
If I export table directly I've got all the data but dataset name is obviously wrong:
ds.Fields.WriteXml(fdSave.FileName, XmlWriteMode.WriteSchema);
What am I missing? Is there any reasonable way to write the whole dataset into file?
I have a thread that sets a value to true when it is done. Until then I wait:
while(1)
{
if(done[0] == true)
{
break;
}
}
This code works just fine in Debug but in Release it stays in the loop forever even though the debugger clearly says that it is true and not false.
Why would this not work?
Thanks
Hi
In VB.NET there is an option to add a Splash Screen when you click Add New Window but when I do that with C#, I can't find any thing.
so
How I can add a Splash Screen in C#?
I'm trying to publish my program so that it can get updates and am told I have to publish my changes to a web server or file share server, but I have no idea about how I can go about getting one...are there free ones that will perform what I need to accomplish?
I have a sgen step in my .NET 3.5 library, producing a correct XYZ.XmlSerializers.dll in the output directory.
Still having poor serialization performance, I discovered that .NET was still invoking a csc at runtime. Using process monitor, I saw that .NET was searching for a dll named "XYZ.XmlSerializers.-1378521009.dll".
Why is there a '-1378521009' in the filename ? How to tell .NET to use the 'normal' DLL produced by sgen ?
I have two detected dependencies with the same name (different paths) showing up in my setup project's detected dependencies. One's the "old" one, at an old path. How can i determine which portion of my primary project is causing the "old" one to show up? I can probably do it by trial and error, but is there a quick/direct way?
I have a setup project and I add some registry keys.
Say I have a key ..\MyApplication\ServerIp key.
When installing the second time I'd like that the ancient value will not be overridden.
1) What kind of "Condition" should I set in the setup properties of ServerIp registry key.
2) Is it possible to recuperate the ancient value from registry and display it in the "ServerIp" textBox in the installer dialog box? In this case the override could be unconditional.
Is there any way of removing unused references to assemblies, in a C# project, without the help of Resharper? The MSDN documentation does outline something for Visual Basic, but I couldn't find the same dialogs for C#.
I have an ASPX page (with VB Codebehind). I would like to extend the GridView class to show the header / footer when no rows are returned.
I found a C# example online (link) (source). However, I cannot convert it to VB because it uses typed events (which are not legal in VB).
I have tried several free C# to VB.NET converters online, but none have worked.
Please convert the example to VB.NET or provide an alternate method of extending the GridView class.
Notes / Difficulties:
If you get an error with DataView objects, specify the type as System.Data.DataView and the type comparison could be the following: If data.[GetType]() Is GetType(System.Data.DataView) Then
Since the event MustAddARow cannot have a type in VB (and RaiseEvent event doesn't have a return value), how can I compare it to Nothing in the function OnMustAddARow()?
EDIT:
The following is a sample with (hopefully) relevant code to help answer the question.
namespace AlwaysShowHeaderFooter {
public delegate IEnumerable MustAddARowHandler(IEnumerable data);
public class GridViewAlwaysShow : GridView {
//////////////////////////////////////
// Various member functions omitted //
//////////////////////////////////////
protected IEnumerable OnMustAddARow(IEnumerable data) {
if (MustAddARow == null) {
throw new NullReferenceException("The datasource has no rows. You must handle the \"MustAddARow\" Event.");
}
return MustAddARow(data);
}
public event MustAddARowHandler MustAddARow;
}
}
Using VS2010, I can't seem to add additional test methods. If I set up my project like this
[TestMethod]
public void Test1()
{
Assert.AreNotEqual(0,1);
}
[TestMethod]
public void Test2()
{
Assert.AreNotEqual(0,1);
}
The only test that shows up in my Test View is Test1. How do I make sure Test2 gets in to that list?
I Had VS2010 installed but found that intellisense wasn't working. I looked on the web and found that I wasn't the only one who had that issue. So, I installed VS2008 and everything was fine. Then I decided to clean up my computer and removed VS2010 and immediately started getting this error on my programs (new and old). Even a simple test program that has one cout command. I tried repairing VS2008 and that didn't work so I tried to uninstall and then reinstall and still I am getting the same problem.
I have looked online for this issue and though I have found a lot of other people are experiencing this issue it is not the same. They are having problems with other external references, not the ones that should automatically be included like kernel32 and lib32 etc.
I also tried the solution that worked for some people with their other references and I included the path (with and without quotes) to my kernel32 directory but still I get the same problem, or in some instances I will get
LNK1104: cannot open file 'C:\WINDOWS\system32.obj'
with and without quotes in the linker config.
Can anyone please help?
Hi,
I would like to know following: I added the folder "Graphics" into my project and placed one BMP to it. Now I would like to load the image from my code, but I cannot figure out how. I know its simple with resources but is there a way without adding the image into resources? Thanks
I am converting an application to use .dlls and I'm riddled with linker errors stating
unersolved external
symbol"__declspec(dllimport) public:
void __thiscall
Rail::SetNextrail(class Rail *)"
There is more gibberish at the end of this error message. Why should this happen and how do you fix it? __declspec(dllimport) is being placed with a macro defined as:
#ifdef LUDOAI_EXPORT
#define DECLSPECAI __declspec(dllexport)
#else
#define DECLSPECAI __declspec(dllimport)
#endif
I am trying to a redirect the user when they click on a specific button
protected void Button1_Click(object sender, EventArgs e)
{
Server.Transfer("ControlPanel/Default.aspx");
}
The problem is when I click Button1 it redirects me to another page
localhost:57988/WebSite5/Default.aspx
and the weirdest thing is it open another page with this link above, not the default page I have, but another but with the default.aspx page url that you see!
Any suggestions?
Hi,
In VS2010 how do I add a whole directory of existing items?
When I right click on project and Add ExistingItem I seem to be able to load only one file at a time?
I have asp files on server and i created a working folder and checked out code. I then created new files in working folder and did checkin but they new files are not copied.
Does VSS do not copy new files or is there a way i can check in those files to VSS database.
i'm trying to run a conditional statement in a class i'm placing in my App_Code folder
the condition is whether the person is logged in or not. I normally have two ways to do this in my masterpage and ASPX's
if (!User.IsAuthenticated) or if(Profile.username = "anonymous")
however neither of these things seem available to me in the .cs i'm making. anyone know what i'm missing? maybe a using namespace up top?