Topics
-
-
- Leaders
- 4 replies
- 4.8k views
Note from moderator: Please use the and [code=visualbasic] tags and other formatting features to make your posts readable. Spelling and grammar help too.[/color] This is in class file [code=visualbasic]Imports Microsoft.VisualBasic Imports System.IO Imports System.Collections.Generic Public Class FileSrch '' File Search Options Public Enum FileSearchOptions YearFirst MonthFirst DateinExtension NormalFiles End Enum Public Shared Function GetSearchcriteria(ByVal DatetoSearchwith As Date, ByVal Filename As String, ByVal FileExtension As String, ByVal SearchOptions As FileSearchOptions) Select Case SearchOptions Case FileSearchOptions.YearFirst Return String.Format("{0}…
Last reply by prem005, -
-
- 7 replies
- 5.8k views
Hi all, I'm currently doing a project that allows the user to print doc file from asp.net mobile web application. It means that the user can print doc file while they are on the move. My project is using asp.net mobile web application. I had made the enumeration of printer to allow the user to select the printer they want their document print to. I'm using the Microsoft Word 1.0 Object Library, which I add reference from the COM, to print doc file. Here are some of my code that called the Microsoft Word to print doc file for me: Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click Dim word…
Last reply by MSHANE, -
-
- Leaders
- 2 replies
- 1.3k views
Hello Everyone, I have some code (which you can find below) and I am able to compile it correctly on my computer but when I copy and paste it into another computer (for further development); I get the error: "Object reference not set to an instance of an object". I have provided a screen shot of the error and the pertinent code below. As you can see from the screen shot the error occurs in the line: " If Dir(pfile(j)) = "" Then". Sub ChartPlot() Dim i As Integer Dim j As Integer Dim KF As Integer Dim J1 As Integer Dim J2 As Integer Dim JLG As Integer Dim NPTS As Integer Dim IPLOT(4, 5) As Object 'change…
Last reply by sn1fflez, -
-
- 15 replies
- 14.6k views
It works but seems slower than it should. ideas? public static void ExportToExcel(DataTable dt) { Excel.Application xlApp = new Excel.ApplicationClass(); Excel.Workbook xlBook; Excel.Worksheet xlSheet; xlBook = xlApp.Workbooks.Add(Missing.Value); xlSheet = (Excel.Worksheet)xlBook.Worksheets.get_Item(1); //Write headers for(int i=0; i<dt.Columns.Count; i++) { xlSheet.Cells[1,i+1] = dt.Columns[i].ColumnName.ToString(); } //Write Data for(int i=0; i<dt.Rows.Count; i++) { for(int k=0; k<dt.Columns.Count; k++) { xlSheet.Cells[2+i,k+1] = dt.Rows[i][k]; } } xlApp.Visible = true; }
Last reply by dorramide7, -
- 0 replies
- 2.4k views
Hello, From my 2.0 .Net Framework App I need to sign a string with a X.509 certificate and the encryption algorithm for signing should be MD5/RSA. The resulting signature must be verified in a remote java app. Here's my methods to sign and verify the string: public byte[] SignMessage(string Message) { try { //---- // Instantiate X509Certificate using file path X509Certificates.X509Certificate2 x509 = new X509Certificates.X509Certificate2(My.Settings.CertificatePath); //---- // Convert Message to byte array byte[] data = Encoding.Unicode.GetBytes(Message); //---- // Instantiate a RSA Algorithm object with Private Key RSACrypto…
Last reply by lupefe, -
- 0 replies
- 1.1k views
Hi, Not sure if I can post this question here since it's for .NET framework, but since many .NET developers have used AR6 before, so I would like to take a shot here. Anyhow, the question is how do I change fields positions based on different conditions? For example, if I have two rows in GroupHeader1, and based on conditions, I would like to hide row #1 and show row #2, and row #2 in this case will be placed where row #1 supposed to be; and if row #1 shows, row #2 will be placed right under row #1. Please help. Many Thanks, Kyle
Last reply by microkarl, -
- 1 reply
- 2.2k views
I would like to make my form larger than the screen size. The form size seems to be limited by the size in SystemInformation.MaxWindowTrackSize. How can I make my form override this value or the MaximumSize property?
Last reply by JumpyNET, -
-
- Leaders
- 1 reply
- 1.4k views
Hi, When I am inside a thread, I cannot simply call Me.Close or I get cross threading error! So I need to use some code like this and then call SetClose() Private Delegate Sub SetCloseCallback() Private Sub SetClose() If Me.InvokeRequired Then Dim d As New SetCloseCallback(AddressOf SetClose) Me.Invoke(d, New Object() {Me}) Else Me.Close() End If End Sub But this don't work for some reason I don't know, anyone can see something wrong with my code? :confused: Thank you.
Last reply by snarfblam, -
-
- 1 reply
- 2.2k views
Hi all, I'm trying to retrieve some specific data from an XML file I have attached. The data is in <LinkCollection> I have a semi populated class object that contains an ID that directly relates to the LinkItem ID. Matching these values I then want to populate the rest of the class with the other data - Path, Index and any DescriptiveText held under that ID. My attempt is here but I'm returning dodgy string values and getting nowhere slowly. //gets icon path and index foreach (LinkItem item in linkItems) { var Index = from LinkIcon in xmlDoc.Descendants("LinkIcon") where (string)LinkIco…
Last reply by Jibrohni, -
- 0 replies
- 3.7k views
Hi! First off, I'm new here, so HELLO to everyone! Well, my question is: how do I print to a POS printer in C#? As I origin from legacy VB (VB6) I remember I did it easily like this: open "LPT1" As #1 Print#1, "blah, blah" Close#1 I've tried this approach and it doesn't work. I've searched here and on uncle G, but to no avail. Any ideas?
Last reply by RED CAT, -
-
- Administrators
- 1 reply
- 971 views
I want to write an automated testing tool in .Net. For example, i have a winform including two textboxes (input) and one label (output): 1) open up the winform application 2) type numbers in two text boxes and click "calculate" button 3) verify the result in the label. I know that my testing tool can open up the application (using process). How do I achieve #2 and #3?
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 1 reply
- 2.7k views
Hello, I Am Recently Writing A Program That Reads The Color Of Each Pixel In A Picture. But It Doesn't Took A Short Time. Because, I Must Read Them One By One From CPU. I Think If I Use My GPU for That Process, It Will Take Much Lesser. But I Am Not Sure If I Can Use DirectX or OpenGL to Get Color Value Of A Pixel. If I Can, Just Let Me Know That And If You Have A Documentation, Please Share It. Thank You Fatih BAKIR
Last reply by snarfblam, -
-
- 0 replies
- 3.7k views
How to change ContextMenuStrip Highlight color? We can change the background and foreground colors but not the selection background and foreground colors... so what's the point? Any ideia? It would be great if VS .NET controls were more flexible graphically...
Last reply by EFileTahi-A, -
Close Form
by usvpn-
- Leaders
- 1 reply
- 998 views
Edit by mod: thread is cross posted at XVBT. Hi, How can I close the form by pressing the scape button? I know I can put a button on form and set the form CancelButton to this button, but is there another way without placing that button? Thanks
Last reply by snarfblam, -
-
-
- Leaders
- 1 reply
- 894 views
Note from mod: Thread is cross-posted at XVBT. Hi everyone :) I have written a function which is a loop and is similar to old Val() function, I just wanna loop through all characters of an input string and return the numbers: Private Function GetStrVal(ByVal InputString As String) As Integer GetStrVal = Nothing For MyLoop As Integer = 1 To InputString.Length If InputString.Substring(MyLoop - 1, 1) = 0 Or _ InputString.Substring(MyLoop - 1, 1) = 1 Or _ InputString.Substring(MyLoop - 1, 1) = 2 Or _ InputString.Substring(MyLoop - 1, 1) = 3 Or _ InputString.Substring(MyLoop - 1, 1) = 4 Or _ …
Last reply by snarfblam, -
-
-
- Leaders
- 1 reply
- 2.9k views
Re: Remove Duplicate items from a ComboBox How? Split post from http://www.xtremedotnettalk.com/showthread.php?t=96955. (Please place new questions in new threads.) Am getting the following error: Items collection cannot be modified when the DataSource property is set. PLEASE HELP!!!!
Last reply by snarfblam, -
-
- 0 replies
- 1.5k views
Not sure what is happening here, please help. I have used AJAX 1.0 for years with VS2005 no problems. As soon as I move to VS2008 with the current version of AJAX weird things happen. I downloaded the sample site and it acts fine but not when i create one. Click the button multiple times you will see what I mean. Also can not close the validator callout. The HTML Editor as well is not allowing the hyper-link function as it does not work properly. PLEASE HELP! http://www.raglm.org/test.aspx My Web Config <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your applic…
Last reply by nate, -
-
- Leaders
- 8 replies
- 1.7k views
Imagine you have a circle with a radius of 100 pixels at the center of the screen. I need to return the current radius of the circle where ever I put the mouse anywhere inside the circle. That is.. if I put the mouse half way inside the circle it should return 50 pixels. I have no clue how to do this...
Last reply by EFileTahi-A, -
-
-
- Leaders
- 2 replies
- 3.8k views
Hi, I am wondering how do I minimize a windowed DirectX application without getting an application error. Like in various tutorials, I captured the OnDeviceLost event, but what do I have to put inside it? The application displays a simple cube without textures and it uses 1 light. There is no rendering loop running. The rendering block is called only if needed (i.e. setting viewer position, setting light color etc.).
Last reply by bufer24, -
-
-
- Administrators
- 1 reply
- 3.5k views
[ATTACH]5701._xfImport[/ATTACH] how can i count the number of item i have in my listbox and pass it to my txtTextListCount. here is my code for: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click myListbox.Items.Add(txtText.Text & "") End Sub Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtTextListCount.Text = myListbox.Items.Count End Sub Please help me..
Last reply by PlausiblyDamp, -
-
Who's Online 0 Members, 0 Anonymous, 31 Guests (See full list)
- There are no registered users currently online