Answer Questions
jeffps Custom Control
Hi all! I don't know how to handle the following: I want to create such cool buttons like used in Windows Media Player 10 etc. But those Custom Controls styles. Are images used or is GDI+ enough to handle everything you need for a good style It is indeed better to use images but that doesn't take away the fun to draw with GDI. Below is a screenshot and sample code of creating a very basic gradientbrush. private void cmdDrawGradien ...Show All
Sunil_pachunde Send Email...
I have been looking for a way to send email and have found many ways to do it. All of them require an SMTP server though. Is their anyway to run an SMTP server "in" my program (minimized to tray) on localhost at all times Or is their a better way, such as open smtp servers etc. Thanks. That link seemed to mention how to send an email but I want to know if it is possible to do it without a remote smt ...Show All
Jamesx ListView 'SelectedIndexChanged' situation
I've got a ListView on my Windows Form that displays information from an Access database. I am trying to show the data in textboxes when a row in the listview is clicked. The code I've typed so far works, to an extent . . . When I click on a row, the lase record in the database is displayed in the textboxes. I know that I need to use the ListView_SelectedIndexChanged event, but where I'm getting confused is how to select the corr ...Show All
FleetCommand copy data from an pointer
Hi i have a hook dll created in c++ that send messages to my c# application.. the WPARAM its a pointer to a struct that has some informations C++ Struct typedef struct INFO{ LPARAM lParam; // an original LPARAM UINT code; // a code HHOOK hhook; // handle to the hook }; ok now i have the pointer 2 this struct .. but how do i obtains the values from in in c # First you need to build a struct in C# which matches the C++ str ...Show All
Cornishboy Open a file on a network resource
I am trying to write an ASP.Net 2.0 (c#) that will open document files (.doc or .pdf) on a network resource (ie. '\\network_location\files\document.pdf") that requires user authentication. Is there a way to call an open file command that passes active directory credentials so that the files will open Example of filepath trying to open: \\network_location\files\document.pdf i dont know about 2.0 but in 1 ...Show All
Vi Truong typedef-equivalent for shared tentative types?
(This topic has been touched on here and here .) Use case: Developers are working concurrently on a system where some details of the implementation remain unsettled. One of the details is whether a particular Id will be a string or an integer. We can write: using PlantId = Int32; using AnimalId = String; class Plants : List<PlantId> {} class Animals : List<AnimalId> {} void useList(Plants p) { PlantId firstPlant = p[0]; TextBox1.T ...Show All
epion this one is a doozy!!!
I am using Visual C# to develop a sudoku program. I have been working on it for a couple weeks now. The one thing I want it to do is to generate the puzzles through a random algorithm. The rules are a little complex but I managed to simplify them a little for the program. The one problem I am having is actually with C# itself, I don't believe it is my code because I have rewritten the algorithm numerous times. Here is the problem. The values for ...Show All
BryJ How do I change the default language in Visual Studio 2005?
How do I change default language in Visual Studio 2005 When Visual Studio starts it display information about C++, but I would like to change this to C# MattontheNet wrote: Was this helpful ! Man, you have no idea! Like some others, I've spend precious time to find that (simple) action. May be an idea to include a small button on the start page that says: "Change default langu ...Show All
Martin McNally How to use switch?
I have the following switch and it's not working. protected void AppendColumns(object sender, GridViewRowEventArgs e) { int i = 0; foreach (GridViewRow gvRow in gdvwScholarList.Rows) { string colText = Convert.ToString(gdvwScholarList.Rows .Cells .Text); switch (colText) { case (colText != " " & colText != "" & i == 1): { ...Show All
australenia Options Form
hey ppl. i was wondering how to design an options form, for example the visual studio options form have a treeview docked to left, and when u select an option the content of the right panel changes, i think each treeviewItem useits own panel and when u select the threeveiw the panel changes, but this is very hard at design time, becasue if u have many options u need many panels, and i just want to know how usually the options forms are made beca ...Show All
temosol Cross-thread operation not valid
public void listenerThread() { TcpListener tcpListener = new TcpListener ( IPAddress .Any,1234); tcpListener.Start(); while ( true ) { Socket handlerSocket = tcpListener.AcceptSocket(); if (handlerSocket.Connected) { lbConnections.Items.Add(handlerSocket.RemoteEndPoint.ToString() + " connected." ); lock ( this ) { alSockets.Add(handlerSocket); } ThreadStart thdstHandler = new ...Show All
joe_coolish Getting the panel's text of a scrollbar in another application
Hi All, I'm having a problem in getting the text property of a panel in a scrollbar which is found in another application. My code goes this way: public unsafe static string GetPanelText(IntPtr hStatusBar, int pos) { IntPtr hwnd = (IntPtr) User.GetAncestor(hStatusBar, User.GA_ROOT); const int BUFFER_SIZE = 0x1000; byte [] localBuffer = new byte [ BUFFER_SIZE ]; Int32 processId = ...Show All
atul I can not find ListView.SelectedIndex event
When a row is clicked I want to display these Items on this row display in textboxes but I can not find ListView.SelectedIndex event. How can I do this Thank you very much ! You want ListView.SelectedIndexChanged. http://msdn2.microsoft.com/en-us/library/system.windows.forms.listview.selectedindexchanged.aspx HTH, -Bill Use the SelectedIndexChanged event of the ListView class. ...Show All
DavidR ow to restrict user on the bases of rights to see a certain part of the page
How can I restrict user on the bases of rights to see a certain part of the my asp.net 2.0 page. I am not using aspnetdb. I can restrict a user on the bases of roles to view certain pages. Now on the bases of rights.I want's to restrict user to use part of the page. Suppose I have four tables.On the bases of right i want's to allow user to view three tables. On the bases of rights i want's to let user see some text boxes while not othe ...Show All
yannamoto Get data from a asp:repeater?
Hi, How can I get all the rows from a repeater(i've already have a datatable if needed), and insert all registries in a SQL table I know that I need to use a foreach....but any sample thanks Ok, but that's is not my point, what I need is....get all rows from a datatable or from the asp:repeater, convert each colunm in a string to I use my insert query.... It's better now Thanks for helping You should grab the data f ...Show All
