|
Hmmmm...
Are you able to create new Web projects (ie. File->New->Web Site)? Or is this just when opening the existing Web Application? Have you tried deleting the sln/suo files and re-opening the project via the csproj file?
|
|
|
|
|
Travis D. Mathison
I get(tested) another projects like this project and I get same error?
I try to test all ways (your answer) and help visuall studio but it dosent work
and always this error.I get this error when opening the existing Web Application
and i try to delete sln and reopen but I get same error
-- modified at 9:54 Wednesday 3rd May, 2006
I think that C# is difficult than Visuall c++,right?
|
|
|
|
|
Seems your installation of VS.NET is bad/corrupted, or the web components needed are not installed as expected.
|
|
|
|
|
Can you be more specific because I install full vs and seems that all compinents are installed
|
|
|
|
|
Can anybody give me realtime scenario where there is need for windows messaging constants to be used (like WM_NULL = 0x0000 etc..)
satosh
|
|
|
|
|
|
thanks alexey, can u pls tell me where can we find WM contants' values
santosh
|
|
|
|
|
hi kumar.bs!
It's in the WinUser.h file. located on your Visual Studio Folder.
C:\Program Files\Microsoft Visual Studio .NET (2003 or 2005)\Vc7\PlatformSDK\Include
microsoc
|
|
|
|
|
Can anyone pls modify this querry to use inside in C#
here "word" only the c# variable.I am using SQL Server as DB.
SELECT
Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames
where
HindiLex.Word = word
and HindiLex.AttrNo = Attributes.AttrNo
And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo
and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo
-- modified at 2:07 Wednesday 3rd May, 2006
|
|
|
|
|
hi
man if this 'word' is string then it is like that
"SELECT
Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames
where
HindiLex.Word = '" + word +
"' and HindiLex.AttrNo = Attributes.AttrNo "+
"And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo "+
"and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo"
|
|
|
|
|
Don't forget to encode the string correctly, or the query is open for SQL inections:
"SELECT
Word,Category,Number,Gender,Person,Degree,ObjectType,Tense,Aspect,Mood,Comp1,Comp2,Comp3,Theta1,Theta2,Theta3 FROM HindiLex,Attributes,SubCategoryFrames,ThematicFrames
where
HindiLex.Word = '" + word.Replace("'","''") +
"' and HindiLex.AttrNo = Attributes.AttrNo "+
"And HindiLex.LexSCFNo = SubCategoryFrames.LexSCFNo "+
"and HindiLex.ThemSCFNo = ThematicFrames.ThemSCFNo"
---
b { font-weight: normal; }
|
|
|
|
|
hi guys!..
How can we declare global variables in c# window application....
in VB.net we can use a Module for variables which can be accessed anywhere in a application..
how can we do this in C#...
abhinav
|
|
|
|
|
You can't make globals in VB.NET or C#. Instead, you can create a class with public, static variables. However, global variables are often a sign of bad design, consider your approach first.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi friends i am developing windows application . I have two combobox on form.
I added comboBox1_SelectedIndexChanged event for both combobox. In form load
i bind both combobox with ArrayList arr and arr2 object ..The problem is that when i give combobox1.DataSource = arr it call combobox1_SelectedIndexChanged event why it call .... i didn't call it...because i have diff functionality for combobox1_SelectedIndexChanged event and it call on form load when i give combobox1.DataSource and my logic is failed how to avoid this ......
Thanks and regards
|
|
|
|
|
This happens because when the combobox is populated, the first item is automatically selected, and therefore, the SelectedIndexChanged event is called. Use a boolean flag to prevent this from happening:
bool AllowSelectedIndexChange = true;
void Form1_Load()
{
...
AllowSelectedIndexChange=false;
combobox1.DataSource = arr;
AllowSelectedIndexChange=true;
...
}
void ComboBox1_SelectedIndexChanged(...)
{
if (AllowSelectedIndexChange)
{
}
}
Hope this helps,
DigitalKing
|
|
|
|
|
|
hi DigitalKing & yogsworld!
you can also try these options:
option 1:
void Form1_Load()
{
...
combobox1.SelectedIndexChanged -= new EventHandler(SelectedIndexChanged_Handler);
combobox1.DataSource = arr;
combobox1.SelectedIndexChanged += new EventHandler(SelectedIndexChanged_Handler);
...
}
option 2:
remove the attaching of the SelectedIndexChanged event handler in the InitializeComponent, then just do it in the Form1_Load after the setting of DataSource property of the combobox.
just alternatives instead of using a flag.
microsoc
|
|
|
|
|
Hi Guies,
I am working on one application which require a url get executed through
c# code.
How to do it?
Thanks in Advance
yuvaaaaaaa
|
|
|
|
|
Hi,
This will load the URL in the default web browser:
System.Diagnostics.Process.Start("http://www.codeproject.com");
|
|
|
|
|
I have a Common UI project that contains many commonly used controls and wrappers for Buttons, label, textbox, treeview, etc.
E.g. public class ButtonEx:Button { /*custom properties*/ }
When I work on actual projects, I add this CommonUI project to the solution as an existing project. How the heck do I get the Visual Studio to recognize my the common controls and display them in the Toolbar? I don't want to explicitely add the controls by right-clicking on Toolbar and selecting Add-Remove Tools as that will create a copy of my primary DLL in VS's temp location.
I can get all of my user-controls to show up in Toolbar by opening them in designer mode, and (re)building the solution. I just can't get controls NOT deriving from UserControl to show up. I've tried closing/reopening VS several times, but no luck.
Any suggestion?
Thanks,
- Malhar
|
|
|
|
|
how would i go about creating a one button app that would delete cookies, temporary ie files, history, and temp folder files for any profile in windows xp. i only have basic or beginner level c# knowledge so any help would be appreciated. thanks in advance, roger
|
|
|
|
|
You can delete files using the System.IO.File.Delete static method.
You can retrieve files in a directory using System.IO.Directory.GetFiles static method.
You can find out the path to certain system directories (such as temp directory) using System.Environment.GetFolderPath static method.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
When I came across the problem of clearing the IE history from a .net app, I searched for days before finding this solution.
It's not pretty, but it gets the job done. Yes, every line is required. Just call the ClearHistory method to do it.
Add these imports:
using System.Runtime.InteropServices;
using Microsoft.Win32; Then,
[StructLayout(LayoutKind.Sequential)]
private struct UUID
{
public int Data1;
public short Data2;
public short Data3;
public byte[] Data4;
}
[StructLayout(LayoutKind.Sequential)]
private struct STATURL
{
public int cbSize;
[MarshalAs(UnmanagedType.LPWStr)]
public string pwcsUrl;
[MarshalAs(UnmanagedType.LPWStr)]
public string pwcsTitle;
public System.Runtime.InteropServices.ComTypes.FILETIME ftLastVisited;
public System.Runtime.InteropServices.ComTypes.FILETIME ftLastUpdated;
public System.Runtime.InteropServices.ComTypes.FILETIME ftExpires;
public uint dwFlags;
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("3C374A42-BAE4-11CF-BF7D-00AA006946EE")]
private interface IEnumSTATURL
{
void Next(int celt, ref STATURL rgelt, out int pceltFetched);
void Skip(int celt);
void Reset();
void Clone(out IEnumSTATURL ppenum);
void SetFilter([MarshalAs(UnmanagedType.LPWStr)] string poszFilter, uint dwFlags);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("3C374A41-BAE4-11CF-BF7D-00AA006946EE")]
private interface IUrlHistoryStg
{
void AddUrl(string pocsUrl, string pocsTitle, uint dwFlags);
void DeleteUrl(string pocsUrl, int dwFlags);
void QueryUrl([MarshalAs(UnmanagedType.LPWStr)] string pocsUrl, uint dwFlags, ref string lpSTATURL);
void BindToObject([In] string pocsUrl, [In] UUID riid, IntPtr ppvOut);
object EnumUrls { [return: MarshalAs(UnmanagedType.IUnknown)] get;}
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("AFA0DC11-C313-11D0-831A-00C04FD5AE38")]
private interface IUrlHistoryStg2 : IUrlHistoryStg
{
new void AddUrl(string pocsUrl, string pocsTitle, uint dwFlags);
new void DeleteUrl(string pocsUrl, int dwFlags);
void QueryUrl([MarshalAs(UnmanagedType.LPWStr)] string pocsUrl, uint dwFlags, ref STATURL lpSTATURL);
new void BindToObject([In] string pocsUrl, [In] UUID riid, IntPtr ppvOut);
new object EnumUrls { [return: MarshalAs(UnmanagedType.IUnknown)] get;}
void AddUrlAndNotify(string pocsUrl, string pocsTitle, int dwFlags, int fWriteHistory, object poctNotify, object punkISFolder);
void ClearHistory();
}
[ComImport]
[Guid("3C374A40-BAE4-11CF-BF7D-00AA006946EE")]
private class UrlHistoryClass { }
public static void ClearHistory()
{
UrlHistoryClass c = new UrlHistoryClass();
((IUrlHistoryStg2)c).ClearHistory();
}
Sorry for the long post.
Hope this helps,
DigitalKing
|
|
|
|
|
Also useful is clearing the RecentDocs list:
using System.Runtime.InteropServices;
...
[DllImport("shell32.dll")]
static extern void SHAddToRecentDocs(ShellAddToRecentDocsFlags flag, IntPtr pidl);
[Flags]
private enum ShellAddToRecentDocsFlags : uint
{
Pidl = 0x001,
Path = 0x002,
}
public static void ClearRecentDocs()
{
SHAddToRecentDocs(ShellAddToRecentDocsFlags.Pidl, IntPtr.Zero);
}
|
|
|
|
|
thanks for the advice, but it seems a bit more advanced than what i can handle right now. maybe this scenario will be a little more simple and get me going in the right direction. say i want to delete a folder or file in any directory i chose, how would i go about that. i read something about a fileinfo.delete method, will this work. also, can you point me to any good texts about file,folder,directory handling in csharp. thanks again
|
|
|
|
|