Wayne Sepega's Q&A profile
Visual C# Password?
Is it possible to password protect a program you can store a hash of the password instead of the actual password. Then your program compares the hashes instead of comparing passwords. It works like this: 1) create a hash of your password. 2) When user enters a password, hash it and compare to your hash. 1)- Code to generate hash (separate program). using System; using System.Web.Security; // add reference to System.Web class Class1 { [STAThread] static void Main( string [] args) { // generate has in separate program. Console.WriteLine(FormsAuthentication.HashPasswordForStoringInConfigFile("passwd!@", "sha1")); //the h ...Show All
Visual C# Finding Drivers
I want to write a program that finds the drivers that you are using on your computer and copies them to a zip folder for storage. I am thinking I could enumerate through the registry under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ and find all of the names with InfPath in them and find the name of the inf file. Correct me if I am wrong then try to find the inf file in the windows\system32 folder. Then search the inf file for the full path of the driver. I could then copy the file into a zip. So now for my questions, is this possible programitacally Second, would this be an effective way or is there an easier approach Third, I don't know how to do all of this and was ...Show All
Visual C# printpreviewDialog
I am using PrintPreviewDialog to view Print Document.the code like follows PrintPreviewDialog1.Document = printdocument; PrintPreviewDialog1.WindowState = FormWindowState .Maximized; PrintPreviewDialog1.ShowDialog(); when clicking on print it is throwing Exception in the build. Another problem is above issue is working fine with code,but if printer is not connected it is asking to save the document ,the data is showing partially in the document(just one or two lines are saving in that document) thanks ...Show All
Visual C++ how to determine memory footprint of code from EXE
i'm using VS2005 to develope some large C++ programs. is there an easy to determine the number of code bytes for an EXE i linked everything statically. thanks al This will give you the size of the executable code on disk - to get the actually in memory footprint while the executable is running you will need to profile your application. Note: code size is very rarely a performance issue. ...Show All
Visual C# Open Windows Media Player. . .
Open WMP 9, 10, or 11. Look at the top bar where it says "Windows Media Player" How can I create a different looking top bar like Windows Media Player and not like Internet Explorer Thanks, There are some great examples on The Code Project that will answer your question: Google Talk styled Windows Form Irregular Shaped Form Creating a non rectangular form using GDI+ ...Show All
Windows Forms Ctrl+C for TextBox in a MdiChild Form not working
Hello, The shortcut Ctrl+C is not working for a TextBox when this one is on a MDIChild form. If I open the form outside the MdiParent, then it works. I verified, ShortcutsEnabled is true. I don't use/need context menus nor want to write TextBox.Copy() inside a KeyUp event or something like . Just want to use Ctrl+C The same problem was reported on threads: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=751139&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=146126&SiteID=1 But no clear answer about it. Nor if this is a bug or if there is a work around. ...Show All
.NET Development Reminder: Networking Developer Online Chat today (Friday @ 11AM PST)
This is a reminder that the System.Net team, along with the rest of Windows Core Networking, will be on hand this morning in an online chat to answer your questions about System.NET and Core Networking Technologies in Windows. Other product team members from areas such as Winsock, IPv6, Peer-to-Peer, WinINet/WinHttp, Windows Filtering Platform (WFP), Http.sys, new QoS platform, Winsock Kernel, etc. The chat starts at 11am PST today. http://msdn.microsoft.com/chats/chatroom.aspx Billy Anders http://blogs.msdn.com/wndp/ ...Show All
Visual Studio Express Editions visual basic 2005 command prompt help..
O.k i have been looking around and still have not been able to find the answer. what i am looking for is the code that will send a command to dos prompt or cmd and execute it. You know like ipconfig iprelease / renew or netstat -a this way you dont have to go and type all this long stuff out everytime you need to release your ip or your trying to configure a network. I saw your post tall dude, i am not looking to open a program.. ok what i am trying to set up is a vb program that at the click of a button it will run ipconfig, ipconfig/releasor renew, that will also have a box that will allow me to tyep c:\test.bat or c:\windows\test.bat and run my bat file. as i am just learning to program i a ...Show All
Visual Studio Microsoft(R) Uniscribe Unicode script processor
Hi, Can someone tell me how to make VS2005 Report Viewer WinForm work with Microsoft(R) Uniscribe Unicode script processor (USP10.DLL) I develop software with VS2005 and .Net Framework 2. My application render complex script without problem but when I want to Print with Report Viewer Winform the complex script can't render correctly. Cheers, Kosona The reason your script not render properly because GDI+ is not capable to render complex script. I am not sure why they do it that way but I hope the future version of .net will support rendering complex script. ...Show All
.NET Development Remoting proxy has no channel sink...
For the history of this project, see: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=572115&SiteID=1 Now, I'm able to make the remote call, but there's a bit of code in the server that is throwing an exception. public void CreateBuildTree( TreeNode node, string RootPath ) { string s = node.Text; ..... } Here's the exception: System.Runtime.Remoting.RemotingException: This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server. at System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(IMethodCallMessage reqMcmMsg, Boolean useDispatchMessage, Int32 ...Show All
SQL Server maximum users logged in sql express
we're planning to use sql express as our database server in our office. the database will consist of accounting, purchasing, marketing, sales, inventory, production and hrd tables. 80-100 users will use the system simultaneously in adding, editing, deleting, reports. i need some advice on the following: 1. maximum users that can log on to the database simultaneously 2. maximum size of the database tnx Hi, the maximum number of users will be most likely limited by hardware ressources not by a logical threshold, its around 32k users. maximum size of each database is 4GB. HTH, Jens K. Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Visual C# Thread Message Suggestions
I have a question. In my C++ days, I had straight C++ threads using thread messages to act very similiar to MFC UI threads to process messages even though they weren't connected to a UI. The Win32 calls included ::CreateThread(), ::PostThreadMessage(), ::GetMessage() to simulate the behavior of just dropping a message into a thread queue to process the message. Now that I am in C## land, I can't seem to find any documentation about thread messages which tells me that I am looking at the problem incorrectly meaning C## does things differently. Suggestion Having the thread message queus for free is quite some time saver. Doing that in C# would take some work: create a Queue (maybe Generic) for all types of ...Show All
Windows Forms dynamic control layout
Hi All, Is there a way we could make the TableLayoutPanel behave similar to an excel sheet, where we have a list of controls added (vertically), and it should also be possible to add control between rows i.e. insert a new row between two rows and push all controls (or rows) under it to move down I'm try to have this done dynamically, where the user would select some option from a listbox and based on that value some controls would be created below it.... Thanks, Sub InsertElement(ByVal insPos As Integer, ByVal Element As Windows.Forms.Control) Dim myList As List(Of Control) = New List(Of Control) Dim ct As Control Dim k As Integer = 0 For Each ct In Me.Tabl ...Show All
.NET Development [system.net.mail.smtpclient]: Does anyone know of a *real* way to validate a successful email send?
I've looked in the intellisense, online .Net docs, and on here... long story short i can send email but want to read the status code of those emails... preferably the SMTP status code. so far the only close solution to verifying a successful send is using the mailmsg.deliverynotificationoptions.. but that's hardly a solution... that is based on a return email for delivery notification... for catching errors it's easy enough... just try/catch it and grab the status code there... but i'm looking for something on the success/delay (delays can still be successful) status code as well. I'm looking for a status code (250 OK, 500 ERR, etc), not some return email - a *real* way. any help would be appreciated, -Scott ...Show All
Visual Studio 2008 (Pre-release) Accessing custom control's children elements
I created a new custom control. Inside the generic.xaml ControlTemplate tag I have two TextBlocks. Instead of binding their properties, I would like to access directly to the child elements, but at runtime I cannot find any children collection suitable (LogicalChildren is null). How can I access the contained elements in a custom control BTW I am trying to dynamically add a custom animation to those TextBlocks. Thanks, Raffaele ...Show All
