Topics
-
-
- Administrators
- Leaders
- 10 replies
- 2.5k views
Is there a way to add a new function (called URL for instance) to string class? I just need an easy way to process a string. Thanks.
Last reply by IngisKahn, -
-
-
- *Experts*
- 1 reply
- 622 views
my usual validation technique is to use an if statement eg if(textbox1.text =="") { label1.text= "you must enter a username"; } this is fine for a small form, but i have a form with many controls to be validated and that seems a very crude way to validate. what is the "textbook" expert way of validating controls like text boxes , check boxes, raido buttons...
Last reply by Nerseus, -
-
- 1 reply
- 771 views
i have a datagrid and want to populate it with data from text boxes. i have 3 text boxes, each representing a column in a table. when each has info entered into it, and the add button is clicked i want to add the data from the 3 text boxes to a new row in the data table, this data will then be saved to the database. how do i add the info from the text boxes to the datagrid?
Last reply by fguihen, -
- 1 reply
- 3.5k views
is there anyway for a windows form to know if it has already been visited, or is being viewed for the first time? you see, i have a form, on which i have a tab control. in the first tab i create a dataRow which takes data from the form and creates a customer. the user continues through various tabs until they enter all required data and save the record. however if the first tab is visited again for whatever reason, another row with the details is generated, and this causes an error as you cant have two identical users. any ideas around this?
Last reply by Denaes, -
- 2 replies
- 694 views
Given the following code: bool LogsDate (string sLogsDate) { DateTime dtNow = DateTime.Now; DateTime dtLogsDate = DateTime.Parse(sLogsDate); // Do the comapring of dtNow and dtLogsDate and return FALSE if they differ by more then 14 days, return true otherwise } [/Code] So my problem is really simple (as stated in the snipplet of code above) - I need to compare dtNow and dtLogsDate to determine if more or less then X (x=14) days have passed so I can return true or false as required. Any help/hints would be appreciated - thanks,
Last reply by Shaitan00, -
- 0 replies
- 1.2k views
I have the following: Case 12 'print PrintDialog1.Document = ThePrintDocument Dim strText As String = Me.txtComments.Text myReader = New StringReader(strText) If PrintDialog1.ShowDialog() = DialogResult.OK Then Me.ThePrintDocument.Print() End If I need a sub routine for printing different fonts (sizes), underline, bold. Private Sub ThePrintDocument_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles ThePrintDocument.PrintPage
Last reply by macupryk, -
-
- *Experts*
- 4 replies
- 6.4k views
It seems that when I load a System.Drawing.Bitmap object from a disk file using the constructor (the one that accepts only one string [the filename]), then try to do a .Save() on it passing in a string representing the filename, it will produce an exception if the filename I pass to Save() is the same one I used to load the bitmap. The exception raised is: System.Runtime.InteropServices.ExternalException Additional information: A generic error occurred in GDI+. If I pass in a different filename to Save() it works fine, or if I create a new Bitmap by just specifying width and height (not filename) then .Save() it, it works fine. What is perhaps th…
Last reply by nickhow, -
-
-
- Administrators
- 1 reply
- 975 views
:confused: My XML: <school_address>Main Office<br/>Mercian Avenue<br/>Cheltenham<br/>Glos.<br/>GL52 3ED<br/>United Kingdom<br/><school_address> My XSL: <xsl:value-of select="/root/school_address"/> How do I get the BR's to work? They just print out as normal, I actually want a line break. Thanks, Tim
Last reply by PlausiblyDamp, -
-
- 5 replies
- 829 views
I need examples of large well know applications (enterprise software) written in .NET that demonstrate it's scalability, portability, etc. and any articles that compare it to Java (in the good light). I have people who are under the impression that .NET is not scalable, and is not a good enterprise solution (or cabaple of being one), and that Java is the better technology (even though we have 0 java developers besides the little bit me and a few others know). I need, links, numbers, and articles that are cold hard facts (not opinionated). I'm googling but I'm not sure what to google for. Thanks for your help!
Last reply by IngisKahn, -
-
- Administrators
- 2 replies
- 513 views
Simple question here, is there a menu option for collapsing all the code segments, i.e the methods / regions. I ask because often I collapse them all manually switch between classes and when I go back they are all expanded again.
Last reply by Cags, -
-
-
- Administrators
- 8 replies
- 3.3k views
Hi, Ok I have an image, that is out of proportion to what I want. I want to resize that image, WITHOUT compressing it again, losing file size. Currently when I do this: Dim oImg As Image = Image.FromFile("C:\sourcefile.jpg") Dim oThumbNail As Image = New Bitmap(640, 480, oImg.PixelFormat) Dim oGraphic As Graphics = Graphics.FromImage(oThumbNail) oGraphic.CompositingMode = Drawing2D.CompositingMode.SourceOver oGraphic.CompositingQuality = Drawing2D.CompositingQuality.HighQuality oGraphic.SmoothingMode = Drawing2D.SmoothingMode.HighQuality …
Last reply by mike55, -
-
- 0 replies
- 2.1k views
Hi, I'm trying to make a TreeView inherited control that just displays an image in the background of the nodes. I tried overriding OnPaint/OnPaintBackground methods, BackgroundImage property, even making a parent picturebox underneath the control and setting SupportsTransparentBackColor style bit, but it seems that the TreeView control doesn't actually support that :) Opaque style also doesn't work. Did anyone come across such a thing? It could make the treeview look a lot cooler, combined with some nice node icons. Thanks, Janko Jerinic
Last reply by jjerry, -
-
- Leaders
- 3 replies
- 2k views
What is the strongest Draw over method there is? I am trying to make a clock go over one of my games becouse Parents get mad when i say "sory I didn't know what time it was" then they are all like "Well were you on the computer? it has a clock" and I am like "I was in a game fullscreen" Thus I decided to make a clock that is over My game! brilliant...I know... :p I think my game usses FullScreenExclusive to block lines...becouse when i tried plotting my lines GetForegroundWindow and that didn't work OBVIOUSLY... how about something like DrawReversibleLine or <icrosoft.DirectX.DirectDraw? What do you guys think? or GDI+ doubleubuffer (don't know what that is or if …
Last reply by Biodegradable, -
-
- 1 reply
- 914 views
when a user wants to add a new patient to the database, i want to autogenerate a primary key to identify the patient. how do i autogenerate this in c#, so that i know it wont clash with any records already in the database?
Last reply by laredo512, -
-
- Administrators
- 2 replies
- 921 views
If I have a object in each Session out there, how would I go about clear that particular Session object for all Sessions? I can't find anything that gets all current Sessions, I can always create a collection to track that myself, but I would think .NET already has that built in. Maybe not. Basically the site has an administrative function that would update some data. This is a small amount of data that varies by user so it is kept in Session - it's root data comes from data that is being changed in this administrative function. The user object was written to reload itself if Session dies while the user is logged in so the user see no interruption. This particul…
Last reply by bri189a, -
-
-
- Administrators
- Leaders
- 6 replies
- 12.2k views
Guys ... not so funny problem occuring ... I wrote a program (over the past 3 months) which is in its final stages (beta testing), my first course of action was to try running it on another machine other then the one used to develop the software. This was meat with some rather negative results. Error Message: the application failed to initialize properly (0xc000135). Click OK to Terminate Now I have another machine (with VS.NET installed, same version) and tested it, works fine - so problem is localized to the machine that doesn't have VS.NET installed (and I don't have another non-devel station to test with) My current system details (on the machine where it was c…
Last reply by snarfblam, -
-
- 4 replies
- 699 views
ok, if i bind a list box for example to a table so that it displays products. when a user selects the product, and adds it to a their shopping list table, i dont want the product name added, which is displayed in the list box or combo box or whatever you want to use. instead i want the product_Id added to the shopping list table. how can i do this without hard coding the product id into the application. when a product name is selected, the product id is added to the table?
Last reply by fguihen, -
-
- Administrators
- 3 replies
- 1.1k views
When I try reading a one line file code I get an error with this code: Dim sr As New System.IO.StreamReader(File1.PostedFile.InputStream) Dim rtf As String rtf = sr.ReadLine() rtf = rtf & sr.ReadToEnd sr.Close() How can I avoid this? For some reason I would also get the error with this too: Dim sr As New System.IO.StreamReader(File1.PostedFile.InputStream) Dim rtf As String rtf = sr.sr.ReadToEnd sr.Close()
Last reply by T_im, -
-
- 3 replies
- 2.9k views
I have a usercontrol Public Class Ritext Inherits System.Windows.Forms.TextBox When this control receives focus, it should change to the user defined color held in a public variable, which it does. In my forms, I have a routine that binds all controls Enter event to a single sub: AddHandler c1.Enter, AddressOf Me.OnSetFocus In OnSetFocus, if the key field is entered and the user presses enter or tabs to the next control, if it is an inherited textbox, the text is highlighted even if the clear property is set to false. This only happens on the first textbox after the key textbox. After debugging, I find that the base class On_Enter event of r…
Last reply by rustyd, -
- 1 reply
- 3k views
I kept hearing on these and other forums that VS2005 would have a flexgrid, yet I don't see a flexgrid. The Flexgrid (or a fully featured grid control) is very important for doing most business apps, so I'm not sure why VS (having VB in it) wouldn't have a flexgrid. I have some projects I want to get going on that I was waiting for 2005 Pro to come out to work with - then I realized that my old (2003) ComponentOne controls won't work with 2005 and I have no grids to work with. I think I'm going to have to continue to work on them in 2003 until I get a spare $700* (and a customer base interested in the applications) to pay for a 3rd party grid solution. ::si…
Last reply by mskeel,
-
Who's Online 0 Members, 0 Anonymous, 101 Guests (See full list)
- There are no registered users currently online