Topics
-
-
- Administrators
- 4 replies
- 2.3k views
I have this code which works great var newList = new Object(); newList = from Task t in FoundTasks where t.TaskStatus.Contains(sStatusFilter) && t.TaskType.Contains(sTaskFilter) select t; // bind the result to the data grid dgvMyTasks.DataSource = newList; dgvMyTasks.DataBind(); The issue is that if I change the properties of dgvMyTasks to allow paging, I get the error "this object does not support server-side data paging" I have created this workaround, but I'm wondering if there is a better way: List<Task> newLi…
Last reply by Nate Bross, -
-
- 0 replies
- 1.3k views
Hi, I have a form that needs to display certain number of teams in full screen, the names and score of the team are stored in a list. i wish to implement a dynamic subrutine that will add the info n the fly as it is edited in main form. i have been told that the best way is to add the content to table layout panel. my problems are this: 1. how to dynamicaly add control, say label, from one for to the table layout of the other form. 2. how to set the parameters for the cell in which i wish the control to appear. Is there a better way to do this... thank You
Last reply by aslezak, -
- 0 replies
- 624 views
Hi, I need a lot of help with this issue: I am developing a simple custom control. The control has a custom property. This custom property contains another custom property. I am not sure what is the right way to achieve it. The attached image says what I need to do. When I change the width or color property at design or runtime, I can´t capture the change - it simply doesn´t update. The code I am using looks like this: Public Class MyUC Private _Circle as MyCircle Public Property Circle() as MyCircle Get Circle = _Circle End Get Set(ByVal value As MyCircle) _Circle = value mylabel.Text = __Circle.Border.W…
Last reply by bufer24, -
-
- Administrators
- 8 replies
- 1.6k views
When I run the following code I get a message that the Parent class is not marked as serializable. This is very annoying since I'm not trying to serialize the Parent. Is this is a bug in Visual Studio? How do I get around it? Imports System.Runtime.Serialization.Formatters.Binary Imports System.IO Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim FileStream As Stream = File.Create("C:\abc.abc") Dim serializer As New BinaryFormatter With serializer Dim Child1 As New Child Dim Parent1 As Parent = New Parent(Child1) .Serial…
Last reply by rbulph, -
-
-
- Administrators
- 4 replies
- 2.3k views
I'm having a little problem saving a image to disk. I get the image from a url, and want to save that to disk. So i just do a HttpWebRequest to the image url, get the stream and convert it to an image and save to disk. This code here is working for jpg's but its does not work with GIF. also there are somethings that would like to change. the code is this: public static String HttpRequest(String serverImgURL, String physicalPath, String extention) { String siteImgURL; HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create(serverImgURL); HttpWebResponse loWebResponse = (HttpWebResponse)loHttp.GetResponse(); E…
Last reply by rfazendeiro, -
-
-
- Administrators
- 2 replies
- 1.2k views
I've got a ListBox on my form with lots of data in it (14000 entries). I have to put a search field on the form. As text is entered into the search field, I want the ListBox to remove entries that do not match. Sounds simple enough, but it is really taking a long time! I started running it before opening my web browser, and now (with typing this message, I'm about to go over and hit a breakpoint) it is at ... 12687 entries, and all I've entered is one character into my filtering TextBox. Why is my version taking so long? What can I do to speed it up? private void Filter(string value) { for (int i = ListView1.Items.Count - 1; -1 < i; i--) { if (ListView1…
Last reply by joe_pool_is, -
-
-
- Administrators
- 3 replies
- 1.4k views
Hi, I had some code that sent a simple email using SmtpClient in C# + VS 2005. We've now upgraded that server to the 64 bit version, and a simple test using SmtpClient fails. I've confirmed that: 1. the same .exe works successfully from a 32 bit machine 2. the 64 bit server can ping the mail server dns alias successfully. Any ideas why this wouldn't be working on the 64 bit machine? Below is the error when run from a command prompt. Unhandled Exception: System.Net.Mail.SmtpException: Failure sending mail. ---> S ystem.Net.WebException: Unable to connect to the remote server ---> System.Net.S ockets.SocketException: No connection could be ma…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 3 replies
- 1.1k views
I have this simple code to execute an SQL query Dim PretragaAdapter As New mysite.DataSet1Adapters.PRETRAGATableAdapter() PretragaAdapter.DeletePoDatumu() It deletes some rows from a table. When I put this command in a button everything works just fine, and rows get deleted. But I want to put it in Global.asax file in Session_end section, so everytime an session ends, this command gets executed The problem is that this command doesn't work in Session_end event. I know a session lasts for about 20min, but after couple hours I still don't see any changes in my database.:confused:
Last reply by ttkalec1, -
-
- 2 replies
- 3.8k views
I am trying to find a way to correctly use Regular Expression (RegEx) to decompose a specific formatted string into 3 values, here are 3 samples of the strings in question. "1 CASH 1.00 $ 0.21 $" "1 CASH 1.50 $ 0.22 $" "1 CASH 10.50 $ 100.50 $" .. etc .. This format will never change, my goal is to be able to automatically decompose each string into 3 main fields which represent 1=Type (Cash), 2=Value (1.00), 3=Value (0.21). So far I was able to generate the following regular expression: ^[0-9]+[ ]+(.+)[ ]+[0-9]+\.[0-9]{2}[ ]+\$[ ]+([0-9]+\.[0-9]{2})[ ]+\$ This splits/decomposes my string into "CASH…
Last reply by Borix, -
-
- Administrators
- 4 replies
- 1.8k views
Firstly i am sorry if this is wrong section. I have only just switched over from vb6 to vb.net(was beginner at vb6) & am trying to look for some source to learn from on file scan. I wont to be able to scan say the c:\ for .jpg or something then have it listed in a list box, Then be able to choose to either delete selected file or the entier group. Thanks,
Last reply by Borix, -
-
- 2 replies
- 713 views
Has anyone ever tried to publish a VB.net application directly to Sharepoint? We are setting up a site that has all of our .exe's and .msi's and it would be great if we could just publish straight to SharePoint. Thanks!:o
Last reply by kservice, -
- 0 replies
- 8k views
Hi all, I am using the DataGridView_CellFormatting() event to format the values of the programmatically added values in a datagridview. Now, while everything else works, my stored procedure returns a column of BIT type. Automatically, it appears, the datagridview transforms that particular column's cells into DataGridViewCheckBoxCell's. However, in the CellFormatting event, I want some text to appear (like "Yes" or "No") instead of a checkbox. When I executed the following code, a casting error appears. So, how can I convert this checkbox column into a textbox column programmatically? [color="Blue"] Private Sub[/color] dgvAnkand_CellFormatting(ByVal sender [colo…
Last reply by Borix, -
-
- Administrators
- 1 reply
- 1.4k views
In VS 2005, when you create a User setting under Project Properties > Settings: [ATTACH]5622._xfImport[/ATTACH] Which creates an entry in the App.Config: [ATTACH]5623._xfImport[/ATTACH] Now when the application overwrites the value of each of these keys, it doesn't write the value back to the app.config (because it needs to keep track the value for each user of the application seperately). I am guessing that it stores it in the registry somewhere, but a registry search didn't yield a result, which makes me think maybe its encrypted. Does anyone know where in the registry these values are stored? Thanks, Pete
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 7 replies
- 1.3k views
Hello, It seems to be strange, but in a loop, when I add some text to the text box like this: For X = 1 to 100 TextBox1.Text = TextBox1.Text + "Text" + vbNewLine Next However, the scroll bar will stay at top and I can only see the first few lines of text box, even if I move the scroll bar to down, it will jump back to top as soon as text inside the text box changes. I want to change this scenario, so scroll bar will stay at down so I can see the last lines of text inside text box. I don't know how can this be done, but I know it's possible because I've seen some applications like this! :confused: Thank you.
Last reply by Erel, -
-
- 1 reply
- 1k views
Hi, I have just wrote some web services which we are using currently at my place of work. I have just put a MSI together that will install this service to a machine and tested it on a machine in the office and it works well. My boss is going on a business visit to one of our plants in the middle east and will be installing this web service via the MSI. As this will be running on a machine that we have no access to, the way of updating this service is by emailing MSI's to this plant which is not a problem. I thought it was possible top update web services by uploading them to a URL and the remote web service would then download the new web service automatica…
Last reply by digioz, -
- 2 replies
- 2.3k views
I have a requirement to transfer files to a file server using sFTP. Does .Net 2.0 provide any features or classes to implement this? Thanks in advance for help.
Last reply by digioz, -
- 3 replies
- 8k views
Is there a simple way to change the border color of a button? I have chosen the Flat style and the border color is black. I would like to change the black to a lighter color.
Last reply by Jaxbot, -
- 0 replies
- 2.8k views
Hi. I would like to record a sound from the Stereo Mix, that is, record what my system plays. Ok thanks bye.
Last reply by Jaxbot, -
-
- Administrators
- 10 replies
- 3k views
Hi I redesigned my application a bit to be more flexable. Since sometimes I need a different UI to start up or no UI at all. So I thought I choose a normal class as startup and initialize the needed UI from there. To do this I had to change the application type to "Console Application". This worked but everything looks Windows 98 style. No I'm worring that even if I fix this that maybe there are some other issues changing to "Console Application" which I might only notice later. So I'm starting to wonder, is there a way to select "Windows Froms Application" and select a non-form class? (I'm using Visual Studio 08, VB.NET)
Last reply by PlausiblyDamp, -
-
-
- Leaders
- *Experts*
- 2 replies
- 1.9k views
I have made my own Textbox class (with the standart .NET textbox inherited). I added some properties etc.. Now I can select my textbox in the Controllist and put them on forms and also set the properties I created, which works fine. But some of the properties change other properties. For example: If I set the TextInfo property (Is displayed when there is no text and disappears when the TextBox is focused), the property also sets the Text property in designer mode. The program hasn't even run once. Now if I run the program it is like I would have set the Text & TextInfo property to the same value, although I only want to set the TextInfo property at startu…
Last reply by snarfblam, -
-
Who's Online 0 Members, 0 Anonymous, 52 Guests (See full list)
- There are no registered users currently online