|
Thanks Hariharan,
But a non-admin user can view the graph for few seconds when the application starts. After that the 'Red Cross' appears...
Regards,
-SIFAR.
|
|
|
|
|
we often create a winform manually(project-->add-->winform),the created winform is template, then we create an instance of this winform with "new" word. Now I want to know how to create a new winform with code and have not template winform of this new winform(that is no need create a template winform by manually first).
|
|
|
|
|
Form form = new Form();
form.Show();
...
|
|
|
|
|
Hi,
there is no magic involved: all that Visual Designer does is put some code in a file called myForm.Desisgner.cs; you can open that file and have a look; then create similar code in your own file (don't edit the designer.cs files, your changes may get lost, and might confuse Visual Designer).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
i waz working on a c# project on windows 7......... when i run or debug the code ...... and if there is a compile time error, it will display the errors...........but after i correct this errors.......there will be a permanent error which says..........."Cant find C:\......\\ProjectName.pdb access denied".....pdb=program debug database.......but this error disappears only if i restart my laptop........ so please help me ppls....which save my time rather than restarting my pc if some error happens....tnx
|
|
|
|
|
Check if the pdb is readonly or do a rebuild it might help
Hariharan.T
|
|
|
|
|
i already cheked it ..... it is not read only...but i will try to rebuild it again....tnx.....by z way wat is z difference betwen....release ...and debug....i realy dont know what release do.....
|
|
|
|
|
This generally happens when you make changes to your code when the application is running in debug mode. Since the code has been modified, VS block access to the pdb file and you get a access denied to the .pdb file.
You have the following solutions to this problem
1. As Hariharan had said, do a Rebuild of the solution. This in most cases clears the lock on the pdb file.
2. Locate the pdb file using the windows explorer and delete it and then try build/rebuild from the VS. If you get file is being used error, check if there are any process that are using this file still running using the task manager / process explorer and kill it and re-try.
3. Do a build/rebuild of the solution in "Release" mode and then do a build in "Debug" mode. Not sure if this would work for C# Win Forms, I've done this only on my Web apps.
|
|
|
|
|
I had this same problem with Windows 7 beta, the problem was intermittent and I'm not sure what was causing it. Do you run Visual Studio as administrator?
The problem seems to have been solved since Windows 7 release candidate.
|
|
|
|
|
u can c z solutions to ma problem....& try zem....as zey said..lol
|
|
|
|
|
I have a simple C# exe. It internally has some calls to custom interop. I dont have any problem in executing it manually by either double clicking the exe or thru command prompt, everything works as expected. But the moment i launch it using windows scheduled task it always fails.
Is this a know problem with interop calls, when an executable runs thru scheduled task? it fails at the point where i make a method call on the interop object. BTW i am using W2K.
Any suggestion/solution?
Thanks in advance....
Hariharan.T
|
|
|
|
|
Maybe this is a security issue? Are you using the same user for the scheduled task, as for the manually execution?
Regards
Sebastian
|
|
|
|
|
Thanks for the reply...
i do use the same user, and its part of the administrator group.
Even i added it to few local security policy settings but didnt help. If you are aware of any security policy related to scheduled taks pls share..
Hariharan.T
|
|
|
|
|
Does your app write a log? This could be helpful to get the problem...
|
|
|
|
|
It has a log but doesnt help much, empty exeption
It doesnt fail where i create the actual COM component in the interop instead it fails when i make call using the interop object. FYI the object is valid and not null
Hariharan.T
|
|
|
|
|
What type of exception do you get? Did you took a look in the system event table?
|
|
|
|
|
Event table doesnt have any error neither in Security nor in System. Just found the exception has been suppressed in the log file. i am in the process of rebuilding it to get the exact exception.
Hariharan.T
|
|
|
|
|
Hi All,
Can u help me how to get current user IP Address for my Intranet Site,
I have tried with below codes but its not working when i place my page in
live server....
i)HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]
this is working locally when i place in server its showing default gateway
for that system
ii)Request.ServerVariables["REMOTE_Host"]
could you plz help me to fix my issue.
|
|
|
|
|
Try these
1. Request.Params["REMOTE_ADDR"]
2. Request.UserHostAddress()
3. Request.ServerVariables("HTTP_X_FORWARDED_FOR")
HTTP_X_FORWARDED_FOR would return an list of IP address if the client is accessing the website though a proxy server / gateway server. In such cases use the below code -
ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR") ;
if (!string.IsNullOrEmpty(ip))
{
string[] ipRange = ip.Split(',');
int le = ipRange.Length - 1;
string trueIP = ipRange[le];
}
|
|
|
|
|
Hi,
maybe this[^] will help you.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
Iam using Ajax collapsible panel in my web page page (C# and Asp.NET),
In Master page iam using Script manager instead of using in every page,
If i use script manager in master page the callapsible panel is not working,
and i checked with anathor scenario by removing the master page and placing
the script manager in my page seperately that's working fine,
can u give any soln to fix my issue by using script manager in master page.
|
|
|
|
|
This question you should post in ASP.NET forum.
What is disadvantage of using ScriptManager in content pages?
I Love T-SQL www.aktualiteti.com
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi,
Thanks for your reply,
if i use script manager in my content page's
Ajax Collapsible panel is not working that is the problem,
I tried by removing master page and added script manager seperately in my
page then it's working fine,
Hope this is clear for you!!
|
|
|
|
|
Hi
I have a grid with any number of rows. Each row has a picturebox drawn next to it.
The pictureboxes have context menu's assigned to them (5 menuitems).
Problem is, selecting an item from the contextmenu makes sender the contextmenu, so I don't know which row's picture box was right-clicked.
My code looks like this at the moment.
Declarations:
private ContextMenu[] mnuLamps;
I have a routine which creates the contextmenus's:
mnuLamps = null;
mnuLamps = new ContextMenu[dsSummary.Tables[0].Rows.Count];
for (int i = 0; i < dsSummary.Tables[0].Rows.Count; i++)
{
mnuLamps[i] = new ContextMenu();
mnuLamps[i].MenuItems.Add(new MenuItem());
mnuLamps[i].MenuItems[0].Text = "Receive";
mnuLamps[i].MenuItems[0].Click += new EventHandler(ReceiveSelected);
...
mnuLamps[i].MenuItems.Add(new MenuItem());
mnuLamps[i].MenuItems[4].Text = "Retract";
mnuLamps[i].MenuItems[4].Click += new EventHandler(RetractSelected);
}
When the pictureboxes are added to the form I have:
for (int i = 0; i < dsSummary.Tables[0].Rows.Count; i++)
{
...
picBox[i].ContextMenu = mnuLamps[i];
...
}
I then have ReceiveSelected, RetractSelected etc as:
private void ReceiveSlecetd(object sender, EventArgs e)
sender is of course menuitem, so I don't know which row it was.
I have thought of using
private void ReceiveSelected(object sender, EventArgs e, int TheRow)
and
mnuLamps[i].MenuItems[0].Click += new EventHandler(ReceiveSelected(mnuLamps[i], EventArgs, [i]);
so that I have access to the row, but I am having trouble doing the EventArgs and I am not sure I can use this code fiddling.
Thanks,
Nigel
|
|
|
|
|
Hi,
as you have separate ContextMenu objects for all the PictureBoxes here are two things you could do:
1.
store the PictureBox reference inside the ContextMenu.Tag
the Tag property can hold any object or value you choose, and isn't used by Windows, .NET or GDI; a lot of Controls have a Tag property, when available it is there for your convenience.
2.
Maintain a Dictionary mapping ContextMenu objects to PictureBox objects.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|