|
|
Hi,
i have a question about the DataGrid and the DataGridBoolColumn.
Is it possible to disable a CheckBox shown in the DataGridBoolColumn? I get a result of a Database Query. If the Value is true or false the CheckBox should be enabled and the CheckBox is checked correctly, but if the value is NULL the CheckBox ist disabled and checked, i want to get a unchecked and disabled CheckBox in that case.
Thanks for your help!
|
|
|
|
|
AFAK you can't.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I am creating a web service project in C#. It has a file containing classes, used by the web service.
Problem 1. When I type a local variable inside the class, it is not showing intellisense. for example I am typing the code for class B, which has local variable for class A. When I am going to type objA (object for the class A) and then DOT (.), class A's members are not displayed.
Problem 2. Inside the web method, if i make typing mistake; i.e. wrong variable name or missing semi colon at the end; still compilation goes successful, while I see, there are errors.
Anybody has experienced this? I am facing this problem 1st time and feel much difficult to continue coding. Please point me to right direction.
Thank you for your help in advance
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
hi,
problem1: if your local variable is private you cannot access the var from classB by typing new classA().var .. create a property or declare the variable as public. (i guess that could be a problem).
problem2: you might check whether the class you want to compile has the buildsettings compile or some else..
hope i could help
|
|
|
|
|
Thanks for ur reply but it seems u didnt understand my question or may b i could not explain properly. Local variable means variable for instance of class A.
<br />
public class B<br />
{<br />
private A objA;
}<br />
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
Hi,
make sure the following option is set, using menu Tools/Options/ProjectsAndSolutions/BuildAndRun:
"On Run, when build or deployment errors occur" = "Do not launch"
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Dear Luc Pattyn
Thanks for your reply. I tried that but it didnt solve my problem. I am also observing other behaviors also such as , when I right click on any class, I cant see "View class diagram" menu. Hence I cant create diagram.
This only happens in this project while in same Solution, other project is there, which is not mentioning this problem.
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
I solved my problem.
I opened the project file in text editor. I noticed that my all classes in App_code were not added in compile tag, hence compiler was not compiling those classes. That is why errors were not detected and classes were not added in final assembly file (dll). This was the reason class objects were not showing intellisense.
I added manually my classes in compile tag and everything is working fine. Still could not know why those classes were not added in project file (.proj) for compilation.
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
hi,i have build a setup file for my desktop application.i have put my banner on the top.but there is a default text like in welcome screen welcome to <project name=""> setup wizard.it is looking odd.i want to remove it.wht shall i do?plz help me...its urgent....
|
|
|
|
|
Unfortunately the only part of that message that visual studio gives you access to is the Product name.
If you want more control over the installation experience you will have to use a different installer technology such as WIX[^]. I believe WIX projects can now be integrated into Visual Studio via a Visual Studio Addin, though I prefer the integration you get in Sharp Develop which uses WIX as it's default Installer project engine.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
i have 2 crystal reports both of them have different datasource.These reports were working tommorrow but now when i run reports it show errors one report shows"the table could not found" and another report shows "the report need more information". i rebind my reports with database but error is still there i googled my problem but no solution works.plz help if u know its solutions
|
|
|
|
|
haleemasher wrote: .These reports were working tommorrow but now when i run reports it show errors one report shows"the table could not found" and another report shows "the report need more information". i rebind my reports with database but error is still there i googled my problem but no solution works.plz help if u know its solutions
They WERE working TOMORROW ?
Perhaps if you posted some code ? What has changed since 'tomorrow' ? Something must have changed if it worked before and now doesn't. Have you confirmed your datasource is working ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thnx 4 reply.my reports not contain so much code it simply bind a record with a button.
protected void Button1_Click(object sender, EventArgs e)
{
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load("C:\\WebSite1\\CrystalReport2.rpt");
CrystalReportViewer1.ReportSource = cryRpt;
CrystalReportViewer1.RefreshReport();
}
|
|
|
|
|
when i use the multi-thread i have met a problem just like it:
Object obj;
Thread[] mythread = new Thread[dt.Rows.Count];
for (int i=start;i<end;i++)
{
.....................
if (isSameNet == true)
{
//Begin the thread
mythread[i] = new Thread(new ParameterizedThreadStart(gatherOnlineTimeOfSame)); }
else
{
mythread[i] = new Thread(new ParameterizedThreadStart(gatherOnlineTimeOfDiff));
}
mythread[i].Start(obj);
}
...........................
finally
{
DBer.closeConnection(conn);
}
the code is right when it excute by unuse thread.
but when it excute just as up.the programe will excute,but
the result is wrong.during the programe running it will not has
any error.when i debug it,it will stop on the code "DBer.closeConnection(conn);". By the way the function "gatherOnlineTimeOfSame" and "gatherOnlineTimeOfDiff" are both right, i have tested.
their content are about the DB's operation.
Any help will be appreciated!
|
|
|
|
|
I cant make sense of your question. Are you saying that restarting an old thread causes the issue ? Do you have locking code around all your database code ? Do you use transactions to avoid race conditions ?
I assume that start is always 0 and end is always dt.Rows.Count ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thank you Graus.My problem have been solved.
the reason is that sub thread is running too slower
but the main thread is too fast,the sub thread is deal with DB
so the sub thread is excuting but the DB Connection has been closed.
so the problem ..... Now i updated the source it works OK.
Thank you for your help.
|
|
|
|
|
scoket wrote: Now i updated the source it works OK.
"it works" is a necessary condition, not a sufficient one, for a program to be correct.
If your main thread is to close the database, it has to wait for all other threads to finish.
There are a couple of ways to do this, Thread.Join is one of them.
FWIW: Thread.Sleep is not.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
hw can i get the text of node on clicking in treeview?
|
|
|
|
|
I would expect that there's a selection changed event, a selectedItem property, and a Text property on the Node that is the selected item. Is this not so ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hey all, i have a question. I've searched everywhere for the answer and I can't find anything. So here it is. This is a part of the code, which I've copied from somewhere by the way.
<br />
public static bool IsUserPlayingFullscreen()<br />
{<br />
IntPtr hWnd = GetForegroundWindow();<br />
if (hWnd == GetDesktopWindow())<br />
{<br />
Logger.LogMessageToFile("F***");<br />
return false;<br />
}<br />
<br />
RECT rcWindow;<br />
GetWindowRect(hWnd, out rcWindow);<br />
IntPtr hm = MonitorFromRect(ref rcWindow, MONITOR_DEFAULTTONULL);<br />
if (hm == IntPtr.Zero) return false;<br />
MONITORINFO mi = new MONITORINFO();<br />
mi.cbSize = Marshal.SizeOf(typeof(MONITORINFO));<br />
GetMonitorInfo(hm, ref mi);<br />
return EqualRect(ref rcWindow, ref mi.rcMonitor);<br />
}<br />
Anyway, here I'm trying to detect if a full screen application is running. Runs pretty nice in most of the situations, besides one. If the desktop window is active, it is tricked in believing it is a FS App. I thought that this
"if (hWnd == GetDesktopWindow())" would detect if the current active window is the desktop, but it doesn't! Any help? Thanx in advance!
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:23am.
|
|
|
|
|
Thanx for the reply! Although I'm having quite some trouble converting it to C#.
This is where I've reached so far. For some reason it doesn't get by while (hWnd != IntPtr.Zero). As I've checked (hWnd == IntPtr.Zero) is always true.
<br />
public static bool IsFullScreenMode()<br />
{ <br />
int w = GetSystemMetrics(SM_CXSCREEN);<br />
int h = GetSystemMetrics(SM_CYSCREEN);<br />
<br />
IntPtr hWnd = new IntPtr();<br />
<br />
hWnd = FindWindowEx(GetDesktopWindow(), hWnd, null, null);<br />
while (hWnd != IntPtr.Zero)<br />
{<br />
if (GetWindowLong(hWnd, GWL_EXSTYLE) == WS_EX_TOPMOST)<br />
{<br />
RECT rcWindow;<br />
GetWindowRect(hWnd, out rcWindow);<br />
if ((w == (rcWindow.right - rcWindow.left)) && (h == (rcWindow.bottom - rcWindow.top)))<br />
{<br />
return true;<br />
}<br />
}<br />
hWnd = FindWindowEx(GetDesktopWindow(), hWnd, null, null);<br />
}<br />
return false;<br />
}<br />
Would be glad if you could help
|
|
|
|
|
Ok, I figured out that the desktop window is not what I see on the desktop(wallpaper).
So how do I get the wallpaper window handle?
|
|
|
|
|
IntPtr vHandle = FindWindowEx(GetDesktopWindow(), IntPtr.Zero, "Progman", null);
I found it! This is the one! This returns the handle to the Desktop ListView
|
|
|
|