|
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?
|
|
|
|
|
It's in the properties, I think the value you want is 'dropdownlist' . I forget the property name.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I am writing a program in Visual C# Express 2005, and I need to know if it can be done the way I am doing it. Here a my couple concerns:
1.) I have my Windows Forms app and a Windows service compiled into the same EXE. Will that affect my performance in any way? Or render anything unusable? At this point, the service appears in the Services console (services.msc) but I am unable to Start it.
2.) I need to install this service on multiple computers on my domain.... at runtime of my main form. Is there any way I can do this? Or would I have to install the service over the network ina script? My account is administrator of the other computers, so I should be able to do this, I think.
3.) If anyone knows of any easier way to run a couple of DOS commands on a large group of remote computers, rather than a Windows Service, could you tell me? I'd be much obliged.
Thanks to any who can answer any of these questions for me. I know it's a pain, so thanks.
-MartyExodus
|
|
|
|
|
MartyExodus wrote: I have my Windows Forms app and a Windows service compiled into the same EXE
Why? It's not that hard to separate them into different projects.
MartyExodus wrote: If anyone knows of any easier way to run a couple of DOS commands on a large group of remote computers
You will definitely have to have an NT service on each computer. And you should definitely have to install the service on each computer by script. The script's not that hard, just installutil. But you say DOS commands almost like you're using System.Diagnostics.Process[^] to run stuff from the command prompt. In that case, why not just write a quick VBScript and run it on each computer?
|
|
|
|
|
hi..I have one problem..
I have runnig server and client conected to this server..is there any way how server can get public client's ip?
tcp connection, win32 app, C# .NET2.0..
thanks for ideas..;)
|
|
|
|