|
This might help
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=adminpassword;"
or goto http://www.connectionstrings.com/ for details
Shajeel
|
|
|
|
|
how to put compobox/other controls into datagrid if u can help to code <for windows="" application="">
urgent
Amal
-- modified at 8:28 Wednesday 3rd May, 2006
|
|
|
|
|
use template column in datagrid and in that template column you can use any control like combo or text box or radio button or check box etc.
|
|
|
|
|
Hi all,
I converted some VB code to C# for the purpose of setting a default button for a text box. The method has no reported errors but when i try and call the method i get the following error:
'Item_search' is a 'type' but is used like a 'variable'
I've tried calling the method in the following ways:
//Item_search is the name of the page (Item_search.aspx)
1: DefaultButton(Item_search, tb_item_description, btn_search);
2: Item_search page = new Item_search();
DefaultButton(page, tb_item_description, btn_search);
//Method for default button
public void DefaultButton( ref System.Web.UI.Page Page, ref TextBox objTextControl, ref Button objDefaultButton)
{
...................
}
Any help would be great
|
|
|
|
|
Use a reference to the current page as the first parameter.
---
b { font-weight: normal; }
|
|
|
|
|
Hey,
I'm trying calling the method from the same page as its setting focus for. Would it be possible for you to provide an example of what you mean?
public void DefaultButton( ref TextBox objTextControl, ref Button objDefaultButton)
{
.......
}
This is what I'm trying:
DefaultButton(Item_search / "Item_search.aspx" / creating an instance of Item_search and calling that
, ref tb_item_description, ref btn_search);
But get no love from any of them. Please help This is doing my head in!
acsc
|
|
|
|
|
DefaultButton(this, ref tb_item_description, ref btn_search);
---
b { font-weight: normal; }
|
|
|
|
|
I have a network where I have Internet facility through LAN. Can I connect to a dominos server (Lotus notes server) from any machine in this network through MS Outlook? I don't have lotus notes client.
Thanks,
Roy
|
|
|
|
|
if the Domino server expose pop3 and smtp you can configure outlook. You can test it with a telnet on port 25 and check if there are response by domino esmtp .
|
|
|
|
|
Hi all,
I converted some VB code to C# for the purpose of setting a default button for a text box. The method has no reported errors but when i try and call the method i get the following error:
'Item_search' is a 'type' but is used like a 'variable'
I've tried calling the method in the following ways:
//Item_search is the name of the page (Item_search.aspx)
1: DefaultButton(Item_search, tb_item_description, btn_search);
2: Item_search page = new Item_search();
DefaultButton(page, tb_item_description, btn_search);
//Method for default button
public void DefaultButton( ref System.Web.UI.Page Page, ref TextBox objTextControl, ref Button objDefaultButton)
{
System.Text.StringBuilder sScript = new System.Text.StringBuilder();
sScript.Append("" );
sScript.Append("function fnTrapKD(btn){");
sScript.Append(" if (document.all){");
sScript.Append(" if (event.keyCode == 13)");
sScript.Append(" { ");
sScript.Append(" event.returnValue=false;");
sScript.Append(" event.cancel = true;");
sScript.Append(" btn.click();");
sScript.Append(" } ");
sScript.Append(" } ");
sScript.Append("}");
sScript.Append("");
objTextControl.Attributes.Add("onkeydown", "fnTrapKD(document.all." + objDefaultButton.ClientID + ")");
Page.RegisterStartupScript("ForceDefaultToScript", sScript.ToString());
}
Any help would be great
|
|
|
|
|
You must rename the page with name "Item_search" in "1:" because it's name of type.
Best regards, Alexey.
|
|
|
|
|
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>
|
|
|
|