|
I want to develop a win form application for sending and receiving SMSs to and from a mobile phone. I have found great articles but i do not have a modem to test my application. Is there a tool that would work like a virtual modem instead of a real one?
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Please tell us more information about the mobile phone you will use.
Does the mobile phone have a a serial port or USB connection?
General information on GSM/3G AT commandset is available here
http://www.developershome.com/sms/howToUseHyperTerminal.asp[^]
For Serial port operations in C# look up SerialI/O in MSDN
Reg
Joe
|
|
|
|
|
i have made this piece of code, to a checkbox on the header:
wel not realy on the headr, but situated there.
(class ColumnHeader doesn't provide much, like for example: OnpaintEvent.
but i need some help with the special effects.
if you hoover the mouse over the header, the mousehover effect of the header hides the checkbox, bringing it to the background.
i would like to have the checkbox ontop @ all time.
using windows 7.
<code>
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace Listview_Colum_header_checkbox
{
class CCehckBox : CheckBox
{
public CCehckBox()
{
Width = 14;
Height = 14;
}
protected override void OnPaint(PaintEventArgs pevent)
{
Invalidate();
base.OnPaint(pevent);
}
}
class CListViewHeader : ColumnHeader
{
void CListViewHeader()
{
}
}
class CListview : ListView
{
private readonly CCehckBox _cCehckBox = new CCehckBox();
private readonly ColumnHeader _header1 = new ColumnHeader();
private readonly ColumnHeader _header2 = new ColumnHeader();
private readonly ColumnHeader _header3 = new ColumnHeader();
#region PInvoke Declarations
[DllImport("user32")]
private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
#endregion
public CListview()
{
View = View.Details;
_header1 = Columns.Add("Name");
_header1.Width = (Location.X + 5) + 6;
_header1.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
_header1.Name = "CheckBox";
_header1.DisplayIndex = 0;
_header2 = Columns.Add("bah");
_header2.Width = (Width - 20) - 50;
_header3 = Columns.Add("boh");
_header3.Width = 50;
var wijd = _cCehckBox.Width;
var hoog = _cCehckBox.Height;
_cCehckBox.Location = new Point(Location.X+ 5, Location.Y + 5);
}
protected override void OnColumnWidthChanged(ColumnWidthChangedEventArgs e)
{
if(e.ColumnIndex == 0)
{
_header1.Width = (Location.X + 5) + 6;
_cCehckBox.BringToFront();
}
base.OnColumnWidthChanged(e);
}
protected override void OnHandleCreated(EventArgs e)
{
SetParent(_cCehckBox.Handle, Handle);
base.OnHandleCreated(e);
}
}
}
</code>
Bad = knowing 2 much
|
|
|
|
|
Imho, your best bet would be to use a class derived from ColumnHeader [^].
/ravi
|
|
|
|
|
i tried that, but it doesn't look 'ColumnHeader' it provides me the nessesary properties to do this.
Bad = knowing 2 much
|
|
|
|
|
I would like to know how to convert this function from vb.net to c# : "vb.timer ()"
|
|
|
|
|
I don't know a vb.timer function.
I do know .NET offers several Timer classes, and they work equally well in VB.NET and in C#.
Have a look at System.Windows.Forms.Timer (for GUI oriented work) or System.Threading.Timer (for server-oriented stuff).
|
|
|
|
|
Find one of the many dozens of online vb-to-c# converters (using google), and just plug in the code that you want to convert. So easy, a caveman could do it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: So easy, a caveman could do it.
Chicken (Space Jam) said: I resemble that remark!
|
|
|
|
|
how that ?
can you explain about this .
thank.
|
|
|
|
|
Hi. I'm new to C# and mostly programming in general. I have been writing SQL and working with SQL Server as a systems analyst for 13 years so I'm comfortable there plus I've written a little VBA here and there. Otherwise... newbie. Here's my question. I'm creating a C# Winform app in Visual Studio 2008 that I eventually want to distribute to other people for personal use. These other people are not in the same building or on the same network. I've been using SQL Server for the data, but how would I distribute that? I assume that I can't. I obviously don't want to require them to install SQL Express. So how do you create distributable apps for personal consumption? What do you use for the data? Thanks in advance.
|
|
|
|
|
If it is a small application dealing with less amount of data, XML files or MS Access could do. Or else, SQL Express should be installed on those computers.
If all the computers are on internet, you can connect to SQL server over internet also. Check that out.
|
|
|
|
|
d@nish wrote: If it is a small application dealing with less amount of data, XML files or MS Access could do. Or else, SQL Express should be installed on those computers.
If all the computers are on internet, you can connect to SQL server over internet also. Check that out.
Thanks for the quick reply d@nish.
|
|
|
|
|
Welcome.
|
|
|
|
|
If the user has internet then u can keep ur data on server so that they can access this data from internet
|
|
|
|
|
Let's assume, for argument sake, that the user is disconnected from the internet. How could the user enter and save data?
Thanks.
|
|
|
|
|
then u must provide them data on their local machine.....
|
|
|
|
|
I usualy just store data in a DataSet and then you can save it and load it easily using xml binds. It's very easy.
DataSet t = new DataSet();
t.Tables.Add(someTable);
t.WriteXmlSchema("Filename");
t.WriteXml("Filename");
DataSet loaded = new DataSet();
loaded.ReadXmlSchema("Filename");
loaded.ReadXml("Filename");
|
|
|
|
|
Thanks. I will definitely explore that option.
|
|
|
|
|
SQL Server Compact Edition. It's like full blown SQL Server, with some limitations (e.g., 4GB database size limit, can't create stored procedures so you have to do everything with queries). The major advantage is that it gets installed with .Net, so it's already on their computers.
|
|
|
|
|
I was literally just reading about that. I think that's what I'm going to try first since I'm already familiar with the platform. Thanks for the reply.
|
|
|
|
|
Kris,
Before you spend time trying to figure how to get your users to access a local or remote database, take the time to determine if they need to access a database in the first place. Chances are you could easily get by saving your data to XML or a simple binary store using file I/O.
I'm reminded of the saying, "if the only tool you have is a hammer, every problem looks like a nail."
/ravi
|
|
|
|
|
Good morning.
I am trying to populate City and State fields based on a Zip entered and I am getting an Webservice Data at the root level is invalid. Line 1, position 1. error.
The XML return from the webservice is as follows:
<?xml version="1.0" encoding="utf-8" ?>
- <NewDataSet>
- <Table>
<CITY>Portland</CITY>
<STATE>ME</STATE>
<ZIP>04104</ZIP>
<AREA_CODE>207</AREA_CODE>
<TIME_ZONE>E</TIME_ZONE>
</Table> </NewDataSet>
My code is as follows:
private void btnZipWS_Click(object sender, EventArgs e)
{
XmlDocument doc = new XmlDocument();
Bank.net.webservicex.www.USZip ws = new Bank.net.webservicex.www.USZip(); XElement Results = XElement.Parse(ws.GetInfoByZIP (txtZip.Text).ToString());
foreach (XElement xe in Results.Elements("NewDataSet").Elements("Table").Descendants())
{
if (xe.Name == "CITY")
{
txtCity.Text = xe.Value;
}
if (xe.Name == "STATE")
{ txtState.Text = xe.Value;
}
}
}
Is there an issue with the XML being returned? I wasn't sure what the - signs were for.
Thank you, WHEELS
|
|
|
|
|
The most glaring thing is the hyphens before the root tags.
Further, your code should probably look more like this:
XElement element = Results.Elements("NewDataSet").Element("Table");
string city = element.Element("CITY").Value;
string state = element.Element("STATE").Value;
... blah blah
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
The problem I am having now is that th eLoad is looking for a physical XML file on my computer, but it is being called from a Web Service.
XDocument doc = XDocument.Load(ws.GetInfoByZIP(txtZip.Text).ToString());
private void btnZipWS_Click(object sender, EventArgs e)
{
Bank.net.webservicex.www.USZip ws = new Bank.net.webservicex.www.USZip();
XDocument doc = XDocument.Load(ws.GetInfoByZIP(txtZip.Text).ToString());
XElement element = Results.Elements("NewDataSet").Element("Table");
string city = element.Element("CITY").Value;
string state = element.Element("STATE").Value;
WHEELS
|
|
|
|