yaniv
Avatar/Signature-
Posts
167 -
Joined
-
Last visited
About yaniv
- Birthday 08/16/1973
yaniv's Achievements
Newbie (1/14)
0
Reputation
-
the invoke is good idea. thanks. but how do i maintain refference to a hidden form from another class?
-
I created some kind of surfing control application. The application open a form, get from the user cardinals, and then it close up and run background thread that sends information about the surfing activity to logger. Sometimes there is a need, of course, to open again the form to change settings� but since the back ground thread is a different thread, there is no way to open the "same" form again, nor close the net listener, each try to do so and with exception that generally says that you can't control the main process from another thread. I can't create new instance of the main form, since the network card is "busy" with the first process. I found that code that open the main form again- CaptureForm cf = new CaptureForm(); showHide = true; cf.Show(); Application.Run(); It does open the same main form, but the background thread are still collision. And any try to make changes to the running threads (like stop the capture of network movements) end with the same exceptions� I have to open the form from the background thread, since it's the only communication I have with the application after the form close. How can I catch the mainform? Or change anything in the background running threads?
-
it is possible. Every mail system has it's "invite" function. the problem with my code was the format of the "tags", in Gmail you have to be very accurate in the syntax. OUTLOOK is more forgivable. Now it is working for me in both platforms.
-
I use the code below to send invitations from my web calendar to other web users. I invitations get very good to outlook users and outlook web version, they have the accept and deny buttons and so on. And the message is in the mail body too. The problem that when I send it to Gmail users, the invitation only appear as attachment, there is no "accept" or deny buttons and so on. In the message body there is only the html I send as "description". Can I send this invitations from my dot net web page and make it appear the same in Gmail and outlook? i tried for houes every thing i know with out success... does any body have idea? Thanks. my code- Public Shared Function sendOutlookInvitationViaICSFile(objApptEmail As eAppointmentMail) As String Try Dim sc As New SmtpClient("XXXXXXXXXXXXXXX") Dim msg As New System.Net.Mail.MailMessage() msg.From = New MailAddress("XXXXXXXXXXXXXX", "XXXXXXXXXXXXXX") msg.[To].Add(New MailAddress(objApptEmail.Email, objApptEmail.Name)) msg.Subject = objApptEmail.Subject msg.IsBodyHtml = True Dim ct As New System.Net.Mime.ContentType("text/calendar") ct.Parameters.Add("method", "REQUEST") ct.Parameters.Add("charset", "UTF-8") Dim avCal As AlternateView = AlternateView.CreateAlternateViewFromString(buildICSText(objApptEmail), ct) avCal.TransferEncoding = Mime.TransferEncoding.Base64 msg.AlternateViews.Add(avCal) Dim nc As New Net.NetworkCredential("shoresh", "15128511") ' sc.EnableSsl = True sc.Credentials = nc Try sc.Send(msg) Return True Catch ex As Exception Return ex.Message End Try Catch ex As Exception Return ex.Message End Try End Function Private Shared Function buildICSText(objApptEmail As eAppointmentMail) As String Dim str As New StringBuilder() str.AppendLine("BEGIN:VCALENDAR") str.AppendLine("PRODID:-//" & Convert.ToString(objApptEmail.Email)) str.AppendLine("VERSION:2.0") str.AppendLine("CALSCALE:GREGORIAN") str.AppendLine("METHOD:REQUEST") str.AppendLine("BEGIN:VEVENT") str.AppendLine(String.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", objApptEmail.StartDate.ToUniversalTime().ToString("yyyyMMdd\THHmmss\Z"))) str.AppendLine(String.Format("DTSTAMP:{0:yyyyMMddTHHmmssZ}", (objApptEmail.EndDate - objApptEmail.StartDate).Minutes.ToString())) str.AppendLine(String.Format("DTEND:{0:yyyyMMddTHHmmssZ}", objApptEmail.EndDate.ToUniversalTime().ToString("yyyyMMdd\THHmmss\Z"))) str.AppendLine("ORGANIZER:mailto:meni88@gmail.com") str.AppendLine("LOCATION:" & Convert.ToString(objApptEmail.Location)) str.AppendLine(String.Format("UID:{0}", Guid.NewGuid())) str.AppendLine(String.Format("DESCRIPTION:{0}", objApptEmail.Body)) str.AppendLine(String.Format("X-ALT-DESC;FMTTYPE=text/html:{0}", objApptEmail.Body)) str.AppendLine(String.Format("SUMMARY:{0}", objApptEmail.Subject)) str.AppendLine(String.Format("ORGANIZER:MAILTO:{0}", objApptEmail.Email)) str.AppendLine(String.Format("ATTENDEE;CN=""{0}"";RSVP=TRUE:mailto:{1}", objApptEmail.Name, objApptEmail)) str.AppendLine("BEGIN:VALARM") str.AppendLine("TRIGGER:-PT15M") str.AppendLine("ACTION:DISPLAY") str.AppendLine("DESCRIPTION:Reminder") str.AppendLine("END:VALARM") str.AppendLine("TRANSP:OPAQUE") str.AppendLine("END:VEVENT") str.AppendLine("END:VCALENDAR") Return str.ToString() End Function
-
I build an app and i want it to block surfing when a "user" didn't chose, but I can�t find a way to stop the network adapter from c#. I saw and tried a lot of examples and advices from all other the net, but none worked for me. I tried to disabled the adapter- public void DisableNetWork(string interfaceName) { SelectQuery wmiQuery = new SelectQuery("SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionId != NULL"); ManagementObjectSearcher searchProcedure = new ManagementObjectSearcher(wmiQuery); foreach (ManagementObject item in searchProcedure.Get()) { if (((string)item["NetConnectionId"]) == "Local Area Connection") { try { item.InvokeMethod("Disable", null); } catch (Exception ex) { String s = ex.Message; } } } } I tried socket bind to another process, so I can block the browsers, I tried disabling the drivers, but nothing worked so far. Do you any have working working idea for me? If you have, Please check if it working on win7 since I understood that there is a different between XP and 7. Great thanks
-
Re: MIS is a file indexing service i used sql server "like" queries, but since my site grow up, i allways get overflows...
-
i"m trying to upgrade my site index and i found here: http://support.microsoft.com/default.aspx?scid=kb;en-us;820105 the article show how to use microsoft indexing system. but the exmple run on txt files, and i want to index my site page (.aspx & .ascx pages that have id's, let's say i have articles.aspx page that end with id- articles.apsx?id=1, ... id=2 and so on), how can index my entire site, with different id's, pages names, forums threads and so on? can anyone direct me to article on the subject?
-
thanks all, it is really what i needed. good people you are.:D
-
can i know which one is the CD drive?
-
i need to build an application that find PDF's of news paper aditions. the PDF should stay on the installation CD. what is the right way to find/ keep the right path in "any machine"? how can i get the right leeter that any user use for his CD drive... thanks
-
I need to add lists from another page, where the data organize in table (the kind of table on line stores build for "comparing" sites. i don't know how to strat... how can i read another site table page and use the data?
-
Well, it is not my choice to mix them. may be i should eaplain the need and them it will be more easy. i have linux server for e mail's purpose and win server (running .NET) for the web. my users asked to know, each time they enter our portal, to know if they have new mails, so that they will know they need to move to the webmail application. since I don't run the linux server i asked the developer there to create a page that get the user name and pass in return number of "new emails=..." it looked very simple for me that i will find a way to get the incoming number. but, when i read it as text i get jiberish... so i thought about "post" and "get".
-
Does it so comlicated? how come nobody knows how to do it?
-
where do i put the page url? and, if they building teat string ("total emails: 12, read: 6")- can i read it with out control?
-
I need to get some data (two numbers) from PHP page, the developer in the PHP side say that he will use "POST" to sned me the nembers and that i should use GET to get it. for five year with .NET i never needed to use this method... so, can some one please give the code for it? thanks...