Topics
-
-
- Leaders
- 3 replies
- 875 views
I'm using the System.Random of C# to generate some random numbers. In order to make the seed vary for each execution of the code, I wanna use the CPU time as a seed number so it would make real random numbers. However, I don't know how do I get the time of the CPU in C#?! Please help me with that..
Last reply by IngisKahn, -
-
- 2 replies
- 1.3k views
Hi all, I would like to know how can I calculate the time of copy of some files in a directory. I need to put a progress bar moving acording to the estimated time of copy but i don't know how can i do that, for ecample like windows does or maybe using its API. Any help/suggestions wi'll be greatfull Thanks Teixeira
Last reply by teixeira, -
- 2 replies
- 892 views
Mates, I have a problem here, please do me a favor. I am using MySQL 4.1. And using MySql.Data.MySqlClient as the ado. Things work very fine. But, recently I found out a problem where from my query, the date value is not stored in the Databases. My query is as below: "INSERT INTO tblSales (SalesDate,.....) VALUES ('" & datetimepicker1.value & "',...)" The insertion query runs well, and all the values are stored except SalesDate. I check the databases, it actually store NULL value. Please do me his favor, tell me why is this happen..
Last reply by HJB417, -
- 5 replies
- 1.1k views
I am trying to develop a repository of VB.NET code development for reuse in later projects if needed. We would need to know what is in the repository and a methology for storing the code. Any suggestions would be greatly appreciated.
Last reply by HJB417, -
-
- *Experts*
- 0 replies
- 11 views
This post has still not been addressed. There is a link on item 0 to fix the CS tags but nothing has been done and it's been at least 6 months. I plan on posting a message here every day until I get some kind of response. This specific forum was meant to get your attention, was it not? The last post in regards to the above thread was posted over a week ago and still no response. If you value your "support" staff here, please help us do our job and fix these tags. -nerseus
Last reply by Nerseus, -
-
- 1 reply
- 982 views
Hey peeps, long time no see! The title says it all really. I know I know, I've been using VB for about 4 or 5 years now, but I've never needed the things. Is there a built in function to intentionally round a float/double in a desired direction? I know I could mod by 1 and delete the result to round down, but since it's probably included in the IDE I thought I'd ask.
Last reply by IngisKahn, -
- 1 reply
- 1.1k views
Someone please show me how to *create* subitems (or subkeys) for my cookies. I have found code out there for doing this in VB.NET, but I can not seem to get it to work in C#. Here is what I have:void Page_Load(Object Sender, EventArgs e) { HttpCookie cookie = Request.Cookies["userCookie"]; if (cookie == null) { cookie = new HttpCookie("userInfo"); cookie.HasKeys = true; // this bombs: HasKeys is read only cookie.Value["userInfo"]["userName"] = "jdoe"; // this bombs. Why? cookie.Value["realName"] = "John Doe"; // this bombs, too. Why? cookie.Value["lastVisit"] = DateTime.Now.ToString; // can't get this far cookie.Expires = DateTime.Now.AddDays(365); cookie.Path = Server.…
Last reply by joe_pool_is, -
-
- Leaders
- 6 replies
- 6.1k views
I made a combobox control array dim cboLoad(26) as controlbox for x as integer = 1 to intChannels sboLoad(x) = new controlbox With cboLoad(x) .Size = New Size(32, 16) .Visible = True .DropDownStyle = ComboBoxStyle.DropDownList .Location = New Point(8, intXPoint) For y As Integer = 0 To 6 Step 2 .Items.Add(y) Next End With I tried to make a "SelectedIndexChanged" sub for my array and I can't. It says that the control needs to be WithEvents. Now you can't use WithEvents for an array. Is there a way so if I select something in the combobox…
Last reply by techmanbd, -
-
- 2 replies
- 1.2k views
I'm wondering if it is possible to run an embedded firebird database directly from a CD. I've attempted to do this without success, I only get an no permission to read/write access to the database error when I try to open it from a CD.
Last reply by patdenim, -
-
- Administrators
- 2 replies
- 994 views
In my VB.NET application on occasion when I try to print directly to a printer I get the error "not enough memory". But I have more than enough memory and the application is not that intesive is there anything else that could be the problem?
Last reply by PlausiblyDamp, -
-
- 2 replies
- 1.1k views
I am filling a datatable from a database and I have a couple of questions: 1) If the dataadpter returns zero records, will it still create a datatable in the dataset and just leave it empty? 2) If it does not create a table how could I verify that the datatable exists in an if statement? 3) How can I verify if a datatable contains at least one record in an if statement? Chester
Last reply by cpopham, -
- 4 replies
- 1.5k views
Is there a relatively simple way to sent an email from VB.Net code? I just need a light-duty way to send a simple e-mail (no attachments) using the default mail handler on a PC. (I've seen a few relatively heavy-duty (complex) methods in my research but don't want or need the complexity). Thanks :) Mark
Last reply by MarkD, -
- 1 reply
- 1.8k views
Tough to describe in a title. :D When using the oledb method of "selecting" data from a sheet it will return it to you in a nice "square" table format. IE: it somehow automatically finds the maximum row and column and returns to you a nice table of that width/height. How can I do this with interop? Here's what I know about the spreadsheets I will have to read: -they will not all be the same width or height -they can have empty rows or columns -column A may be longer than B and so forth. I have no definite points to find a max/min points across all sheets that come through this app. -no column names gauranteed. So basically I need it to do the exact same…
Last reply by herilane, -
-
- Moderators
- 2 replies
- 1.1k views
I have presented my data retrieved from a DB in a repeater. unfortunately there are too many rows too show on one page. How can I allow paging when in a repeater? ################Code################# <table border="0" cellspacing="0" cellpadding="0" width="100%" class="listText"> <asp:Repeater ID="productlist" runat="server" EnableViewState="true"> <HeaderTemplate> <tr class="listHeader"> <td>#pic#</td><td>Navn</td><td align="right">Pris</td><td align="center">Kurv</th> </tr> </HeaderTemplate> <ItemTemp…
Last reply by michael_hk, -
-
- 0 replies
- 483 views
If anybody could help with this it would be great! Ive been looking all over the web and cant seem to find anything that matches exactly. I want to have a custom form in Outlooks calender to use to schedule maintenance activities, the form needs to be able to post data and pull data from a database along with outlooks schedule features. The form would be located in a public folder specifically for the task of scheduling maintenance. While I know that the default stuff works for connecting to Access, I need to connect to a microsoft sql database that already has some of the information in it. An example would be to have a piece of equipment scheduled for maintenance, t…
Last reply by reisc1, -
- 1 reply
- 1.4k views
I am trying to retrieve a web page using tcpclient. It works, but if the page is very long, it always gets cut off. For example, I can receive the full page for http://www.google.com, but if I retrieve a google search page, the server disconnects halfway through and I only get half the page. Here is my code: client = New TcpClient client.Connect(txtURL.Text, 80) stream = client.GetStream Dim send() As Byte = Encoding.ASCII.GetBytes("GET / HTTP/1.0" & vbCrLf & _ vbCrLf) stream.Write(send, 0, send.Length) Dim recv(client.ReceiveBufferSize) As Byte While Not stream.DataAvailable Application.D…
Last reply by Mister E, -
-
- Leaders
- 2 replies
- 28.2k views
I want to open I a txt file in notepad. I know how to up notepad. I use the following code: System.Diagnostics.Process.Start("NOTEPAD.EXE") But how would I open notepad with a file for example: C:\test.txt
Last reply by snarfblam, -
-
- 1 reply
- 821 views
Hey everyone. I am trying to get a file to download to browser or give the option of saving to disk when selected by a user from a webpage. My issue is very simple but I cannot seem to figure out how to solve it. I have a page that is called when appropriate and passed in is a filename to download. The directory is irrelevant at this point based on how I have set up the next phase. The called page consumes a webservice which takes the passed in filename and a password, and then returns in a string the specific path to the file on the server. In this manner even the webpage is independent of the location of the files, and more obscurity is obtained for security purp…
Last reply by cyclonebri, -
-
- Leaders
- 6 replies
- 1.3k views
Hey, I have done a search in the forums and have not found a solution, so I thought I would ask and see if anyone knew what i needed to do to solve my problem. My problem is I have a listview with items and subitems and I want the user to be able to right click a selected listview item and hit edit contact which I have on the context menu and it load up another form I have and it will put all the the items from the selected listview item into a bunch of different text boxes. Rampage<PS>
Last reply by RampagePS, -
-
- 3 replies
- 1.8k views
I want to listen (read data) from a port that is in use on my computer. How can I do this? I want to find out what is sent to my port from another server. I have tried to make simple program using sockets. But I am not able to read any data. I have also tried to connect with telnet and other software but without any result. If I want to listen to a port that is in use sending/receiving data, should I connect to my local port or to the server is one question. Even if the port is in use, shouldn't I be able to connect to it and read the data somehow?
Last reply by Mister E,
-
Who's Online 0 Members, 0 Anonymous, 88 Guests (See full list)
- There are no registered users currently online