Topics
-
- 2 replies
- 900 views
I am currently creating a program in C# using VS2003. I figure the project I am working on is perfect for me to learn C# as the original program was down in Borland C++. I am upgrading as the original is not user friendly. Anyways, I am wondering if this is a bug. I place a listbox on the form called lstAinfo. I saved this as well. if I try and do this.lstAinfo, so I can add an item, it doesn't show up in the list. I have a button called btnExit, and that shows up. I also checked and I do have this setup in the windows designer area.
Last reply by techmanbd, -
-
- Leaders
- 2 replies
- 1k views
Hi, I am writing a contact manager, which stores the title, first name, last name and address etc... I allow each field to be up to 64 chars. Regard Title, because English is not my primary language, how many characters should allow at most? "Mr." is 3 chars "Mrs." is 4 "Dr." is 3 Which word that can be a title has the most chars? I think it's "President" which is 9 chars!!!??? :confused:
Last reply by mskeel, -
-
-
- Administrators
- 4 replies
- 904 views
What is the shortest way to check if a pressed key is alphanumeric in a KeyDown event? PS: I'm using VB2005 Express.
Last reply by JumpyNET, -
-
-
- Administrators
- 3 replies
- 2.3k views
Hi there! :) Since ASCI character is 8 bits long, and Unicode chracter is 16 bits long. Is there any special bit in a string that make it unicode or asci? :D How to display unicode string in vb.net program? How to convert unicode string to asci and vice-visa?
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 4 replies
- 763 views
Hi I want to store methods in a List/Arraylist Class with different parameters. Until now I declared a delegate which has the same parameters as the method to store, then within a method I declared another variable as the delegate, then I assigned the address of the method. Simply put I did this: Class Main Delegate Sub Exec(ByVal Code As String) Private Sub Test(ByVal Code As String) Dim TestSub As New Exec(AddressOf Test) TestSub(Code) 'I know it loops, it is just to demonstrate :) End Sub End Class But now I want to pass methods whose parameters I don't know beforehand and therefore can't declare a delegate for it. What I want to…
Last reply by snarfblam, -
-
- 0 replies
- 755 views
Hi, Is there any way of setting a crystal report viewer to limit the number of results per page? Let's say 10 results per page. Thanks, Dave.
Last reply by davearia, -
- 0 replies
- 660 views
Hi, I have been given an existing web project at work which needs a lot of changes. There is a page with a crystal report viewer on it. When I click the page forward button in the viewer the page reloads blank. Is there an event that get fired that I need to code for? I have looked at the viewers events and could see anything obvious. I get the same result when I click the export to excel button and the print button also. Can anyone please help? Thanks, Dave.
Last reply by davearia, -
- 1 reply
- 818 views
Hi, Everyone here ever tried to assign an icon with all 256x256 , 48x48 , 32x32 , 24x24 , 16x16 sizes inside to project properties > Application > Icon ?! Visual Studio won't accept it and will return this error (Project won't be compiled): --- Error 1 Unable to write to output file 'C:\Documents and Settings\user123\Local Settings\Application Data\Temporary Projects\WindowsApplication1\obj\Debug\WindowsApplication1.exe': The specified image file did not contain a resource section. --- If I remove the 256x256 icon size from inside my icons the problem will be solved! 256x256 is recommended for Vista and I want to include this size also! As you know, an icon …
Last reply by OMID SOFT, -
-
- Leaders
- 2 replies
- 813 views
Hi I'm having trouble with the TreeView Control: I sometimes want to add nodes or edit them but it seems to do both sometimes which of course messes up its content. What is really odd: This only happens when the Treeview is visible. If I place it on a TabControl, on a Tab which is not viewed it works exactly as I want it to, but as soon as I switch to the tab which contains the Treeview, it messes up again. First I thought something is wrong with my code but I reduced the code to the base problem but it still happens: Public Class Form1 Delegate Sub CrossThread(ByVal J As Integer) Dim ItemAdder As New Threading.Thread(AddressOf ItemAdd) Private S…
Last reply by Arokh, -
-
-
- Administrators
- 2 replies
- 811 views
Is there a built in function that will take two rectangles and return the smallest rectangle that contains them both? I've looked under the Rectangle object and can't find anything. I can do: With Rectangle2 R = Rectangle.FromLTRB(Min(R.Left, .Left), Min(R.Top, .Top), Max(R.Right, .Right), Max(R.Bottom, .Bottom)) End With But it's a bit long-winded.
Last reply by rbulph, -
-
-
- Administrators
- 1 reply
- 4.9k views
Is it not possible to capture every CONTROL-x keyboard combination, where "x" is any alphabetic character? Using the following code, I can't seem to capture CTRL-J, but CTRL-F works. Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean If (keyData = (Keys.Control Or Keys.J)) Then Console.WriteLine("You pressed CTRL+J") Return (True) End If If (keyData = (Keys.Control Or Keys.F)) Then Console.WriteLine("You pressed CTRL+F") Return (True) End If Return MyBase.ProcessCmdKey(msg, keyData) End Functio…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 2 replies
- 1.2k views
Hi, We have an activeX control at work which has been successfully used in many desktop applications, where you can easily add it to the toolbar in Visual Studio. However, in ASP web pages you cannot add it to the toolbar. If you right click in the toolbar and select Choose items... and browse to the com object, the com object gets added however no usercontrols is added to the toolbox. I think I need to register it in the asp.net page. But I am not sure of it's namespace etc. Can anyone please give me some ideas on registering this kind of control so it can be referrenced server side? Thanks, Dave.
Last reply by davearia, -
-
- 1 reply
- 782 views
I am using the following using System.Net.Mail; ... message = new MailMessage(); fromAddress = new MailAddress(sendFromAddress, sendFromName); sendFromAddress and sendFromName are strings i am attempting to send to a valid email address, but it errors and states that "The specified string is not in the form required for an e-mail address." I know that address is good, i send to it several times a day. It is the form 1234@abc.xyz.com Can anyone offer any suggestions
Last reply by kcwallace, -
-
- Administrators
- 2 replies
- 1.5k views
That probably isn't worded right, but say I have 2 array, one holds 4 numbers (1 - 4) The other Array has 3 numbers which range from 1 - 4. How can I scrub against the first list to find out which number the second array doesn't have? I figured a for next loop but I can wrap my head around how to pull out the number that isn't matched... Marc
Last reply by caeanis, -
-
-
- Administrators
- 1 reply
- 1.6k views
Hi, I searched in MSDN before this post but I didn't find how should I detect the file that my user opened is a BINARY file or not? I don't want to check the file extension, but I should read some header of file to see if it's written in BINARY format or not? I cannot find a .NET method to detect it? :(
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 2 replies
- 1.4k views
Hi guys. Am playing around with LinQ here, using VS2008Express. And I have this: private void QueryData() { var peopleOlderThan = from p in people where p.Birthday < DateTime.Parse(textBox1.Text) orderby p.Name ascending select p; dataGridView1.DataSource = new BindingSource(peopleOlderThan, null); } don't mind the part with the combobox. This statement basically gets data from here: people = new List<Person>(); people.Add(new Person("Timmy", DateTime.Parse("1/2/1990"))); people.Add(new Perso…
Last reply by Eduardo Lorenzo, -
-
-
- Administrators
- 6 replies
- 1k views
I stumbled upon the following code in Juval Lowy's "Programming .NET components" on pages 95-96. The following is pretty much as he shows it, with the addition of a couple of MessageBox calls: internal interface IMyInterface { void SomeMethod(); } internal class MyClass : IMyInterface, IDisposable { void IDisposable.Dispose() { MessageBox.Show("IDisposable.Dispose() called."); } void IMyInterface.SomeMethod() { MessageBox.Show("IMyInterface.SomeMethod() called."); } } public static void Run() { IMyInterface obj = new MyClass(); using (obj as IDisposable) { obj.SomeMethod(); } } The above code runs fine... but…
Last reply by Mike_R, -
-
-
- Administrators
- 3 replies
- 707 views
Hi, This is a special folder in XP: - C:\Documents and Settings\User Name\Application Data - But what's its name in Vista?
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 6 replies
- 3.4k views
Hi, my applications consists of several Forms which can overlap each other. I can start actions by dragging and dropping a graphical element onto a form. The dragged element is actually represented by a form, too. To do this correctly I've got to know if the mouse cursor is above a visible part of the target form or if the target form is overlapped by another form at the current mouse cursor position. I cannot use win32.WindowFromPoint. This would get me the handle of the topmost window, which normally would be what I'd like to have. But as I am dragging a From the "topmost" window is always the very Form which I am dragging. The target zone would then be the second t…
Last reply by wenigtelefonier, -
-
-
- Administrators
- 3 replies
- 972 views
Hi, When I want to paste a text into a text box I use this code: Clipboard.SetText("My Text") SubjectTextBox.Paste() It has a problem: it removes the previous clipboard contents, is there a way to paste a specific text into text box without working with clipboard? Thanks.
Last reply by PlausiblyDamp, -
-
Who's Online 0 Members, 0 Anonymous, 47 Guests (See full list)
- There are no registered users currently online