|
plz.. help me. how to host win form appl in web. i read some blogs,first convert win form application to wpf. then host that wpf in iis.
if it's the process how to convert .
|
|
|
|
|
There is no way but to do some recoding.
WPF can be hosted in IIS as an xbap application.
|
|
|
|
|
Help with what exactly? What have you tried, where are you stuck?
Member 10263519 wrote: first convert win form application to wpf. There's no converters for that, would need to be recoded.
Member 10263519 wrote: then host that wpf in iis. ..looking for an easy way to host a winform in a browser?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi friend
I am creating a com interface , It created , but when i am using it with different platform ,interface is not created within that application.
Please help me where i am wrong.
Code is as follow :
using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Text;
using System.Data.SqlClient;
using System.Net;
namespace SMSApp
{
[Guid("694C1820-04B6-4988-928F-FD858B95C880")]
public interface SendSMSInterface
{
[DispId(1)]
void Init(string userid, string password);
[DispId(2)]
bool ExecuteSelectCommand(string selCommand);
[DispId(3)]
bool NextRow();
[DispId(4)]
void ExecuteNonSelectCommand(string insCommand);
[DispId(5)]
string GetColumnData(int pos);
[DispId(6)]
string sendMessage(string user, string password, string customer, string cardno, string MobileNo, string CreditPt, string DebitPt, string balancept);
[DispId(7)]
string sendSmsFirstTime(string user, string password, string customer, string cardno, string MobileNo, string balancept);
}
[Guid("47C976E0-C208-4740-AC42-41212D3C34F0"),
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface DBCOM_Events
{
}
[Guid("9E5E5FB2-219D-4ee7-AB27-E4DBED8E123E"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(DBCOM_Events))]
public class SendSMS : SendSMSInterface
{
private SqlConnection myConnection = null;
SqlDataReader myReader = null;
public SendSMS()
{
}
public void Init(string userid, string password)
{
try
{
string myConnectString = "user id=" + userid + ";password=" + password +
";Database=NorthWind;Server=SKYWALKER;Connect Timeout=30";
myConnection = new SqlConnection(myConnectString);
myConnection.Open();
}
catch (Exception)
{
}
}
public bool ExecuteSelectCommand(string selCommand)
{
if (myReader != null)
myReader.Close();
SqlCommand myCommand = new SqlCommand(selCommand);
myCommand.Connection = myConnection;
myCommand.ExecuteNonQuery();
myReader = myCommand.ExecuteReader();
return true;
}
public bool NextRow()
{
if (!myReader.Read())
{
myReader.Close();
return false;
}
return true;
}
public string GetColumnData(int pos)
{
Object obj = myReader.GetValue(pos);
if (obj == null) return "";
return obj.ToString();
}
public void ExecuteNonSelectCommand(string insCommand)
{
SqlCommand myCommand = new SqlCommand(insCommand, myConnection);
int retRows = myCommand.ExecuteNonQuery();
}
public string sendMessage(string user, string password, string customer, string cardno, string MobileNo, string CreditPt, string DebitPt, string balancept)
{
UnicodeEncoding unicode = new UnicodeEncoding();
string strUrl = "http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=";
string strUr2 = user + ':' + password;
string strUr3 = "&senderID=ETHOSW&receipientno=";
string strUr4 = MobileNo + "&msgtxt=";
string Strur5 = "Dear " + customer + " , thank u for using ur Club Echo card no. " + cardno + " . " + DebitPt + " Pts dr " + "%26 " + CreditPt + " pts cr to ur card. A/c Bal " + balancept + " pts.";
string finalurl = strUrl + strUr2 + strUr3 + strUr4 + Strur5;
WebRequest request = HttpWebRequest.Create(finalurl);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream s = (Stream)response.GetResponseStream();
StreamReader readStream = new StreamReader(s);
string dataString = readStream.ReadToEnd();
string responsemsg = finalurl;
response.Close();
s.Close();
readStream.Close();
return (responsemsg);
}
public string sendSmsFirstTime(string user, string password, string customer, string cardno, string MobileNo, string balancept)
{
UnicodeEncoding unicode = new UnicodeEncoding();
string strUrl = "http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=";
string strUr2 = user + ':' + password;
string strUr3 = "&senderID=ETHOSW&receipientno=";
string strUr4 = MobileNo + "&msgtxt=";
string Strur5 = "Dear " + customer + " , thank u for shopping with us. Your card no. is " + cardno + " . A/c Bal is " + balancept + " points.";
string finalurl = strUrl + strUr2 + strUr3 + strUr4 + Strur5;
WebRequest request = HttpWebRequest.Create(finalurl);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream s = (Stream)response.GetResponseStream();
StreamReader readStream = new StreamReader(s);
string dataString = readStream.ReadToEnd();
string responsemsg = finalurl;
response.Close();
s.Close();
readStream.Close();
return (responsemsg);
}
|
|
|
|
|
Alright, does the code give you any Errors, Exceptions or warnings?
We can't read your mind, neither access your HDD - You need to be specific and tell us error details.
Rakesh_Ranjan_Godrej wrote: I am creating a com interface
No. There is no COM interface in your sample code, and neither are you using the System.IO.Ports namespace which you'd need to access a COM interface.
Edit: My bad - I thought you were talking about Serial COM Ports
modified 19-Nov-13 4:27am.
|
|
|
|
|
Rakesh_Ranjan_Godrej wrote: interface is not created within that application
What do you want to tell us with that? Is it created somewhere else?!
Tell us what errors you experience and the platforms on which you experience the errors - and also: on which platforms does it work as expected?
|
|
|
|
|
I want to create a dll and use it with CAL Coding using automation variable.
|
|
|
|
|
I don't see anywhere that you are marking these as exposed to com (i.e. ComVisible("true") ). Have you done that elsewhere?
|
|
|
|
|
|
Ah, I see. So, it's registering on the build machine but not when it's running on a different machine. I take it that this is the problem you are facing. When you deploy the code, you need to run the regasm command to actually register your COM interfaces - VS does this for you on your build machine, but you need to do this manually when you run it on another machine. Regasm and it's switches are covered here[^].
|
|
|
|
|
Hi, I have a method that use Microsoft.Office.Interop.Excel class to export a DataTable to a .xls file. Everything is ok untill I got a request that the excel need to have some text rows before displaying the data in DataTable, such like following:
TITLE OF THE EXCEL
Label1 Param1
Label2 Param2
COLUMNHEADER1 COLUMNHEADER2 COLUMNHEADER3
.... .... ......
.... .... ......
.... .... ......
I have tried with DataTable.Merge(...) method but it returned with the COLUMNHEADERS AT THE TOP OF THE EXCEL, like this:
COLUMNHEADER1 COLUMNHEADER2 COLUMNHEADER3
TITLE OF THE EXCEL
Label1 Param1
Label2 Param2
.................. .................. ........................
.................. .................. ........................
.................. .................. ........................
Any suggest is appreciated. Thanks in advance.
|
|
|
|
|
Show us the coe you use now. Otherwise we won't be able to find out how to solve that.
|
|
|
|
|
Hi all,
I have previously worked with Andy Beaulieu's Farseer Helper as a physcis engine for a small Silverlight game.
I am now proposing using a similar conept for a basic class in C# that I am involved in. To my surprise, I realised that Silverlight is not developed anymore, and so, the Farseer physics/Farseer helper combo might not make sense anymore.
Basically, I just need something that is really very easy to start with (it's learning C# that should be the focus; developing a game with objects junping around would be just to make things more fun). Physics Helper was great in that you could work in a WYSIWYG environment and then dig into the code to programmatically add more objects or so. So what I am looking for is something along those lines: easy to learn is better than powerful here.
Any thoughts? (I have looked through the C# forum here without result). I have also done seraches on the net but it's hard to judge what kind of game engine would be easy to use and not discontinued.
The game engine should also be free or perhaps shareware, so that the students can use it from home and the institution maybe pay a fee.
Thanks for any hints!
petter
|
|
|
|
|
|
Thanks, but I hesitate, as it's not developed anymore (as Silverlight). Thanks anyway!
...
Actually I took a look at it anyway. It seems very simpleand there are many templates to start out with. Perhaps this can be the winner after all, since the objective is just to get the students hooked on game programming, using OO principles.
modified 19-Nov-13 5:56am.
|
|
|
|
|
I'd skip XNA (also not being actively developed).
This is what I've used to program some simulations: Unity3d[^]
Its scripting is all done in C# (or many other languages), can be ported to IOS, Android, Web, etc without changing code, and the free version is pretty damn good.
|
|
|
|
|
Hi,
Thanks a lot. I have already signed up in the Unity community to see if it is something for my particular situation.
It still might be a bit too much, but I'll download the free version and try it out!
Thanks again.
|
|
|
|
|
If you want to leverage the knowledge that's available in the XNA world, you could always look into MonoGame (it's free, and actively developed). Plus, it works on other platforms as well.
|
|
|
|
|
Thanks, took a look at it. Right now I am considering Unity, but it might be too large.
|
|
|
|
|
I think Farseer was based on Box2d.
And Box2dx is a C# port of Box2d
So that could be the way to go.
Download the demo[^] and run the testbed - it's fun!
The nice thing about Box2d is that it is just the engine - you provide all the graphics - but it does allow an easy debug mode which draws the different physical entities so even the graphically challenged can have fun
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Thanks!
I think that whatever the path I take, I will use a template that the students can build on (adding different kinds of classes for obstacles/enemies and the like)so that they can start coding right away.
I also think that Duality seems interesting, especially with its tight integration with VS. However, it seems like a very small project.
Thanks again!
|
|
|
|
|
I hadn't seen Duality before - looks really interesting! If I ever get back into teaching I will give it a serious look into - so if you investigate I'd really be interested in what you find out.
Unity I don't have much experience with - but I know that it is popular in some schools - but make sure you read the licensing because my understanding (from teachers that use it ) is that is it not free for educational use.
If Duality was cross platform I'd be downloading it now!
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Yeah,
If you take a look at this thread: http://www.fetzenet.de/forum/viewtopic.php?f=17&t=49[^] you will find that this entire concept is interesting and inspiring:
- C# (which is what I need)
- Tight integration with Visual Studio, but "the other way around"
- Not a big environment, so it should be easy to start with.
- Farseer physics is used (which I happen to be used to)
- Good sense of programmer humour!
The only downside as I can see is the small community, which gives doubt about future development. That said, it's active now, and the more people who join, the more chance it's taking off, I guess.
Overall, the developer seems to have made several very clever design decisions, which you can read about in the linked post.
modified 19-Nov-13 18:52pm.
|
|
|
|
|
Wat - as an exclusive LOB developer who has not dipped into game development since the C64 reading the features of Farseer was ... Odd, I have no idea what most of the terms are referencing to. Interesting and if I had enough time to scratch myself I'd be tempted to have a look around
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Then I suggest you take a look at this web site (or his project page on CodeProject): www.andybeaulieu.com/
Andy has created something called "Physics Helper", giving a GUI for the physics engine. Very, very cool! I was actually going to use Physics Helper, Blend, and Silverlight, but as Silverlight is ot supported anymore I neededto investigate anew - hence this thread.
petter
|
|
|
|
|