|
hi all
i need to use the brwser dialoge and chosse by fillter the picture.jpg or file type .txt and then use the picture to set it in picture control .Net
thanks all hellp me
Thaer
|
|
|
|
|
Hi , hope this useful
<br />
OpenFileDialog OpenFile = new OpenFileDialog();<br />
OpenFile.Multiselect = false;<br />
OpenFile.Filter = "All Images Files|*.bmp;*.gif;*.jpg;*.jpeg;*.png;*.tiff"; <br />
DialogResult OpenF = OpenFile.ShowDialog ();<br />
if (OpenF == DialogResult.Cancel )<br />
return;<br />
<br />
try<br />
{<br />
Picture1.Image = Image.FromFile (OpenFile.FileName);<br />
}<br />
catch<br />
{<br />
MessageBox.Show ("Invaild Picture");<br />
}
I know nothing , I know nothing
|
|
|
|
|
HI,
I like to know if and How can i Add an Image on The DataGridViewButtonColumn
(Not With The DataGridView_cellPainting Event)
THANKS
Have Fun
Never forget it
|
|
|
|
|
Hello,
I have a statefull java web service and I need to access it from c# application, I created a client in c# but it doesn't maintain session, so that subsequent calls create new sessions, how to access this service and maintain session?
thanks
|
|
|
|
|
Hi there
I'm trying to create a timeserver and would like you to take a look at the listening method I have because I'm not sure it's as good as it could be.
Does this look ok to you?
<br />
public void StartToListen()<br />
{<br />
try<br />
{<br />
timeServer = new TcpListener(System.Net.IPAddress.Any, listenPort);<br />
timeServer.Start();<br />
<br />
while (true)<br />
{<br />
connection = timeServer.AcceptSocket();<br />
<br />
socketStream = new NetworkStream(connection);<br />
<br />
reader = new BinaryReader(socketStream);<br />
writer = new BinaryWriter(socketStream);<br />
<br />
switch (listenPort)<br />
{<br />
case 13:<br />
writer.Write(GetDayTimeProtocol());<br />
break;<br />
case 37:<br />
writer.Write(GetTimeProtocol());<br />
break;<br />
}<br />
<br />
writer.Close();<br />
reader.Close();<br />
socketStream.Close();<br />
connection.Close();<br />
<br />
RaiseConnectionEvent(13);<br />
}<br />
}<br />
catch (Exception error)<br />
{<br />
RaiseError(error);<br />
StartToListen();<br />
}<br />
<br />
timeServer.Stop();<br />
}<br />
<br />
|
|
|
|
|
This looks just fine to me. Have you tried it out?
You can test the server by running it on your own machine,
and then using Telnet to connect to the server:
Start -> Run... -> Type: telnet localhost [port number]
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Yes it works fine, I just wasn't sure about the closing and stopping parts of the method
|
|
|
|
|
Greetings for all,
I have a problem with connecting to a BXR-5000 router through Telnet using C#. I used the following code to connect successfully to Cisco routers without any problem:
--------------------------------------------------------------------------------------------
IPEndPoint remoteEP = new IPEndPoint(IPAddress.Parse(ipAddress), port);
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.Connect(remoteEP);
NetworkStream stream = new NetworkStream(socket);
StreamReader reader = new StreamReader(stream);
StreamWriter writer = new StreamWriter(stream);
Console.WriteLine(writer.read().ToString());
Console.WriteLine(writer.read().ToString());
Console.WriteLine(writer.read().ToString());
Console.WriteLine(writer.read().ToString());
--------------------------------------------------------------------------------------------
But, when connecting to a BXR router, the character ‘%’ is returned and I can not read or write any thing.
Could you please help me. I am about to finish my project but this problem stoped me and I do not know how to deal with.
Thanks in deep...
Menhal
|
|
|
|
|
may you show telnet screen of your connection to BXR-5000 ?
|
|
|
|
|
Here is what you asked for:
http://www.2shared.com/download/2461789/a450daf4/1_online.GIF?tsid=20071104-234241-13ded5b3
http://www.2shared.com/download/2461798/ca4cdb23/2_online.GIF?tsid=20071104-234811-3de5a56d
http://www.2shared.com/download/2461800/1e09af65/3_online.GIF?tsid=20071104-234912-843fd538
Thanks...
|
|
|
|
|
The quality is bad, so I do not see anything from links,
try do experiments with \n && \r\n
|
|
|
|
|
Sorry for links.
It is just returning the number 37 that corresponds to '%'.
|
|
|
|
|
if you have software witch can communicate with your device (via telnet or http)
you can get all sended and received data via sniffers.
|
|
|
|
|
Hi
My project uses a dll (third party) and a database (ms access) to make a setup file i am right cliking on the project and then publishing it so this one is working fine my problem is that i am unable to find the location of the database
so that i can take a back up ( I mean Physical path of database file )
Please if anyone know's where the database gets stored let me know
regards
sindhu tiwari
Always Innovative
|
|
|
|
|
you've written a program, it uses an access DB, but you can't work out where it is ?
Access, the application, can use SQL Server by default, if you have it installed.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sir,
Its not in the sql folder where all the databases are stored.............
any idea ................?
its me sid
|
|
|
|
|
C:\Documents and Settings\user\Local Settings\apps\2.0\Data\T3XVZ17B.2X0\V63PN1JX.E8Z\wind..tion_81d1f0c51d19247d_0001.0000_353a80502eb5e56f\Data\data
is the path which i came to know after searching the c drive
is there any way to change the path..............?
its me sid
|
|
|
|
|
What really frightens me is to thnk of the steps through which you created an app that uses a DB, but had no idea where the DB was. If it's a SQL DB, you will need to install SQL Server to deploy. If it's an MDB, it can go anywhere, but t seems it's in the right place, the app data for the app. If you move it, it probably won't work with vista
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
its a access db and i have stored it in a folder called data which is attached to my project ..............fine my problem is solved and thank's allot for ur valuable advice
its me sid
|
|
|
|
|
Hi all,
I want to do one projects in C# 2005
For same field I want to do one project in web application and onther in windows application.
So can I do both project in one project.
The View will be after splash screen main page will come. there will be 2 link options say 1.RFQ/ENQ control (web app) 2.Stock taking(windows app)
Can I do this ? If yes please tell me how to do?
Thanks in advance
Ashwini
|
|
|
|
|
No, you can't. A windows app lives on the local machine, a web app lives on a server. That's just the first of your problems.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hai Everybody,
I have used the following code to send the mail using the System.Net.Mail namespace:
string host = "192.168.0.22";<br />
int port = 85;<br />
string userid = "un";<br />
string password = "pwd";<br />
<br />
MailMessage message = BuildMessage();<br />
<br />
SmtpClient smtp = new SmtpClient(host, port);<br />
smtp.Credentials = new NetworkCredential(userid, password);<br />
smtp.SendCompleted += new SendCompletedEventHandler(smtp_SendCompleted);<br />
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;<br />
try<br />
{<br />
smtp.Send(message);<br />
<br />
MessageBox.Show("Success!", "Sample", MessageBoxButtons.OK, MessageBoxIcon.Information);<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.InnerException.Message);<br />
MessageBox.Show("Failed! \r\n" + ex.Message, "Sample", MessageBoxButtons.OK, MessageBoxIcon.Warning);<br />
}
When i am giving the invalid IP Address / port number it is giving the error "Unable to connect to Remote Server".
But when I am giving invalid user name or password it is just sending the mail.
Can any one tell me how to protect sending mail if wrong credentials are specified.
Thanks in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Do you use your own mailserver and if that's the case have you set it up so that users must login to send mail?
|
|
|
|
|
Yes I am using my own mail server.
Johan Martensson wrote: set it up so that users must login to send mail
Where can i set this?
Is it in the Exchange Server or can we set this in the program itself?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I have no experience with Exchange Server myself but there should be some option to make the users login to send mail.
I have only used CMailServer and Kerio Mailserver and they have this option.
|
|
|
|