|
LOL!!!
Hey, have some mercy, I'm new at programming
Thanks for the information. I think that will be what I need.
BP
|
|
|
|
|
BlitzPackage wrote: LOL!!!
BlitzPackage wrote: Thanks for the information. I think that will be what I need.
Sure. Like Paul said I think you will find it very easy to work with. Of course the complexity of the Object Models are still there but they provide all the conversions into .NET types for you so it's pretty sweet.
led mike
|
|
|
|
|
Hi, i got a LCD screen similar to this http://opencube.com.sg/lcd.jpg[^]
which is connected to the computer using usb. How do i write a program in c# to display a message to the LCD
|
|
|
|
|
You need to consult the documentation / data sheet from the manufacturer.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
can i use socket to somehow connect to that port?
|
|
|
|
|
You might want to read up on how to use USB ports and C#. Sure there are plenty of good reading materials out there on the subject.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Unfortunatly you cant ... sockets are realted to networking ... what you are looking for is Serial Ports, specificly USB, you can find materials regarding Serials Ports and using them ... surly you will find something about USB in specific ... and dont forget to read the manufacturer sheet as well...
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
DaveyM69 wrote: You need to consult the documentation
Oh no, the dreaded "read the documentation" reply. Better duck.
led mike
|
|
|
|
|
lol
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Did it come with any sort of documentation?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
benjamin yap wrote: http://opencube.com.sg/lcd.jpg[^]
wheeee!
<br />
Redirect Loop<br />
<br />
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.<br />
<br />
The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.<br />
<br />
* Have you disabled or blocked cookies required by this site?<br />
* NOTE: If accepting the site's cookies does not resolve the problem, it is likely a server configuration issue and not your computer.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
I did some TAPI development 6-7 years ago with C++ using some open source libraries at a previous company. These were simple applications for an in-house project. I am now being asked to recommend commercial libraries for developing a C# solution using TAPI.
Unfortunately I have very little information at this time what the applications will be, so I am looking for broad support for managed code development of telephony and conferencing solutions development. I am familiar with most of the buzz words, but my experience was with simple applications. It seems that development of a managed code solution is mandated, whether I suggest it or not, so I am looking for a rock-solid shim between a managed application and the various Windows APIs.
Any advice is appreciated.
.............................
Two words you don't ever want to hear.
"Fix bayonets"
US Marine Corps
When the pin is pulled, Mr. Grenade is not our friend.
|
|
|
|
|
Robert M Greene wrote: so I am looking for a rock-solid shim between a managed application and the various Windows APIs.
Robert M Greene wrote: I did some TAPI development 6-7 years ago with C++
Do you know about C++/CLI? You can create managed applications/assemblies that also can use native code.
led mike
|
|
|
|
|
Yes, I did some development with the 2003 version, back when the C++/CLI syntax was a little odd. Management wants C# solutions, so that's where I am right now.
I have Googled some of the commercial libraries out there but have no real world experience with them....
.............................
Two words you don't ever want to hear.
"Fix bayonets"
US Marine Corps
When the pin is pulled, Mr. Grenade is not our friend.
|
|
|
|
|
I'm writing a Component for some of our Windows Forms applications. This component has a collection property exposed, and the collection is of a simple type with two members; one is a Control reference, the other is a reference to an abstract base class type. Now, in the designer, I want the developer to be able to choose from the available classes that derive from that abstract base class, and I would like the selected class's instance to have all its properties visible in the designer (as an expandable object.) Does anyone with Component/designer experience have any ideas for me?
|
|
|
|
|
Adam Maras wrote: Does anyone with Component/designer experience have any ideas for me?
There are several good MSDN articles introducing adding Designer support to your custom controls
This one might be a good place to start[^]
With each platform version there are some changes but much of the basics are the same or at least similar. My experiences are through VS2005 so .NET 2
led mike
|
|
|
|
|
Hi All,
I am working on a Win App. which is sending the active desktop window screen shot to Server.
I am using TCPClient to send the data and TcpListener as Server. I am having problem in seding the data to server. I searched a lot but failed.
Can any body help me in this metter.
Thanking you in anticipation.
waiting for reply.
Regards,
Xprt
|
|
|
|
|
Xprt_Loard wrote: I am having problem
Can you share any details?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
//Client side
TcpClient objTCPClient;
objTCPClient = new TcpClient("192.168.1.66", 8080);
NetworkStream networkStream = objTCPClient.GetStream();
Socket objSocket = objTCPClient.Client;
System.IO.StreamWriter streamwrite = new System.IO.StreamWriter(networkStream);
bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
gfxScreenshot = Graphics.FromImage(bmpScreenshot);
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
bmpScreenshot.Save(@"C:\dump.png", ImageFormat.Png);
Image objImg = Image.FromFile(@"C:\dump.png");
byte[] imageContent = null;
imageContent = ReadBitmap2ByteArray(objImg);
int size = imageContent.Length;
StreamWriter wr = new StreamWriter(networkStream);
wr.AutoFlush = true;
wr.WriteLine(size.ToString());
wr.Write(imageContent);
wr.Close();
imageContent = null;
objImg.Dispose();
// Server Side
TcpListener listener = new TcpListener(IPAddress.Parse("192.168.1.66"), 8080);
listener.Start();
Stream stream;
while (true)
{
Socket sock = listener.AcceptSocket();
if (sock.Connected)
{
MessageBox.Show("Client connected");
NetworkStream networkStream = new NetworkStream(sock);
string stringData = null;
int recv = 0;
byte[] data = new byte[1024];
MemoryStream streamImage = null;
recv = sock.Receive(data, 0, data.Length, SocketFlags.None);
stringData = Encoding.ASCII.GetString(data, 0, recv);
data = new byte[Convert.ToInt32(stringData)];
recv = sock.Receive(data);
streamImage = new MemoryStream(data, true);
streamImage.Write(data, 0, recv);
picImage.Image = Image.FromStream(streamImage);
//streamImage.Flush();
//streamImage.Close();
byte[] bytes = new byte[sock.ReceiveBufferSize];
int i;
if (networkStream.CanRead)
{
networkStream.Read(bytes, 0, bytes.Length);
Image image = byteArrayToImage(bytes);
image.Save(@"C:\Imr_From_Client.png");
}
else
{
sock.Close();
networkStream.Close();
}
}
}
This is all i am doing, but this code is not working. plz help me out.
|
|
|
|
|
Your server code doesn't read the data the way it is sent by the
client.
You used a StreamWriter on the client end - why not use a
StreamReader on the server end? Regardless, you'll need to
parse the stream exactly the way it was sent. You receive
1024 bytes then try to receive the entire image, part of
which was already received in the first 1024 bytes - that's
not going to work. This is all assuming your Encoding.ASCII.GetString()
call works the way you expect, which I don't think does.
Also, is there a reason the client writes the Bitmap to disk
then reads it back as an Image? A Bitmap IS an Image (Bitmap
derives from Image).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
you can do so ... but you need to know how the sockets are working ... and which implementation of you should use (Asyncrounous or Syncronous) ... eventually you will implement your own mechanism of file transfering as I have done before ... actually its kindda fun working with sockets
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
Hi!
Can you plz send me the code, which worked for you. what ever the way was addapted. It be a great help for me. Thanking you in advance.
Regards,
|
|
|
|
|
Hi,
I have a windows form with its Background Image property set to a .jpg which is in the Resources folder.
I want to be able to change the Background Image from the App.Config file.
I've set the properties needed in the App.Config file, and I've written a bit of code in the Form Load event, which points to the correct jpg. However, when I change the image in the config file, the form still loads the original image. Is there something I should be putting into the Form Load event to load the new jpg? I've tried refresh, but that doesn't work, the code I'm using is as follows:
private void FormDisplay_Load(object sender, EventArgs e)
{
try
{
........
CustomerDisplay.Properties.Settings mySettings = new CustomerDisplay.Properties.Settings();
Image Img = Image.FromFile(mySettings.BackgroundImage);
anyone have any ideas?
Thanks,
RB
|
|
|
|
|
Assume you have a resource folder with different possible background images, and your configuration file contains a user setting BackgroundImageFile which is of type string . The setting is to hold the filepath (e.g. \Resources\picture.jpg) of the actually desired background image. Then either you use property binding (see MSDN), or you bind the image yourself in the Load-Event-Handler:
private void Form1_Load(object sender, EventArgs e)
{
try
{
this.BackgroundImage = Image.FromFile(Properties.Settings.Default.BackgroundImageFile);
}
catch (Exception ex)
{
}
}
You don't need to instantiate a new object of the settings class unless you implemented your own.
|
|
|
|
|
I am programming in C# using Visual Studio 2008 on Windows XP.
I have a TTS application that is working fine using the SpVoice class (from SpeechLib) to speak text. However, I only have a few voices to choose from... Microsoft Mike, Sam, and Mary. That's all I have access to, and I really need a few more voices. So, I have two basic questions:
1) Where can I get additional voices to use in my app? I want something like the three listed above, which seem to work no matter what the word is.
2) Is there a way for me to create new voices that I can use, complete voices like Microsoft Sam and family?
|
|
|
|