|
hi there
i have a problem
i've build a project in visual studio 2003, this program can select a row from a datagrid and opens up a new form with the detail data in this form.
i've now instaled visual C# 2005
and i'm rebuilding the application.
but the currenrowindex is not working he has no definition for it is the error he givs me.
i've search in my old project to the definition for this and there is this line of code:
public int CurrentRowIndex { get; set; }
in the DataGrid[from metadata]
and this file is locked can't change it.
but this line of code is in that file.
in my other project he isn't.
and i can't add it cause i can't adjust this file.
can someone tell me how to put this line of code there or maybe some other solution?
|
|
|
|
|
hi i have a problem with browser application, Now i develop a browser form with use of Internet Explorer's componant but the problem was assign the shortcut keys,If Any body know plz help me
regards
ranandbe
|
|
|
|
|
Not really sure what your problem is here, however, shortcuts for the browser component can be turned on/off via the WebBrowserShortcutsEnabled property (default is "True").
Are you trying to assign -new- shortcut keys to perform actions on the browser component? If so, I dont think the browser component itself has any additional features to assist in new shortcut keys; you need to catch the key presses yourself and perform the required custom actions from there.
|
|
|
|
|
Hi
Thank you, My problem is "In IE browsers no need to type full address like protocal,web server and domain's just enter the url name and press Ctrl+Enter then it will auto complete the url and how to maintain history in addressbar " i need this feature in my application.How to solve this problem.
Regards.,
ranandbe
-- modified at 0:56 Thursday 4th May, 2006
|
|
|
|
|
Ah ok... well, same concept applies in that you should catch a Ctrl-Enter (and any other key press combo) and perform the url completion as needed. There are a few articles here on CodeProject that deal with the Url / Url History issues that you may want to check out // http://www.codeproject.com/csharp/ponta.asp[^]
|
|
|
|
|
hi
i want connect to access db that include password but i don't do that because that give an error ..
that it's open exclusive by another app (but access was closed).
how to that ?
please give a source that connect to access db waith password ...
thanks ...
|
|
|
|
|
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?
|
|
|
|