Topics
-
-
- Leaders
- 1 reply
- 1.4k views
:confused: Could somebody tell me how to make the mouse cursor automatically move to the active control. I have found this difficult to do when there are several forms open in different locations of the screen. Thanks for your time.
Last reply by Iceplug, -
-
-
- Administrators
- 1 reply
- 730 views
I am new to vb.net and really need a bit of advice. I am in the process of writing an application in vb.net. I am storing relavent information in public variables as this is the only way that I have found to access the information between forms. I am holding things such as username, access writes, department but NOT password as this is not required again after login. But there are a few things I need answered. 1) Is there a better and more secure way of doing this?? 2) If I wanted the exe of the application to be loaded only onto a server will these public variables be overwritten by the latest person to login to the application?? Cheers Simon
Last reply by PlausiblyDamp, -
-
-
- *Experts*
- 4 replies
- 904 views
When i first started to use VB.NET i wrote a large program using VB6 skills (not knowing about classes), i am just trying to convert this program into 'proper' VB.NET language. This code below allows me to enter data into the fields like this: Fields_OTT(1).FieldName = "Jay" Fields_OTT(2).FieldName = "Tom" Fields_OTT(1).FieldName = "Peter" This keeps the same structure for each of the three. Public strSettings As String Public strSeqNo As Integer Public intComPort As Integer Public strDestinationDirectory As String Public strJournalDirectory As String Public Structure StructField Public FieldName As String Public FieldStartPo…
Last reply by Jay1b, -
-
- 0 replies
- 3.4k views
Does anyone know how to color the scrollbars of the ListView in C#.NET? I had done it in VC by hooking the "WM_CTLCOLORSCROLLBAR" message in the window message function :D . I have tried it in C#.NET like this: private const int WM_CTLCOLORSCROLLBAR = 0x0137; protected override void WndProc(ref Message m) { if(m.Msg == WM_CTLCOLORSCROLLBAR) { IntPtr l_nHdcScrollbar = m.WParam; Graphics l_oGraphics = Graphics.FromHdc(l_nHdcScrollbar); l_oGraphics.Clear(Color.Blue); } base.WndProc (ref m); } But its not working. I have also tried to debug it. While execution there are a lot of messages coming but not "WM_CTLCOLOR…
Last reply by sohaibi, -
- 0 replies
- 1.1k views
I'm just having a play about with XML as I've never used it before and I've encountered a problem that I can't seem to figure out. I've got a simple XML message as a string and convert it to a StringReader stream. I then try to pass that to a DataSet using the ReadXML method, but it gives me a System error. Reading the same message from a file seems to work fine. I've attached the code, so if anybody can shed any light I would greatly appreciate it. Regards, Mark J. XMLTest.zip
Last reply by mjohnson3091, -
- 2 replies
- 1.4k views
Hi... I have a little Design-time collections property grid display question... I have a class that inherits from CollectionBase. This class is part of a UserControl, returned from a Public Property. How do I make it appear on the Property Grid, at design time, so I can edit it's items on the Object Collection Editor? Note1: all the items on this collection have the same type. Note2: I can make it a TypedCollection but then I will loose, for example, the Add & AddRange methods. Thanks. Alex :p
Last reply by AlexCode, -
- 0 replies
- 792 views
Hi to all, i am currently working in a platform that is sensible to browser setting (i caanot change this because the platform is not ours) so i need to check the settings of the current browser so i can send errors to the screen. What i need is check to the level of security, the temporary files settings, cookies and all the things that can stop the application from working. so how can i get the clients setting? thx
Last reply by rfazendeiro, -
- 2 replies
- 1.5k views
i want to insert a line in a menu context. how can i do this? in VB it was the .BeginGroup attribute. a cut from my code how i insert the menuitem : contextMenutreeview.MenuItems.Add("Alle Unterbilder selektieren", new System.EventHandler(this.SelectAllChildren)); Thx in advance :)
Last reply by ThienZ, -
-
- Moderators
- 2 replies
- 5.1k views
i fill a strongly typed dataset from excel, and then i write the sourcefilename, source sheet, and rownr into the columns filename, sheetname and rownr in the dataset. however excel takes takes the empty rows too into the dataset. like if the sheet has 100 active rows, but actually only the first 10 rows has values, the oledbdatadapter fill the dataset with these 100 rows and all the "cells" in the dataset in row 11-100 has (Null). i have some ideas : - before i write the filename, sheet, and rownr, i filter all the empty rows manually. i go through all rows and for each row i check the cell. if they are empty i delete them. but then i don't know anymore which row …
Last reply by ThienZ, -
-
I have want to creata an array of objects but it seems to generate errors that I'm not familiar with. Dim obj() As Object 'A Class obj = new Object("Hello", 2) 'Default Constructor New(String, Integer) It returns an error of: An unhandled exception of type 'System.NullReferenceException' occurred in Program.exe Additional information: Object reference not set to an instance of an object. Any idea what did I do wrong?
Last reply by snarfblam, -
-
- Administrators
- Leaders
- 3 replies
- 5.5k views
I'm working on an application which requires me to take the items that a user selects from a multi-select ListBox, and put them into another ListBox on another form. I basically just want to add the selected items in the ListBox to an array, and then call on that array to fill the ListBox on the other form. I've looked all around this site and Google for how to do this, and I all I can really find is how to do it in VB6, I need to know how in .NET. Thanks!
Last reply by snarfblam, -
-
-
- Leaders
- 3 replies
- 1.3k views
HI!! Let say I have an object and this object has a property of the type short. How I can check if someone set this property? When i try to check this like that: if( myObject.MyShortProperty != null ) { } I get an null reference exception. How I can check this without a null references exception? regards, gicio
Last reply by snarfblam, -
-
-
- Moderators
- 2 replies
- 1.1k views
I'm like realtively new to server side wbe designing, in a traditional html site, you'd just create the layout and just use that as the template and copy and paste the html file and change it based on the page. But i know that in ASP.NET you can allow the layout to be shared and consistent amongst all pages, or some people just have one single .aspx file and it can change so differently. Can anyone point me to the right topics i need to read about in order to achieve that? Thanks.
Last reply by Robby, -
-
- 1 reply
- 2.9k views
If I compile and run a program in C++ it runs off the stack unless I allocate memory in the heap and load the rest of my code there correct?
Last reply by HJB417, -
- 1 reply
- 1.7k views
Hello, I'm having problems with a databound dropdownlist in a user control i'm creating. I have a user control that contains a textbox, a checkbox, a dropdownlist, a button and a repeater. This user control is inside a PlaceHolder control. Using the textbox, checkbox and dropdownlist to specify criteria the user presses the button to search a list of products the result of which are bound to the repeater. The items in the dropdownlist is databound from a database. But when the search button is clicked the information in the drop down list is lost. My Code...... My ASPX..... <td class="content"> <asp:PlaceHolder id="contentPanel" runat="server"…
Last reply by Superfly1611, -
- 1 reply
- 779 views
i created an object and made it as a property of the winform. then i add a usercontrol which has the same property. what should i do so that i avoid to create a "New" method to accept the object, "passing" the object visually in the usercontrol's property window? (currently, that property appears grey in the property window...) thankx.
Last reply by Mister E, -
- 1 reply
- 798 views
HI! Im doing a project where at administrator level i have a datagrid with all the objects of a certain class with the option of defining some of the values of the objects. the datagrid is real simple only has 5 fields and the administrator may define two of them so i decided to havo on the data grid two text boxes for definig that values. Now the problem is that i am using a imagebutton to update the item's but... how do I define N imagebuttons? on codebehind how will I do to define the function for each imagebutton?? or is that a way to have multiple buttons using only one function?? and if so how do i distinguish wich item has to be updated? can so…
Last reply by barski, -
- 1 reply
- 934 views
--Using [VS C#.NET]-- Given a datagrid [dgDisplay] that is populated by a dataset [dsValues]. Thing is dsValues has 11 columns total of which I only want to display 3 in my DataGrid [Columns: Name, ID, Address]. However if I just blindly bind the datasource it displays all columns with the header names from the Database. How do we customize which columns to display & what their headers are? (I want to define my own column names that are more used friendly)
Last reply by barski, -
I am new to c# and would like to know how I can read xml. I want to use xml for the options in my program. How would I read something simple like: <appsettings> <option>Option Value</option> </appsettings> How would I retrieve the 'Option Value'?
Last reply by PlausiblyDamp, -
-
- *Experts*
- 1 reply
- 893 views
--Using [VS C#.NET]-- I have created a structure (struct deviceInfo) that I use to fill a ComboBox (cbTask). So I create a few instantces of deviceInfo and add them to cbTask, I am doing this because the stuct holds other information that on .SelectedItem I wanted to retrieve, question is I have no clue how... It works great in my ComboBox but then how do I access the struct when getting the value? ::CODE:: struct deviceInfo { public int nDevice_ID; public string sDevice_Short; public deviceInfo(int pnDevice_ID, string psDevice_Short) { nDevice_ID = pnDevice_ID; sDevice_Short = psDevice_Short; } } I create an instance of this struct and …
Last reply by Nerseus, -
-
Who's Online 0 Members, 0 Anonymous, 88 Guests (See full list)
- There are no registered users currently online