Topics
-
-
- Administrators
- 0 replies
- 8.6k views
Just a quick example of how it is possible to create a custom textbox control in VB.Net. It exposes a property to define allowed content via an enumeration, raises an event on invalid entry and also handles programatic assigment and attempts to paste invalid data also. Zip also includes a sample form showing the control in action (or lack of action) CustomControl.zip
Last reply by PlausiblyDamp, -
-
- 1 reply
- 1.2k views
We are using some POPUP windows in our webform(.aspx ) When the user clicks on a button say "ADD NEW " button will open a popup Child window where user can type and save records. Now my problem is if the users browserSetting prevent POPUP How can I alert the user that a popup window is blocked and How he can Enable that POPUP Window.So I wanted to detect whether browser settings prevents POPUP window and if so I want to give instructions to the User to enable it. Or Do you think it a good idea to use popup windows ?Is there any good ideas to Solve these kind of problems :confused: Thank you very much for listening to me
Last reply by ashutosh9910, -
- 0 replies
- 1.9k views
Okay, in C# 2.0 I'm having trouble figure out how to close down a handle properly when it has timed out: //Invoke delegate with callback IAsyncResult iar = write.BeginInvoke(format, arg, callback, null); //Give it 30 seconds to complete iar.AsyncWaitHandle.WaitOne(30000, true); //If it hasn't completed, terminated the call if(!iar.IsCompleted) { iar.AsyncWaitHandle.Close(); } else { //Properly clean up write.EndInvoke(iar); } So after closing the handle anything in the delegate that is currently executing finishes executing and the system still tries to fire the IAsync delegate (callback) which generates an error because the wait handle has been closed. …
Last reply by bri189a, -
-
- *Experts*
- 2 replies
- 3.5k views
Is there a way to add checkboxes to a user-defined collection of checkboxes similar to the concept below? ControlCollection ctrlWeekday = {chkMonday, chkTuesday, chkWednesday, chkThursday, chkFriday}; ControlCollection ctrlWeekend = {chkSaturday, chkSunday}; ControlCollection ctrlAllWeek = {ctrlWeekday, ctrlWeekend}; tia, flynn
Last reply by bri189a, -
-
-
- *Experts*
- 2 replies
- 939 views
Hello, I have a table with 3 foreign keys in it. My question was: should I create a single covering index on the 3 FK or I should create 3 separate indexes ? Thanks
Last reply by bri189a, -
-
- 3 replies
- 1.4k views
I am looking for a fast, easy way to list all of the networked computers (and to only list those that are avaliable would also be nice). Please Help! (vb.net 2005)
Last reply by bri189a, -
-
- Leaders
- 1 reply
- 2k views
Hi, I am experiencing a problem that I cannot resolve when I use DirectX and GDI+ at the same time in a user control. I have a background drawn with DirectX and something drawn in the foreground with GDI+. All drawing is handled in the controls OnPaint function. When the form with the control is made visible everything is as expected. Now imagine that, while the form is up, you change focus to a different program running positioned so that it occupies half of the form with my drawing in it, dividing it into two regions, A and B, A being visible and B is hidden from view. The visible part, A, still contains both foreground and background of my drawing while the form …
Last reply by snarfblam, -
-
-
- Administrators
- 2 replies
- 923 views
Hi, I'm new to all of this - vb, .net, xml, etc. In fact the last programming I did was about 10 years ago. So please forgive any noobie-ness. I'm using vb in vs 2005, and I want to read in xml files, validate them against a schema, and insert the data into a sql server express database. The files are quite large - 20-50MB, and I'm told could get as large as 100MB+ Here's my questions: Should I load the xml into a xmlDataDocument / dataset? Will it work ok with such large files? If I do this, Am I correct to think I'll need to create a new dataset schema which will define the relationships between the tables? Or should I step through the xml node by node…
Last reply by jgm, -
-
- 9 replies
- 932 views
Hi, I'm using a derived Serialports class for handling all talking/listening on a Serialport. This class is referenced from a number of other classes. What I basically want is that it handles each call separately, send a command, wait for a respose the given time and return the response or a timeout exception. If another object is trying to talk during this time it's put on hold, and if the second objects Write timeout time is reached while on hold it will get a TimeOutException too. One thing that complicates it is that the application have to move on as if no waiting is done. Another thing is I want it simple... try sResponse=myCommPort.CommandResponse(sCom…
Last reply by mskeel, -
- 4 replies
- 1.4k views
I have created a hyperlink column in my datagrid using the property builder of the grid. I have also bound that hyperlink to a field in my dataset. I would like to, based on the user's security, enable the link for some records in my dataset and disable others. How do I do this?
Last reply by ashutosh9910, -
- 3 replies
- 741 views
Hi, i have what i consider a silly problem..... I'm trying to find the data that is in a certain cell in the datagrid. I was using the below Label20.Text = dgDepartments.Items(2).Cells(2).Text Now i SWEAR that was working, i've come back to it after playing around with something else and its not working... however i am SO sure it was... Firstly, could someone please tell me whether that would be the right code to retrieve the data and put it into the label. Currently this doesnt work, and i cant for the life of me figure out why, it doesnt cause an error, it just displays blank. And yes there is data in the table even after allowing for arrays starti…
Last reply by Jay1b, -
- 0 replies
- 1k views
Hello, Can javascript detect where the mouse pointer is within an asp.net listbox? For example, can it detect if the mouse is pointing at a listitem and not at the empty space within the listbox?
Last reply by LiLo, -
- 6 replies
- 1.4k views
We can create transactions at the -->codebehind level by making use of SqlTransaction class or in then -->StoredProcedure level so that we can create save point and Rollback a transaction whenever a transaction fails Now my question is is there any specific advantage/disadvantage in using Sqltransaction at the Codebehind against using the same at the storedProcedure level. I am using C# to develop aspx pages and SQLServer2000 as database Which one is the best option and WHy ? :confused: Thank u all in advance
Last reply by Jay1b, -
- 2 replies
- 18.6k views
This is a real beginer question and sadly I have to ask it because I have been going around in circles for the part two hours... So, I want to be able to use the FAXCOMLib to play with sending faxes in C# (alternative to using Office Automation for faxing). I tried the following directly using FAXCOMLib; using FAXCOMEXLib; However in both cases I get the following error: frmMain.cs(8): The type or namespace name 'FAXCOMLib' could not be found (are you missing a using directive or an assembly reference?) frmMain.cs(9): The type or namespace name 'FAXCOMEXLib' could not be found (are you missing a using directive or an assembly reference?) So I assume I am m…
Last reply by progload, -
-
- Leaders
- 3 replies
- 1.8k views
Hi, Are there asp.net functions to find the cursor position of a mouse? Also, are there functions to find if the mouse cursor is within a listbox? A C# (windows forms) code sample is shown below: Listbox lb; //lb is a listbox Point cpos = lb.PointToClient(Cursor.Position); //find coordinates of mouse if(lb.ClientRectangle.Contains(cpos)) //if mouse cursor is within the listbox Are there any asp.net functions which can do the same as the above c# methods?
Last reply by LiLo, -
-
-
- Leaders
- 3 replies
- 1.8k views
Hello, I created a custom control which consists of a label and a listbox. The control has to have a public property called 'Items' which allows users to add list items to the control's listbox during design time. (much like the Items property of the vb listbox). I used ListItemsCollectionEditor to display the ListItems Editor window. I added some list items using the ListItems Editor window but the listbox did not display the newly added items at all. A code snippet is given below: Private listitems as new ListItemCollection <EditorAttribute(GetType(System.Web.UI.Design.WebControls.ListItemsCollectionEditor), _ GetType(UITypeEditor))> _ 'displays…
Last reply by LiLo, -
-
- 10 replies
- 2.3k views
I've dug around on the net for the best solution to this.. so far without much luck. I have a form, with a listview control on it. From another class, when a variable (arraylist) gets updated (arraylist.add), the next line needs to be code that will add the last value to the listview control on the form (from this class object). So for now I've simply added a Public method to the form itself. IE: Public void UpdateListControl. To get at that method from the class i'm casting a Form object. I'm not convinced this is the best way to do this.. ie: My understanding of Forms and business logic, was to always add as little extra code to the Form (code) , keepi…
Last reply by Cags, -
-
- Leaders
- 1 reply
- 776 views
For some reason the AxWebBrowser control displays multiple spaces incorrectly. A single space is fine, but 2 spaces together display as a single space and the  character. Is there a way to configure the AxWebBrowser to display spaces correctly, and if not, is there a way to alter the HTML so as to replace occurrances of double spaces with something else which will preserve the spacing of text?
Last reply by snarfblam, -
-
- 1 reply
- 1.5k views
Could someone please tell me what it the best to use? At the moment i just know how to do what i want in a datagrid, but i'm sure i could eventually figure out how to do it in either. What is the better control to use in most cases? For example is the datagrid in the process of being phased out? Thanks Jay.
Last reply by shaul_ahuva, -
- 1 reply
- 963 views
I've been looking at a 4GuysfromRolla article on datagrids which has been very useful. However they give an example of tieing a delete button column to the itemdatabound command which allows a custom Javascript message to be shown to the user. <asp:ButtonColumn Text="Delete" CommandName="Delete" ButtonType="PushButton" /> Sub dgDepartmentHead_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) ' First, make sure we're NOT dealing with a Header or Footer row If e.Item.ItemType <> ListItemType.Header And _ e.Item.ItemType <> ListItemType.Footer Then 'Now, reference the PushButton contro…
Last reply by shaul_ahuva,
-
Who's Online 0 Members, 0 Anonymous, 52 Guests (See full list)
- There are no registered users currently online