Topics
-
-
- Administrators
- 8 replies
- 12.4k views
Hello ' On a form i've got these components: datagridview dataset bindingsource FillbyToolstrip i've configured all things and it works. But i like to add a button to the form, and if i press it that there is executed another query. So... is it possible to change the FillByToolstrip with a code? so i can use another SQL Query ? thanx, Jelmer
-
-
- 14 replies
- 35.8k views
Just as the subject line said... How do I reomve the duplicate items from a combobox... Example; If I had 4 items such as Apple Apple Pears Pears I want it to read after removing Apple Pears
-
- 5 replies
- 1k views
I've got some old VB code that I am trying to convert to C#. The old VB code uses CreateObject, which is not supported in C#. I've been doing some reading on how to get information, but I just can't seem to get everything I need to get the C# application to compile. Maybe someone here can see what I'm missing. Here is the old VB code: Sub CreateLabel() Dim objDoc As Object = CreateObject("Lblvw.Document") objDoc.Open("C:\Temp\LabelView.dat", True) Dim LastError As String = objDoc.LastError For Each FLD As Object In objDoc.LabelFields Dim str1 As String Select Case (FLD.Name) Case "CustPartNum" FLD.Value = FLD.Name …
Last reply by Nate Bross, -
-
- Administrators
- 1 reply
- 878 views
Is it a bad idea to use expose LINQ to SQL objects as data objects? It exposes the presentation layer directly to the database, even if it is through a class, that class directly relates to the database fields, etc which is supposed to be bad, right? If that is the case, then what use is LINQ to SQL doing the busy work of creating my business object classes for me? Thoughts?
Last reply by PlausiblyDamp, -
-
- 1 reply
- 838 views
:mad: I have some .NET code in one folder e.g. c:\wwwroot\..\mycode\. Then I have the same code in another directory (copied across to) e.g. c:\wwwroot\..\testcode\. Why is it that when I run the 'testcode' my internet explorer address bar says 'http://localhost:2319/mycode/' (and not 'http://localhost:2319/testcode/') I know in Tools > Options > Projects and Solutions (General) it says it's linked to my folder in the mydocuments\visual studio 2005\..\projects\. Why? How do I make it so that it only runs the local code files? Can this be dynamic? If answered: Is this worthy for the sticky? Any clues would be much appreciated. Kind Regards, g00…
Last reply by g000we, -
-
- Administrators
- 2 replies
- 2.7k views
Which of these methods do you use, and why? namespace some.longish.winded.name.space { class something { } } or namespace some { namespace longish { namespace winded { namespace name { namespace space { class something { } } } } } } Clearly the second approach leads to much greater level of indentation, which could be annoying on a small screen. What advantages do you see to one over the other?
Last reply by Diesel, -
-
-
- Administrators
- 4 replies
- 963 views
I have the following code: Select Case localType Case "Relations" i = 0 For j = 0 To Me.listRelations.Count - 1 li.SubItems.Add(New ListViewItem.ListViewSubItem()) li.Text = Me.listRelations.Item(j).Name i += 1 li.SubItems(i).Text = Me.listRelations.Item(j).Relation 'Copy listview item, attempt to store into array. li_copy = TryCast(li.Clone(), ListViewItem) If li_copy Is Nothing Then MessageBox.Show("There was an error inserting record " & _ …
Last reply by Nate Bross, -
-
-
- Administrators
- 3 replies
- 1.2k views
I've got one Context Menu named mi_EasterEggs with three (3) menu items: * mi_FontArial * mi_FontCourier * mi_RawData All menu items have their Visible properties set to False. This context menu is included in 1 ListView control and 1 TextBox control. When one of these controls is right-clicked (to bring up the Context Menu), I want to make menu items viisble depending on what item was right-clicked. I tried this code, but the sender is always the mi_EasterEggs Menu Item: private void mi_EasterEggs_Opening(object sender, CancelEventArgs e) { if (sender.Equals(ListView1) == true) { mi_RawView.Visible = (0 < ListView1.Items.Count); } else { mi_…
Last reply by joe_pool_is, -
-
- 1 reply
- 807 views
I am looking into getting a third party graphing control to dispay graphs and charts on a webpage. I have used .NetCharting in the past. I liked it. I have looked at Dundas, and think it looks cool. My needs are simple, pull some data out of a sql2005 database and then build a chart based on that data. I use .Net 3.5 Does anyone have suggestions about a solid product?
Last reply by Nate Bross, -
- 1 reply
- 1.2k views
[source] #include "stdafx.h" #include <windows.h> #include <windowsx.h> #include <d3d9.h> // define the screen resolution and keyboard macros #define SCREEN_WIDTH 640 #define SCREEN_HEIGHT 480 #define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0) #define KEY_UP(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1) // include the Direct3D Library file #pragma comment (lib, "d3d9.lib") // global declarations LPDIRECT3D9 d3d; // the pointer to our Direct3D interface LPDIRECT3DDEVICE9 d3ddev; // the pointer to the device class // function prototypes void initD3D(HWND hWnd); // sets up and initializes Direct3D void render_fra…
Last reply by Nate Bross, -
-
- Administrators
- 9 replies
- 6.3k views
Hi Everyone I have been working with c# for only around 2 weeks so sorry if I don't explain the problem very well I am trying to pass a value from one aspx page to another (topallowedsites.aspx is the posting page and topallowedsitesdetails.aspx is the receiving page) In topallowedsites.aspx I have a gridview which pulls data from my database to show external websites that have been used by internal network users. I want to pass the value of the 'domain' column to the topallowedsitesdetails.aspx page by clicking on a link in a HyperLinkField that is in the same row as the 'domain' value column Please see below gridview code; [highlight=asp] <asp:gridview …
Last reply by PlausiblyDamp, -
-
- 0 replies
- 3.9k views
Our application does a complex mail merge operation on Word 2007 documents. I call it complex because based on the data, different word documents are used as templates (for instance, government regulations require slightly different wording in different states, also, some phrases are required to be bold and of a larger font for other states, etc. Also, certain customers based on the status of their accounts get completely different letters) So the base word document is dependent on the data. Also, our company took over another company but due so some state level agreements, we have to maintain the appearance of just managing the customer accounts for the other compa…
Last reply by joecasa, -
-
- Administrators
- 1 reply
- 699 views
Well. I'm new to .net.. And I'm stuck up with something.. I'd like to add a new tab page in vb.net using sstab property. When i write the code, the new tab page is displayed but its blank. I'm unable to get any controls/textboxes/spreadsheets etc on the new page How do i go abt this? Cheerz
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 2 replies
- 966 views
This is the code I entered according to websites I found some info: ======================================================== If ((toCheckBold = False) And (toCheckItalic = False)) Then lblToChange.Font = New Font(lblToChange.Font, FontStyle.Bold) ElseIf ((toCheckBold = False) And (toCheckItalic = True)) Then lblToChange.Font = New Font(lblToChange.Font, FontStyle.Bold) lblToChange.Font = New Font(lblToChange.Font, FontStyle.Italic) ElseIf ((toCheckBold = True) And (toCheckItalic = False)) Then lblToChange.Font = New Font(lblToChange.Font, FontStyle.Regular) ElseIf ((toCheckBold = Tr…
Last reply by Nate Bross, -
-
-
- Administrators
- 1 reply
- 1.8k views
Hello friends, I have 3 questions about ComboBox, anyone can help me, please? :) 1. Although I have enabled AllowDrop property of ComboBox it does not allow me to drag and drop files into ComboBox. Why? 2. Then should I process incoming files in the _DragDrop event, yes? 3. How can I get the Files.Count to get the number of dropped files? Thank you very much for helping me :)
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 2 replies
- 1.6k views
I like using store procedures because it allows me to specify what the format of my values are going to be ahead of time however, the SQL command SELECT GetDate does not have this option. Below is how I solved it, and I am looking for advice as to whether or not it is a good technique or if there is something more elegant: Particularly of interest: Do I need to cast the CurrentDateTime to a DateTime object, or should the SqlDataReader already be returning it in this format? DateTime sqlTime; try { m_db.Open; using (SqlCommand cmd = new SqlCommand("SELECT GetDate AS [CurrentDateTime]", m_db)) { SqlDataReader r = cmd.ExecuteReader(); while (r.Read() == true)…
Last reply by joe_pool_is, -
-
- 3 replies
- 4.1k views
How do I check for an uninitialized DateTime? If I start my code by simply declaring a DateTime value: DateTime time1; Then the compiler gives me the error that the field was uninitialized. Seting the DateTime value to null is not legal though, it seems: DateTime time1 = null; How am I supposed to be initializing a DateTime value?
Last reply by joe_pool_is, -
-
- Administrators
- 1 reply
- 10.2k views
I have a grid I created that will have a series of 13 checkboxes and then information in the cells to the right of those checkboxes. That is all set up and working, but to keep the checkbox columns a nice looking width I had to abbreviate the column headers down to one and two letters. It looks nice, but if you don't know what the headers are short for it is rather confusings. I added tooltip popups for the checkbox columns, for easy reference, but my boss said another header row above the existing one that would help explain things would be helpful. I've been googling for an hour and I found others who have posed this question, but noone ever received an answ…
Last reply by PlausiblyDamp, -
-
- 3 replies
- 3.6k views
Hi all, i found some code retrieve form's caption but i need to get text from a textbox or label on a windows form which i want. how can i do this ? for example how can i get caption 5 on button on windows calculator or any text on a form ???:confused: thanks...
Last reply by Nate Bross, -
- 3 replies
- 5.8k views
Hi All, I have been writing a little application that watches my documents and nay files/folders that are changed/created/deleted/renamed are copied to the main server. As a back up process it seems to work great. I have subclassed the FileSystemWatcher and put all of the logic in there and in my form all I need is: fileSystemWatcher fsw = new fileSystemWatcher(true, true, true, true, @"\\source\", @"\\destination", true); fsw.ShowProcess += new fileSystemWatcher.ShowProcessEventHandler(ShowProcess); fsw.SynchronizingObject = this; The code is working great with one exception. If I am doing a big process, let's say copying 1GB of music the UI is frozen as the U…
Last reply by Nate Bross,
-
Who's Online 0 Members, 0 Anonymous, 50 Guests (See full list)
- There are no registered users currently online