Answer Questions
chaitanyas Plugins dynamic loading failure
Hello folks I'm facing a rather annoying problem, I'm testing dynamic plugins loading for an application. I've setup an interface for plugins to implement, and while i was testing I noticed that if the plugin interface dll is located in the plugins directory ( which happens if I set this directory as output target) and the host application tries to load it, the following casts to the common interface will generate a InvalidCastException. If the interface dll is not in the directory, then all plugins are loaded with no problems. Here's the code i'm using. It's pretty simple, and I think it's the standard way of doing dynamic loading foreach (string f in files) { try { assembly = Assembly.LoadFrom(f); types = assembl ...Show All
Henning Røigaard progressbar while dataset is loading
I use a dataset to load around 1000 records into a DGV. How can I show a progressbar while a dataset is being loaded Sorry dude. I meant to have a look for the BackgroundWorker class in the MSDN library. What version of visual studio are you using Do you have the MSDN library If you don't, it should be accessible from the Web. This should really be the first place you look for questions like this. It won't answer everything for you, but when it can, it'll give you the answers a lot faster than the forums. This is the online link to the backgroundworker class. It uses the BackgroundWorker to calculate fibonaci numbers and updates a progressbar as it goes. http://msdn2.microsoft.com/en-us/library ...Show All
CharlieCSharp CanConvertTo
This code: Public Overloads Overrides Function CanConvertTo( _ ByVal context As ITypeDescriptorContext, _ ByVal destinationType As Type) As Boolean If (destinationType Is GetType(SpellingOptions)) Then Return True End If Return MyBase.CanConvertFrom(context, destinationType) End Function from this page doesn't make any sense to me. We're talking about converting between a string and an object. The ConvertTo function relates to conversion from the object to a string. The CanConvertFrom and ConvertFrom functions relate to conversion from a string to the object. So why does the CanConvertTo function also relate to conversion to the object Surely you're looking for the destinationType to be a string here ...Show All
Andreas Ohlund app.application Publish file
Hi, I know this has already been posted, but I need to get it clear in a simple way. The 'app'.application file is created when you publish an application to a web/ftp server, along with other files. The publish.htm page shows a button linking to the 'app'.application file and I can correctly install it, but a friend of mine (and maybe many more people too) get the 'app'.application file contents displayed in his browser. He has the .NET Framework 2.0 installed (installed automatically with VB 2005 Express), and I would like a simple solution to resolve this issue, without reinstalling .NET 2.0 (unless you are sure it resolves it). I also heard that it has to do with MIME types , but I'm not too familiar with this term to unders ...Show All
mikaelangelo Custom control and P/Invoke
I would like to make battery ramainder control in mobile device especially pocket pc 2003 using Microsoft Visual Studio .NET 2005. So I made a class named 'BatteryRemainder' inherited from Control and periodically update battery status using Win32 API 'GetSystemPowerStatusEx' But there is some problem in Visual Studio designer. When I embedded my control into my form, the feature of my control is displayed as rectangle with text 'namespace.BatteryRemainder.controlname'. But when I delete two lines [dllimport ...] public static extern int GetSystem.....() It looks quite well. In my opinion there may be some problem in safe code and unsafe code. Below is my code lists. How do I solve it Your a ...Show All
lilshorty Issue With Database Connections for Deployment
Hello! I am not completely new to VB, but I am fairly new to Windows Forms and Applications. I typically do ASP.NET web programming. I have created a Windows Application in Visual Studio 2005. The Application uses a Microsoft Access Database for storing all the data. During the development of this application I used a specified file path for the location of the database. However, I am now experimenting with the deployment of this application and am finding it unexpectedly difficult to specify a location to be created on the end-user computer. Which means that I am having difficulty getting the app to connect to the DB after it has been installed. The only way I can find to deploy the site is through the Build menu using "Publish 'myap ...Show All
TA123 How to Remove ListItem from a ListBox
Hi friends when i try to remove ListBox item(ListItem) its giving error error : List that this enumerator is bound to has been modified. An enumerator can only be used if the list does not change. i have only ListItem objects in my ListBox and my code as follows foreach ( ListItem removeitem in listBox1.SelectedItems) { listBox1.Items.Remove(removeitem); } any help pls, Regards Ranadheer. Hi, You cannot remove the items in this way, since foreach statement is used to iterate through the collection to get the desired information, but should not be used to change the contents of the collection to avoid unpredictable side effects. You can do the same thing by whi ...Show All
averge joe Working with TreeView and ListView
Hi @ all ;) i have a tool, where is (like the Windows Explorer) on the left side a TreeView and on the right side a Listview. Now, when i click on a node the ListView shows correctly the right path of the Node. Eg.: C:\windows. Thats ok ;) But now my Problem: How do i open the right path in the TreeView, when i click an Item in the Listview I think it goes with ListView1.SelectedIndexChanged, but i don't how. I searched for it mor than 3 month *smile*, and no body can help me ! cu Alex Hi, Have you solved your problem Actually, the AfterSelect event can be implemented. And to retrieve the full path, you may use e.Node.FullPath. hi ;) something is going: My Prog starts with the Letter C: . ...Show All
Loki70 how can I open a file and save it in another location
Pls, I need to offer the possiblility to the user to open a dialog box to locate a file, so that he can save it in another location on the network What control and code sample can I use for both those needs Thank you I think you're looking for System.Windows.Forms.OpenFileDialog. You can find samples and details in MSDN at: http://msdn2.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx What I tried, I used OpenFileDialog to open my source file, then i put it in a string "myFileToSave" Then I tried to use SaveFileDialog to save that source file to a new destination, but I don t know in which propertyof my SaveFileDialog I should the fhe file that I want to save or its path ...Show All
StarPilot Taskbar item flashing
I am using VS2005 in a VB.Net 2 type application, and my main form has several buttons and functions which cause other forms within the same application to open. If the main form does not have focus (either out in another application, another form within the same application is open, etc) and information on the main form is updated, how can I get the item in the taskbar that represents my main form to "flash" for a period of time I am presuming I can take the same concept of the "solution" for this and apply it to the other forms within the applcation. Example, main form open, another form opens to display information, and remains open. The user then selects the main form, the second one gets updated information, an ...Show All
Syed Mazhar Hasan Populating Form Dynamically Via DataColumn Name
I am frequently frustrated with having to drag textbox controls to a form, name them, align them, and bind each one individually to data. Now, I am trying to do this dynamically. I would like to use the TableLayoutPanel, loop through my dataset, and create the label names and textbox via the DataColumn.ColumnName. I have the following thus far but am getting the error: "Cannot convert type 'char' to 'System.Data.DataColumn': oleDbConnection1.Open(); DataSet ds1 = new DataSet(); oleDbDataAdapter1.Fill(ds1); DataTable dt1; dt1 = ds1.Tables["paintsys"]; //for each field in ds1, create a label and textbox int i = 0; foreach (DataColumn dcCurrent in dt1.Rows.ToString()) { Label myLabel = new Label(); m ...Show All
tee_user5 passing parameters to tableadaptor from code
Hi All, I have an app that updates an Access Database. I created an Update Command using the VE designer. In the filter column for the datacolumn I need to select - its an ID column - I wrote =rowindex. This is a variable that needs to be retrieved from code. Is there a way to pass this info from the application at runtime to the tableadaptor Or must the Update command be built from within the code using querybuilder Thanks in advance. Jeff jeffg90 wrote: Is there a way to pass this info from the application at runtime to the tableadaptor Yes, you can build the string with the neccessary criteria (see next question) or you can use the select method to filter the table je ...Show All
Andre Odendaal Binding to a custom property instead of a control
Sometimes I need to bind one of the properties from a data source to a control that does not support data binding. Previously I used to do this by adding a hidden control that I could bind to, and then handling the appropriate "changed" event from that control to set the desired property on my non-bindable control. It would obviously be cleaner to do this with a custom property on my form (instead of the hidden control), but I can only get this to work one way. i.e. the data source is setting my property which is reflected in my control. But if I make changes to the control, it sets the custom property, but this is not reflected back in the data source. Here’s some sample code: ' Add my custom property ...Show All
Fahad349 Datagridview multiline TextboxControl - after input
Hi Gurus, i have a problem with my multiline Textbox in a Datagridview. I have developed a own DataGridViewTextBoxCell (class inherits from DataGridViewTextBoxCell ), which allows the multiline input. During the input it is possible to write the text in mulitlines - but after end editing - the the crlf will displayed as rectangle - so the result is displayed in on row. I think I have to override the paint method from the DataGridViewTextBoxCell, but it seems it is to difficult for me - it would be nice, if anyone can help Paul The datagridview's textbox column does do multilines. Set the datagridview's AutoSizeRowMode to AllCells. The column's autosize mode to AllCells and the Column' ...Show All
Ejele012 Visual Studio Deployment Question
Hi, sorry if this is in the wrong place but there is no separate "Visual Studio Deployment" forum. Anyway, I was wondering if the "standard" edition of Visual Studio comes with full MSI deployment capabilities. The Visual Studio 2005 Product Line Overview says "yes" next to deployment tools, but when reading reviews of the differences between standard and pro everyone says standard only comes with ClickOnce. Can anyone confirm that the standard Visual Studio comes will the full deployment tools and not just ClickOnce Thanks a bunch, Daniel Yup, Setup projects for building .MSI's are in the Standard SKU. I think marketing got some wires crossed, but I just checked our build ...Show All
