|
Example:
panel.Location = new Point(5, 5);
|
|
|
|
|
thank you
|
|
|
|
|
I have 2 forms:
1- Main form viewing a datagrid of different values of database X
2- A secondary form used for adding new data into database X
When any data is entered in Form2 and Form2 is closed; it's needed to update datagrid with new values in Form1. But it doesn't update quickly, a 3-4 second late. Using Access database, I've found a nasty dirty solution : Having a timer and updating datagrid periodically. Is this a problem about Access slow query time or any problem about forms or etc? Any idea ???
|
|
|
|
|
Hi, I'm working on an open source IDE that has a built-in syntax highlighter.
Right now, whenever I want to remove text from the RichTextBox, I have to do this:
<br />
RTB.Text = RTB.Text.Remove(CharacterIndex, RemoveAmount);<br />
The problem is that changing RTB.Text erases all the Rich Text Format information generated by the syntax highlighter.
So my question is, how do I remove text from the textbox without resetting the RTF data?
|
|
|
|
|
It does work!
Just pay attention to any ArgumentOutOfRangeException that is thrown when either your CharacterIndex or your RemoveAmount is less than zero.
SkyWalker
|
|
|
|
|
Hi,
I'm a intermediate java programmer and i just started learning C#.I would like to write an application that takes a txt file and send it to a fax machine. What is the best way I can do this? Thanks in advance ,any help would be gladly appreciated
|
|
|
|
|
wrote: I'm a intermediate java programmer and i just started learning C#
As a former Java developer myself, welcome to the wonderful world of C#.
Regarding your question, have you looked at any of the articles on this site? This article[^], for example, talks about how to fax an image. It shouldn't be too hard to figure out from there.
Also note that all file-related APIs are nice and organized in System.IO namespace (a "namespace" is like Java's "package"). For example, to read all text from a file, you can simply go System.IO.File.ReadAllText("theFile.txt");
|
|
|
|
|
thanks for the quick reply Judah, I will take a look into that article.
|
|
|
|
|
I get the following error when I try to send the fax.
com object with clsid{d73733c8-cc80-11d0-b225-00c04fb6c2f5} is either not valid or not registered
How do I reference to the faxcom lib?
|
|
|
|
|
Eddy, sounds like you'll need the FaxCom faxing object installed. (At least, that article uses that component.)
Does this post[^] help?
|
|
|
|
|
Thanks a lot Judah you are very helpful.
|
|
|
|
|
GEt a driver that faxes printed documents, and send it to the printer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I'm trying to get some custom control on my MasterPage to happen on the click event on my menu control based on a SiteMap. It's never hitting the MenuItemClick code. Any ideas?
In master page:
<asp:label id="lblTest" runat="server" text="Test">
<asp:sitemapdatasource id="ExampleSiteMapDS" runat="server" showstartingnode="false" sitemapprovider="mySiteMapProvider">
<asp:menu id="Menu2" runat="server" datasourceid="ExampleSiteMapDS" onmenuitemclick="Menu2_MenuItemClick">
In master page cs:
protected void Menu2_MenuItemClick(Object sender, MenuEventArgs e)
{
lblTest.Text = e.Item.ValuePath;
}
Thanks, Jessica
|
|
|
|
|
I'm trying to get some custom control on my MasterPage to happen on the click event on my menu control based on a SiteMap. It's never hitting the MenuItemClick code. Any ideas?
In master page:
<asp:Label ID="lblTest" runat="server" Text="Test"></asp:Label>
<asp:SiteMapDataSource ID="ExampleSiteMapDS" runat="server" ShowStartingNode="false" SiteMapProvider="mySiteMapProvider" />
<asp:Menu ID="Menu2" runat="server" DataSourceID="ExampleSiteMapDS" OnMenuItemClick="Menu2_MenuItemClick" />
In master page cs:
protected void Menu2_MenuItemClick(Object sender, MenuEventArgs e)
{
lblTest.Text = e.Item.ValuePath;
}
Thanks, Jessica
|
|
|
|
|
|
"the page"?? The master page? If the menu items are on the page (I don't use a SiteMap), the page fires the click event. But I have to use a SiteMap.
Thanks, Jessica
|
|
|
|
|
Sorry, I should have been more clear. Each page needs to know the event exists on the master page.
|
|
|
|
|
Try this:
Click Edit MenuItem Databindings.
In the Menu DataBindings Editor, in the Available data bindings drop-down list, select SiteMapNode and click Add.
Select TextField in the Data binding properties drop-down list and select Title from the drop-down menu. Click OK.
Select the SiteMapDataSource control.
In Properties, set ShowStartingNode to False.
|
|
|
|
|
Thanks. That worked. It modified my aspx menu control by adding the databindings section.
<asp:menu id="Menu2" runat="server" datasourceid="ExampleSiteMapDS" onmenuitemclick="Menu2_MenuItemClick">
<databindings>
<asp:menuitembinding datamember="SiteMapNode" textfield="Title">
Thanks, Jessica
|
|
|
|
|
Thanks. That worked. It modified my aspx menu control by adding the databindings section.
<asp:Menu ID="Menu2" runat="server" DataSourceID="ExampleSiteMapDS" OnMenuItemClick="Menu2_MenuItemClick" >
<DataBindings>
<asp:MenuItemBinding DataMember="SiteMapNode" TextField="Title" />
</DataBindings>
</asp:Menu>
Thanks, Jessica
|
|
|
|
|
Well the event fires but the redirect doesn't happen. Not much progress.
Thanks, Jessica
|
|
|
|
|
(repost with code)
Thanks. That worked. It modified my aspx menu control by adding the databindings section.
<asp:Menu ID="Menu2" runat="server" DataSourceID="ExampleSiteMapDS" OnMenuItemClick="Menu2_MenuItemClick" >
<DataBindings>
<asp:MenuItemBinding DataMember="SiteMapNode" TextField="Title" />
</DataBindings>
</asp:Menu>
Thanks, Jessica
|
|
|
|
|
I am new to dotNet so sorry if this is basic question. How do I force uppercase in a combo box. I see characterCasing for text box but do not see anything similar for a combo box.
Also I have a datasource assigned to the combo box. If the user types a value in how do I ensure it is a value in my datasource?
TIA
|
|
|
|
|
A combo box has a text box inside it, if you can find it, you can set that. It was easy in C++, not sure about C#.
oracleConvert wrote: If the user types a value in how do I ensure it is a value in my datasource?
You can't, you need to set it to not allow typing at all, just to select from the list. That's how the control works.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
what setting do you use to not allow the user to enter data directly in the combo box?
|
|
|
|