ahmedilyas's Q&A profile
Visual Basic Exceptioon error when trying to set ComboBox.SelectedIndex
Hello All, First, just so you know, I am not a real programmer and have never programmed in visual anything before and am playing with VB 2005 Express Edition. In the Sub below I am simply trying to change PtComboBox.SelectedIndex when the RunComboBox selection is changed, but am getting the exception error shown in the comments in the sub. In the Form1_Load event handler I have this line. PtComboBox.SelectedIndex = My .Settings.PreTrig and it seems to work fine. I can change the value of My.settings.PreTrig and the box is set properly. There are 4 items in PtComboBox and there are only 2 items in RunComboBox. I sure hope someone can show me what I'm missing here because this makes no sense. Private Sub RunC ...Show All
Visual Studio 2008 (Pre-release) Is it possible to animate a RowDefinition?
I have a grid with two rows. In the first row I have a canvas, in the second I have an expander with it's height set to 25. There is a Grid splitter between the two. What I would like to do is to animate the effects of the expander expanding/collapsing and have the grid row animate along with it so that it doesn't look goofy having having the row jump up and then have the expander animation tag along a little while after. This what I have in the expander expanded event... DoubleAnimation dblAnimation = new DoubleAnimation (); //set the height that we want the expander control to //have when animation is complete dblAnimation.To = 150; //set the duration of this animation - generally 1/4 or less looks best dblAni ...Show All
Windows Forms Is there any way to use my own usercontrol as RootComponent of DesignSurface?
As I know, Form, UserControl and Component can be used as RootComponent of DesignSurface. but, I'd like to make a new custom usercontrol and adjust it as RootComponent. MSDN said 'have to implement IRootDesigner'. but, it's difficult to find sample. How can i get some sample ps. I'll add below functions into new custom usercontrol. 1. allow special control to be child. 2. arrange child controls automatically 3. etc.. Thank you. I found a solution. I made my custom control's Designer inherit 'System.Windows.Forms.Design.DocumentDesigner' as IRootDesigner. thanks and regards sangmin ...Show All
Windows Forms Why Can't I set the Text property of a Label
I have placed a label control on my form and I when I eter code in the VS 2005 IDE to chnage the text property it tells the control isn't defined! Yes I have double checked the spelling, it doesn't even show up in the autocomplete menu. Help! This is really annoying! Simmy Simmy7 wrote: I added the code in a regular form. I have tried it with "me", no luck. The only way it works is me.controls("lblCustomer").text ="a". Would you be able to email an entire solution that exmplifies the problem to me to have a look ...Show All
Visual Studio Team System VSCodeGenAccessors Errors
I am new to unit testing in VS.Net and I have a strange thing happening. The VSCodeGenAccessors.vb file won't compile. Below is the error. Any insight would be apprecated. Note that this is a private shared (static) member that is causing the problem... Private Shared subscriptionList As Dictionary( Of String , List( Of NexSubscription)) John The Error: Error 1 Too few type arguments to 'System.Collections.Generic.List(Of T)'. C:\CHCSII\CHCS2 Inc2\Source.Net\DoD.CHCSII\NexServices\Dod.Ahlta.NexTest\VSCodeGenAccessors.vb 22 99 Dod.Ahlta.NexTest The Offending Code ( Red Bold is where the compiler is marking the error): Friend Shared Property ...Show All
Visual Basic ShellExecute() question...
Hello. I'm trying to use shellexecute() to open a directory... This is the code portion having to do with it... Option Explicit On Private Const SW_NORMAL = 1 Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim FOLDER As String = My.Computer.FileSystem.SpecialDirectories.MyDocuments ShellExecute( Me.hwnd , "open", FOLDER, vbNullString, vbNullString, SW_NORMAL) End Sub error BC30456: 'hwnd' is not a membe ...Show All
SQL Server Sending email to multiple recipient
I am trying to send emails to multiple recipient using the Send Mail Task, but it is failing with the error: " The specified string is not in the form required for an e-mail address." It works when I have only one emailID in the ToLine, I have a script task that build the emaiID list and saves it in a variable and the in the Send Mail Task, I am using the Expressions for ToLine to use this variable. If there is just one emailID in the list, everything works, but if there are multiple, it throws an error. For building the emailID list, I tried using "," as well as by ";". But none seem to work. Any help will be greatly appreciated. OK. Angle brackets are not needed, ...Show All
.NET Development How can I create Images from a URL?
I am developing a native application running on a machine with an internet connection. At the other end of the world, I know there is a web server running with pictures. I would like to load pictures from that web server and display them. Would be awesome if the following would work: Image image = Image.FromFile(”http://www.webserver.com/directory/pictureFile.jpg”) ; But unfortunately, it doesn’t … what is the proper way of doing this. Thanks, Dom. I suppose this is what you are looking for Stream ImageStream = new WebClient ().OpenRead(url); Image img = Image .FromStream(ImageStream); Note: This is got form this great article. : Pulling I ...Show All
Visual Studio change the visibility of fields in crystal rpt.
How to change the visibility of any field in crystal report at run time. Use the suppress property of a report object (text, formula, image, section, etc..) You can either create a formula in design mode for the object by right clicking on object -> format object (might be text,field, etc) and then in the 'format editor' that comes up, under the 'common' tab you will see a checkbox with "Suppress" next to it, on the right of that you will see an icon with x+2 in it. Click this to edit the formula to decide whether this object gets suppressed or not. IE. If you want to hide an object when a field value is less than 20 the formula will look something like this: ({table.fieldname}<20) This get evaluated as b ...Show All
Windows Live Developer Forums Opening a pin
Hi How do you open a pin from javascript It's easy in G and Y maps. This thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=676048&SiteID=1 doesn't work as far as I can tell :-( What I can tell you is this works: function AddClickablePin (location, icon_url, title, details, iconStyle) { var pin = new VEPushpin(pinID, location, icon_url, title, details, iconStyle); map.AddPushpin(pin); var element = document.getElementById(pinID); element.onclick = EventHandlerOnClick; pinID++; } function EventHandlerOnClick (e) { if (e!= null ) { document.getElementById(e.currentTarget.id + "_" + map.GUID).onmouseover(); } else { ...Show All
Internet Explorer Development When will the AU take place?
I have seen all sorts of dates of the AU (Automatic Update) of IE7 around the world. Is there a page has a definitive date (or even month) when the final version of IE7 will be released via the AU in Europe ...Show All
Windows Live Developer Forums Request to add Birthday and Anniversary
Hi, Danny! Please add two fields (attributes of Contact) to the Contacts Control: Birthday and Anniversary. I'm planning to use them in my Birthday Reminder application . These fields should be added: - to the " dataDesired " element - and to the "contacts" Argument of " ContactsControl.createContacts " function. Thank you. -- Yuri I believe, that "Anniversary" field _is_ in the "Windows Live Contacts database", because I see it in "Windows Live Messenger" (right-click on the contact, select "Edit contact" and then go to the "Personal" Tab: both Birthday and Anniversary are there!) As I understand, your "Contacts Control" looks in the same database, as "Windows Live Messenger" ! ...Show All
Visual C++ Cannot convert type String^?
Hello, I'm trying to do something that is actually very basic. I simply want to take a string and convert it to type int so that I may use it in my calculations. The code is: hours = int(lblpaycheck->Text); I apologize if its a completely obvious question, I originally learned to program in Visual Basic and I am currently a beginner in C++ and Java. Any help is really appreciated. ...Show All
Visual Studio Team System "Ghost" Pending Changes
I have a project that a few people have been making changes to and we seem to have "ghost" pending changes. What I mean is if I look in the Source Control Explorer, two of the project files (.rptproj and .rptproj.vspscc to be exact if this has anything to do with the problem) shows "edit, [more]" in the Pending Changes column and "user1, [more]" (where user1 is username of the developer) in the User column. When I click the project file and right click and select properties, under the status tab it shows the two users and the change type of edit. Now I know what the problem is, the developers got new machines, which means the names of the computers changed. Now because some changes where not ch ...Show All
Visual C# URGENT: Corrupted DataSource list
Hi, Hope someone can point me in right direction as development is completely halted by this issue. I have added a datasource to my project, noticing there was a naming convention mistake in a proc it referenced, I recreated the class, and removed the previous reference, by deleting the file (think this caused the problem) and then deleting the reference to it in the Properties\DataSources folder in my project. Now I can't select any datasources to create databindings on any control over my whole project. The dropdown in the property box of the controls wont even open, giving me the error message: "Object reference not set to an instance of an object" as soon as I click it. I have removed all references to the datasource ...Show All
