mark.b's Q&A profile
Visual Studio 2008 (Pre-release) datbing listview with a generic sortedlist collection
Bit of a newbie question but i'm trying to data bind a listview to a SortList. I have a type X with a field called Url. The SortedList collection is of type X. The binding path on my data template is {Binding Path=Item.Url} (have also tried just {Binding Path=Url }) Now i've tried doing the following on the call to bind PermanentlyBannedDomainsLb.DataContext = GetPermanentBannedItems().Items 'Items is a Sortlist of type X and i've tried PermanentlyBannedDomainsLb.DataContext = GetPermanentBannedItems().Items.Values but i'm obviously not getting the hang of this. This collection was previously an array (it was quick and dirty) of type X, Binding Path=Url worked fine. Any ideas Thanks, Grant ...Show All
Visual Basic How to call a javascript from a console application in vb.net
I've created a vb.net console application which extracts data from a given webpage, using webrequest. 'Create webrequest Dim wrqUrl As WebRequest = WebRequest.Create(strUrl) 'Create webresponse Dim wrpUrl As WebResponse = wrqUrl.GetResponse() 'Create Streamreader Dim srUrl As StreamReader = New StreamReader(wrpUrl.GetResponseStream()) I then have some logic that reads every line in the stream and extracts any possible wanted data. This works fine.. but, I encountered a webpage (aspx) which I'd like to read where the content is determined by a javascript. How can I make my console application 'trigger' this javascript The script looks like this: <script language="javascript" type="text/javascript"> <!-- function __doP ...Show All
Windows Live Developer Forums Page in activity can redirect to other page?
If I want to change url in my activity,what to do I want the page in activity to jump another page ,means that the page in the activity want to change page dynamically , may it be I don't really understand you question 100%, but I guess you are asking how to use multiple pages in your activity. You can use frames to that. For example, you can make the main page like: <html> <head> <title>My activity</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script> // Functions for receiving / sending data function Channel_OnDataReceived() { if(window.external.Channel.Data == "") return; if(window. ...Show All
Visual Basic GDI+ How do you change the coordinates to Cartesian
Hi, I need to change my coordinate orgin from Upper Left to Lower Left and I need to have Y positive moving up the screen instead of down. Said another way I need my graphics to match the caretsian plane. Any sample code in VB would be Great CodeVb Thanks kesim, This looks promising. Thank you for the link to your thread. I will do some experimenting and respond on both threads with what I find out. My initial test shows this will work :-) Thanks alot, CodeVB ...Show All
Visual Studio Tools for Office RemoveCustomization
Hi Marteen, How are you I have gotten closer to my final solution but no cigar yet. My problem is the following: Using a console or WinForms application I make a copy of the "master" Word document file which is customized and contains code in the StartUp to populate Bookmarks etc.... The problem is that when I copy the "master" file to another directory, it cannot seem to find the customization .DLL and therefore does not populate my bookmarks or run any startup code. I checked in the document properties, and the _AssemblyName and _AssemblyLocation custom properties are still there, but they cannot seem to find the .DLL itself. Is there any way around this What I basically want to do is make a copy of a ...Show All
Visual C++ do while statement
Don't understand why cout statement to print an array member doesn't work. See bold text below. Any help would be appreciated. void main(void) { //initialize variables char Command ; char chrNum[4]; int x= 0; int Num; string strNum; //initialize two arrays char pagetable [10][2] = { {'i',' '},{'i',' '},{'i',' '},{'i',' '},{'i',' '}, {'i',' '},{'i',' '},{'i',' '},{'i',' '},{'i',' '}}; char memorytable [3][2] = { {0,' '},{1,' '},{2,' '} }; do{ std::cout << " Please enter a command:"; cin.getline(Command, 6); if (Command[0] == 'r') //nested if from Gaddis page 178 { for(x=2; x <= 4; x++) chrNum[x - 2] = Command[x]; Num = atoi(chrNum); std::cout << "\nNum= " << Num; Num = Num/100 ...Show All
Visual Studio Express Editions key confused
I am trying to make a project in which when i press a key on my keyboard ( let's say the z key ) it adds plus 1 to a variable ( lets say the variable's name is runningCount ). Can someone help me. Thanks. When i type this code into a form with a label named label1, I ran this code. I worked perfectley, but when I added a close button It wouldn't work. Below is the code That i used. Can you or someone help me. Public Class Form1 'Declares the variable rc as the running count for the program Dim rc As Integer 'says that when key a is down increment rc. Public Sub Form1_KeyDown1( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventAr ...Show All
Windows Search Technologies Acceptable columns in WDS 3.0 ExecuteQuery call?
I just downloaded WDS 3.0, and now my old ExecuteQuery calls return an HRESULT: 0x80040E55 exception, which seems to mean that there's an invalid column. Has the list of acceptable columns for the second parameter changed Also, is there any resource that lists all the acceptable columns After much searching, the only thing I could find was http://msdn2.microsoft.com/en-gb/library/ms123402.aspx , but that site doesn't work, besides the fact that it only describes WDS 2.x Thank you very much! I've blogged about WDS a few times ( http://www.ariankulp.com ). Recently I ran every known property using the OLE DB interface and dumped out the good and bad ones. Read more here: http://www.ariankulp.com/archive/20 ...Show All
.NET Development Display the live Mjpeg stream from IP camera
Hello I am using the IP camera from which i get the Mjpeg stream response. I made an application in vb.net which get the response from the camera and then parse it, and find the image from it and then convert that byte array into image and than display it in the picturebox. then again it get the next image from the stream and then display it in picturebox, so this way i am displaying the live vedio in the Picturebox. But in this way i have to convert the byte array into image each time. so this causes the lots of CPU usage. hence, Two consicutive images has not much difference. so if we will impose only the changed part int the next image on our earlier image then it may be faster and less cpu consuming. so can anyone sugges ...Show All
Visual C# insert a bitmap item to email body?
hi, I'm creating a bitmap dynamically, and i want it on the email body as a picture, can it be done Hello Tomer, Sorry but I can't find a satisfactory answer to your question. About writing to a memorystream...I've never actually worked with the MemoryStream class. Maybe you could find a solution if you do some googling on working with MemoryStreams. Otherwise, lets hope someone posts an answer to this question soon. You can also try posting your question on some other forum if you don't get an answer quickly. Hope your question gets answer soon, Ashish ...Show All
Visual C# hcw file?
Hi All, I just replaced my old PC, installed VS2005 on the new PC and moved my projects to it. One of the projects when I run it always says, the project is out of date and wants to rebuild it, after I OK that, another dialog another comes up and says, Windows cannot find 'hcw', make sure you typed the name correctly and then try again. Never seen this one before. I did search the project on my old PC for a file with a .hcw extension and there is none. Any help would be appreciated. Thanks Jeff Hi, I tried downloading the hpj file and compiled it. I am able to see a file with hcw extenstion. However, I keep getting the message. Every time I build my code, it annoys me to OK thi ...Show All
Visual Studio Invoke "Include In Project" programmatically
Hi, I was trying to add some files to a project, from a ProjectItems collection using "SaveAs" method of Project Item. Although this method successfully adds the files into the project, but does not include them in it. So I want to invoke " Include In Project " command from my code to make this happen. Can anyone please guide me as to how should I do it Regards, Sanjukta Hallo, Nothing forces a file to contain only a single class declaration. A file may contain several namespaces and classes. Therefore you need to use the file's code model to invertigate the programatic contents of the file and see if it only contains a single class definition. (See this relevant article http://forums.microsoft.com ...Show All
Visual Studio Team System No VSTeam Edition for Database Professionals in the TeamSuite trail
I have installed the TeamSuite Trail. The Visual Studio 2005 Team Suite should contain the lot but there is no Visual Studio 2005 Team Edition for Architects. Should it be installed separatly //Greg Team Edition for Software Architects is part of the Team Suite (180 days trial). I have many installations running with it. TE for Database Professionals is the only one which is not present in Team Suite. If you can create a Distributed System Diagram as a new project then I think you have TESA. ...Show All
SQL Server omitting null columns
Hey everyone, I haven't got any idea where to even start looking for a solution to this problem so any help would be appreciated. I'm trying to write a stored procedure that will return a table yet omit any columns that don't have anything written to them, so any columns that have no data will not be present in the table returned after the stored procedure. Thanks in advance. Menace is right: The dynamic SQL to accomplish what you want is pretty ugly. Here is an example of one way to do it: create table dbo.example ( column_01 integer, column_02 float, column_03 integer, column_04 varchar(30) ) go insert into example values (1, null, 2, 'This is a test.') insert into example values (2, null, null, ...Show All
SQL Server SSIS Data Flow Task Problem
Hi, there, I am having some problems with the loading of tab delimited text file (source) to a SQL Server table (destination) using the SSIS data flow task. Package has been executed successfully with no error msg. The number of rows in the text file also matches the number of rows in the SQL table. But, when I check the content of the table, I noticed some of the columns contain NULL which supposed to have value. This happens not to all the rows but only to some rows. I did some testing by removing some rows from the beginning, middle and end of the text file and re-run the package but the result is quite inconsistent. Sometimes, the field got filled, but sometimes, it just contains NULL where it supposed to have value. What will be ...Show All
