Topics
-
-
- Administrators
- Leaders
- 10 replies
- 4.1k views
i was wondering how people go about getting Unique Number Array's? cause a lot of people do it very differently o_O, seen people with 100 lines of code, others with 10.. my way lately has been using HashTables Dim a As Integer ' Just a Counting Value Dim RNS As Integer = 100 ' Random Numbers i'm just using 100, cause i can Dim RandomValues As New Hashtable ' Hash Table, Of Course o.o Dim RandValue As Integer ' Random Number While a <> RNS Randomize() RandValue = Int((RNS - 0 + 1) * Rnd()) + 0 ' highest - Lowest + 1 ect.. While RandomValues.ContainsValue(RandValue) ' If Hastable Contains The Valu…
Last reply by Cags, -
-
-
- Administrators
- 2 replies
- 16.7k views
Hi i'm having some problems using LINQ to Entities Dim obj As New sof_h obj.sof_l = (From p In StatsContext.sof_l Where l.id = Locations(myMatch.Groups(1).Value) Select l).FirstOrDefault() or Dim obj As New sof_h Dim QLocations = From l In StatsContext.sof_l Select l obj.sof_l = QLocations.Where(Function(l) l.id = Locations(myMatch.Groups(1).Value)).FirstOrDefault() Both give me the error: I really have no idea how to fix this problem.
Last reply by Ontani, -
-
- 1 reply
- 1.6k views
Hi, I'm using this code to put breaklines in asp:textbox, but the thing i don't like is, that when i edit the data, the br are seen. <script type="text/javascript"> <!-- function changeTextBoxValue(elementRef) { var textBoxValue = elementRef.value; while (true) { var currentValue = textBoxValue; textBoxValue = textBoxValue.replace('\n', '<br />'); if (textBoxValue == currentValue) break; } elementRef.value = textBoxValue; } // --> </script> does anyone has a better code and that are saved in db, but if you edit the data text will be in next line but wi…
Last reply by Cags, -
-
- Administrators
- 4 replies
- 3.5k views
K, I'm not sure which forum this question goes in, so I am putting it here. Probably a database forum thing though... Here's my problem. I have a customer file [CSV] I am importing to SQL. I am using JET to read it into a dataset. I am using a schema.ini file to define columns, because I have one column with up to 1000 characters in it... so I have to define it as a Memo field so it won't truncate at 255 characters. ANYWAY, I have one other column that has VERY large numbers in it. i.e. 4671070409010930000 This is, in effect an 8 byte integer. My problem is, I can't seem to get it into my dataset without it *****ing the value. I can't define it as any …
Last reply by Agent707, -
-
-
- Administrators
- 4 replies
- 3.9k views
I have just started using dotfuscator. When I try to run the dotfuscated application it seems that none of the project settings (My.Settings) are recognised, and this causes an error. How do I fix this?
Last reply by rbulph, -
-
-
- Leaders
- 1 reply
- 1.2k views
I am using Named Pipes to transfer data from a client (C++) to a server (C#), the client does the following: struct MESSAGE { char cCommand[8]; string sParameter; }; MESSAGE msg; strcpy(msg.cCommand, "COMMAND"); strcpy(msg.sParameter, "DO SOMETHING"); DWORD dwWrote = 0; WriteFile (hpipe, &msg, sizeof(msg), dwWrote, NULL); [/Code] Then, at the receiving end the C# server does the following: [Code] IntPtr chRequest; bool fSuccess = ReadFile(hPipeInst, chRequest, uSize, cbRead, OverlappedPtr); if (fSuccess) byte[] temp = Encoding.ASCII.GetBytes(Marshal.PtrToStringAnsi(chRequest)); [/Code] Now, at the receiving end, I ne…
Last reply by snarfblam, -
-
-
- Administrators
- 6 replies
- 6.1k views
Hi, I have developed an web application using Visual Studion 2005, In my project i am using crystal reports to generate a user friendly document, Here Every thing is working fine the same application i have deployed in my production server i am getting one the details are given please let me know what migfht went wrong or how to fix this problem Server Error in '/Workflow' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your …
Last reply by orca44, -
-
- 3 replies
- 15.2k views
I have this method, with takes in path to a file on the system, encrypts it, and then writes the encrypted file to disk using the file path as a name and ".enc" extension. It works fine, and I am able to decrypt the file later with a different function: public void Encrypt(string fileName) { FileStream fsCrypt=new FileStream(fileName + ".enc", FileMode.Create); RijndaelManaged RMCrypto = new RijndaelManaged(); CryptoStream cs = new CryptoStream(fsCrypt, RMCrypto.CreateEncryptor(key,iv), CryptoStreamMode.Write); FileStream fsIn=new FileStream(fileName,FileMode.Open); int data; while ((data=fsIn.ReadByte())!=-1) cs.WriteByte((byte) data); fsIn.Close(); cs.Close(…
Last reply by Khallaf, -
-
- Administrators
- 2 replies
- 2.1k views
I have a form with the following code: Public TourBars As New Generic.List(Of TextBox) ------------------------------------ For TourCount 0 to 9 TourBars.Add(New TextBox) With TourBars(TourCount) .Location = New Point(Xstart + SinceMidnight / 86400 * Xlength, Ystart + 2 + Yoffset * LineNo) .Height = 14 .Width = 600 * Duration / 86400 .BackColor = Color.Red .Cursor = Cursors.Hand .TabIndex = 1000 + TourCount .Multiline = True .BorderStyle = BorderStyle.None End With Me.Controls.Add(TourBars(TourCount)) AddHandler TourBars(TourCount).Click, AddressOf TourGE AddHandler TourBars(TourCount).MouseHover, AddressOf Tourshow …
Last reply by Ole Jul, -
-
-
- Leaders
- 6 replies
- 3.7k views
I have created some code to try to capture the Print Screen key, but I never have been able to get it to fire for either my MDI form nor any of the Child forms. Here's what I have written: void MdiForm_KeyDown(object sender, KeyEventArgs e) { if ((e.KeyCode == Keys.PrintScreen) || ((e.KeyData & Keys.PrintScreen) == Keys.PrintScreen)) { ScreenCapture(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); e.Handled = true; } }Anyway, other fires needed attention, and I forgot about it. I left a breakpoint on the Screen Capture line. Today, while inputting some text in one of the Child forms, I had to insert an underscore ("_"). Imagine my shock whe…
Last reply by joe_pool_is, -
-
- 0 replies
- 1.2k views
I have a created a C# windows service (Serv.exe) which is responsible for performing various tasks at the request of a running application (A.exe), some of these can take long periods of time and I need a way to know the status of my requested operation (running on the service) from the calling application (A.exe). Currently the way I have started to implement this is by using the ControlService(handle, command, status) to send a custom command to the Service to perform the task being requested, I am also using QueryServiceStatus(handle, status) to get the status of the service from the SCM - so the basic plumbing is there and working. Now the problem I have is, aft…
Last reply by Shaitan00, -
- 4 replies
- 13.3k views
Hello all. I'm calling a very simple report from the CR .NET 9.1 version. When loading the report into the Viewer in my aspx application, I get the "Load Report Failed" error. Now the closest thing I've found that addresses this issue is :http://support.crystaldecisions.com/library/kbase/articles/c2011640.asp but this article addresses the issues on 98 and winme. This is running on a client 2k box and even won't run on the server when the setup file is created and installed on the server. However, if I run the project on the dev machine the report comes up. Has anyone had this problem before? I've done about everything I can think of up to now... Thanks!
Last reply by shineab, -
-
- Administrators
- 1 reply
- 4.5k views
You would think that providing for the addition of shortcuts to your application in a setup project would be simple. But if I go to the file system and right click on the desktop folder, the option I get is to "Create Shortcut to User's desktop". This is completely silly. I tried adding this and installing my application and this really is what the installer does. It adds a shortcut on the user's desktop to the user's desktop. So when he clicks on this he gets a window showing the contents of his desktop. Similarly with creating a shortcut in the user's program menu. Unbelievable. I have tried resetting the Target property in the Properties Window, and right-clicking o…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 7 replies
- 11.2k views
I'm using Crystal reports as a part of Microsoft Visual studio .net 2002. I'm using field definition file (ttx) and a datatable as a datasource for report. (In VB .net code, Datatable is filled with data and then is set to be datasource for the report). Program works fine on the development PC. But when I try to show report on some other PC, 'Database login' dialog appears. How can I avoide this dialog? Any help would be appreciated :-))
Last reply by Jay_DEEP, -
-
-
- Administrators
- Leaders
- 6 replies
- 3.3k views
Hi I'm making an program using Microsoft Visual c# 2008 EE / directX sdk 2008 (november) the program is working great but on many other computers mostly with integrated graphic cards the program breaks down and it isn't working until I stop using z-buffer which I need.... I tried to create a device : deviceType.Reference instead deviceType.Hardware but it is still the same. Is there anithing I can do with that? thx if it is necessary I can upload the whole code / project
Last reply by Zviri, -
-
-
- Administrators
- 4 replies
- 2.4k views
I have a piece of code as below. -------------------------------------------------- Dim MailServer As String = "THOMAS" 'Local SMTP virtual svr Dim ToEmail As String = "thomas@mydomain.com" Dim ToName As String = "Thomas George" Dim FromEmail As String = "test@mydomain.com" Dim FromName As String = "Test" Dim Subject As String = "Test Mail" Dim Body As String = "Test Body" Dim o_Client As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient(MailServer) Dim o_FromAddress As System.Net.Mail.MailAddress = New System.Net.Mail.MailAddress(FromEmail, FromName) Dim o_ToAddress As System.Net.Mail.MailAddress = New System.Net.Mail.MailAddress(ToEmail, ToName) Di…
Last reply by thomasgeorgem, -
-
- 0 replies
- 1.1k views
Currently I have 2 applications that reside on the same system (local applications) that need to communicate. One is a C++ program that already uses mailslots to communicate with other system (remote) and the other is a new C# service I have just written. Given that the C++ application is already mailslot savy I thought it would be a good idea to re-use the logic for local process (IPC) communication (why not...). But while implementing it I ran into a situation and am wondering if this was the correct "way to go"... Correct me if I am wrong but ... don't I need 2 mailslots? One for communication from the C++ application -> C# service and another separate one fro…
Last reply by Shaitan00, -
- 1 reply
- 778 views
How can I set the web browser to navigate to a certain page when there was an error? (example.. when there is no internet connection) Im using visual studio 2008 if that matters or not. Thanks. Edit: Also, when I was using the AxWebBrowser control (in vb.net 2003) I had to include the ieframe.dll which is a pretty big file. Do I need to include that in my installation still with this new Web Browser control?
Last reply by joe_pool_is, -
- 1 reply
- 658 views
Hi, Im having trouble designing this... Any help would be appreciated... (Im using C#) I have 2 classes A, and B, each with a few integer and float properties. How would I go about designing this, if the requirement is that the user needs to be able to add in rules (at runtime) relating to these properties. Example... At runtime, the user needs to be aware of the properties in Class A and B (possibly through reflection ?), and be able to add a 'rule' ...eg. "if property A1 from class A is > property B2 from class B".. then perform some alert. The user should be able to add some sort of comparison rule (<, >, =) of any of the float/integer properties…
Last reply by joe_pool_is, -
-
- Administrators
- Leaders
- 8 replies
- 1.8k views
Hi community, i want to create simple MDI application but ths child forms should be in a special order of visibility (or layer). For example: if a child form has layer 0 it is always top most of all other child forms. A child form with layer 1 is behind a child form with layer 0 but in front of a childform with layer 2 and so on... Does anybody know a solution? Thanks
Last reply by joe_pool_is, -
-
Who's Online 0 Members, 0 Anonymous, 9 Guests (See full list)
- There are no registered users currently online