|
Hi Alexey,
Thanks for your reply.
I'm really not sure what you mean? Item_search is the name of the page with .cs and .aspx files. The method requires a page to be supplied but i dont know how?? Any othewr pointers as im still new to C# and .Net
Cheers,
R
acsc
|
|
|
|
|
Hi i have a problem with hiding the mouse pointer from screen because i have working with picture show application ,coding with c# ,any body know please give me a soltion my problem.
regards.,
ranandbe
|
|
|
|
|
Try
<br />
Cursor.Hide();<br />
And please delete another post
Best regards, Alexey.
|
|
|
|
|
Thank you for your advice i will try that code
|
|
|
|
|
Hi,
I'm writing an application in c#.net, in which i've created array of control Button. I want to display a menu when user clicks any of the buttons in the array.
I was able to create context menu for a single button, but not for the array, as coded below ...
<br />
<br />
public class ButtonArray : System.Collections.CollectionBase<br />
{<br />
private readonly System.Windows.Forms.Form ContainerControl;<br />
public ButtonArray(System.Windows.Forms.Form Cont)<br />
{<br />
ContainerControl = Cont;<br />
}<br />
public void AddButton()<br />
{<br />
btButton.MouseDown += new MouseEventHandler(btButton_MouseDown); <br />
}<br />
public void btButton_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
contextMenuStudInfo = new System.Windows.Forms.ContextMenu();<br />
<br />
System.Windows.Forms.MenuItem menuItem1;<br />
menuItem1 = new System.Windows.Forms.MenuItem();<br />
System.Windows.Forms.MenuItem menuItem2;<br />
menuItem2 = new System.Windows.Forms.MenuItem();<br />
contextMenuStudInfo.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { menuItem1, menuItem2 });<br />
<br />
menuItem1.Index = 0;<br />
menuItem1.Text = "Mark Present";<br />
menuItem2.Index = 1;<br />
menuItem2.Text = "Mark Absent";<br />
<br />
this.btButton.ContextMenu = contextMenuStudInfo;<br />
}<br />
} <br />
how to attach the context menu to each member of button control array?
Thanks,
Kranti
-- modified at 5:31 Wednesday 3rd May, 2006
|
|
|
|
|
When the Handle of the control of another application is known,
I can get Font object of a win32 control of another application(Different process) by SendMessage(hwnd,WM_GETFONT....) & Graphics class.
But when the target control is a WinForm control(.Net control) of another application, I can't get the HFont from SendMessage(hwnd,WM_GETFONT).
So, I guess the font is not stored in the Device Context(HDC) for a winForm control. Am I Right?
Then How Can I get the Font from that winForm control?
The purpose to do so is that I want to measure the string size of controls in other applications.
Anyone has idea?
Thanks a lot!
|
|
|
|
|
Try to spy font messages with "Spy++" from "Visual studio tools".
You'll find "what to send".
You also can see control class name with help of Spy++.
Best regards, Alexey.
|
|
|
|
|
Thanks Alexey!
I use SPY++, but actually I want to get font in my program.
Any one has other ideas?
|
|
|
|
|
Hi ,
I want to hide a file after creating it in C# by using File class and also to hide it .After creating it using File class's create method when I use File class's set attribute and set the attribute of file to hidden and readonly ,only readonly is getting set but the file is not getting hidden.What to do?
|
|
|
|
|
Prashant Gadhave wrote: What to do?
Start by showing the code you are using to change the attributes as that is likely to be where you have made the mistake.
Im guessing you've tried to set each attribute separately, not realising that it is a bitmask value - thus overwriting the hidden attribute with readonly.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
What J4amieC said is probably exactly what's happening...
If you want to set it all in one shot you can use:
File.SetAttributes(@"C:\test.txt", FileAttributes.Hidden | FileAttributes.ReadOnly);
If you want to add another attribute onto a file you need to add to the "existing" attributes, for example:
FileAttributes attr = File.GetAttributes(@"C:\test.txt");
File.SetAttributes(@"C:\test.txt", attr |= FileAttributes.Hidden);
Hope that helps..
|
|
|
|
|
Hi,
I've managed to call the resources for my exe with no problem.
This exe calls a dll with it's own resources and here I get the following error when I call the GetString("Resourcekey") method:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DivRrn.Resources.resources" was correctly embedded or linked into assembly "DivRrn" at compile time, or that all the satellite assemblies required are loadable and fully signed.
I've checked and double checked, but I can't find my error:
Here's the code:
<br />
private void LoadLanguage(string language) {<br />
string langcode = "en-US";<br />
language = language.ToUpper();<br />
switch(language) {<br />
case "DUTCH":<br />
case "NEDERLANDS":<br />
case "NEERLANDAIS":<br />
case "NE": langcode = "nl-BE";<br />
break;<br />
case "FRANS":<br />
case "FRENCH":<br />
case "FRANCAIS":<br />
case "FR": langcode = "fr-FR";<br />
break;<br />
case "ENGLISH":<br />
case "ENGELS":<br />
case "ANGLAIS":<br />
case "EN": langcode = "en-US";<br />
break;<br />
default: langcode = "en-US";<br />
break;<br />
}
resourcemanager = new ResourceManager("DivRrn.Resources", Assembly.GetExecutingAssembly());<br />
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(langcode);<br />
}
and the error I get in this part:
<br />
<br />
private void LoadLabels() {<br />
gb_identity.Text = resourcemanager.GetString("gb_identity.Text");
lbl_regnrintl.Text = resourcemanager.GetString("lbl_regnrintl.Text");<br />
lbl_idcardnr.Text = resourcemanager.GetString("lbl_idcardnr.Text");<br />
lbl_state.Text = resourcemanager.GetString("lbl_state.Text");<br />
}
Can anybody help me?
tnx!
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
Place the code within a Try/Catch block and see what Exception is thrown. That should be the first thing you do to track down this error...
The three exceptions you are looking for are:
ArgumentNullException
The name parameter is a null reference (Nothing in Visual Basic).
InvalidOperationException
The value of the specified resource is not a string.
MissingManifestResourceException
No usable set of resources has been found, and there are no neutral culture resources (this may be your problem)
|
|
|
|
|
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DivRrn.Resources.resources" was correctly embedded or linked into assembly "DivRrn" at compile time, or that all the satellite assemblies required are loadable and fully signed.
this was the error I got from the try/catch block.
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
|
tnx for the reply, but it didn't help.
The first site spoke of the default namespace, which doens't count in my case, because I've already set it like they say.
The second site I can't reach because my company blocks it.
tnx for the effort.
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
How can I find out in my program (in code) what account used for running the ASP.NET worker process (aspnet_wp.exe)? ASPNET or NETWORK SERVICE?
|
|
|
|
|
Hi
I M Naveed.I M facing the problem using Cystal Report with C# that when i load report one new form open that required DataBase login and password while running same report in Crystal Report it does not required that confirmation
plz if any body can help me
Regards
Naveed
-- modified at 6:12 Wednesday 3rd May, 2006
|
|
|
|
|
Hi,
How to solve this problem?I get
The likeliest problem is that required components are not installed onthe local web server.
Run Visual Studio .NET setup and add the Web Development component.
I run setup and I see that Web Development is active and I install IIS
and run aspnet_regiis /i but it doesnt work.
Please help me
Thanks in advance
|
|
|
|
|
What problem? Noone can help you unless you tell what problem it is that you are having.
---
b { font-weight: normal; }
|
|
|
|
|
|
Assuming you have the web components of Visual Studio .NET installed, the following steps are all that is needed to get the TreeMenuSample code up and running (assuming you're attempting this on an XP workstation):
1. Download and extract the TreeMenuSample demo project
2. Place the TreeMenuSample directory in the C:\Inetpub\wwwroot directory
3. Open IIS and under "Default Web Site" find the TreeMenuSample directory, right-click and select "Properties"
4. On the "Directory" tab, under "Application Settings" click the "Create" button
5. Click "Ok"
6. Open the solution in VS.NET and right-click the WebForm1.aspx and select "Set As Start Page"
7. Hit F5 (Debug) or Ctrl-F5 (Run w/out Debug) to start up the demo
When you follow these steps to get the code up and running at which stage does it fail? Or are you able to make it work by following the above? Do you have FrontPage server extensions installed and configured for IIS?
~Travis
|
|
|
|
|
Hi Travis D. Mathison
I tested your answer but I get previous error?
The likeliest problem is that required components are not installed onthe local web server.
Run Visual Studio .NET setup and add the Web Development component.
|
|
|
|
|
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?
|
|
|
|