Topics
-
-
- Administrators
- 2 replies
- 856 views
We have a control that is available in an SDK called LabelImage that is defined as follows (providing I don't fat finger anything): I want to paint this into a PictureBox control so that I can preview it prior to printing. In VB 2005, I have passed the method defined above the PictureBox's Handle as followsCode: obj.LabelImage(PictureBox1.Handle()) ' Handle returns an IntPtr The LabelImage returns True, but still no image. I tried overloading the OnPaint usingCode: Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) and the e.Graphics.IsClipEmpty property is False. So, how do I use the PaintEventArgs to populate PictureBox1?
Last reply by joe_pool_is, -
-
-
- Administrators
- 4 replies
- 915 views
I've built a small PC app that resides in the Task Bar Tray until one of our employees sends a signal to it with a handheld device. When the PC app is activated, we connect to the SQL Server to retrieve records using Integrated Security on the PC: Private m_conn As SqlConnection Public Sub New() InitializeComponent() m_conn = New SqlConnection("Data Source=ACTIVE1;Initial Catalog=Inventory;Integrated Security=SSPI;") ' more code that isn't relivant End Sub The problem is that after the PC app has sat around idle for a few hours, the employees get the generic SQL error message "Cannot generate SSPI context." Basically, it can not log in. My routine that uses t…
Last reply by joe_pool_is, -
-
-
- Administrators
- 2 replies
- 4.1k views
Hi, A component I use needs a collection to be added to it. I get a list from user in a multi line text box. So how can I add it? The list is multi line but is string and object needs collection. So when I use this: ThirdPartyObject.List.AddRange(ListTextBoxX.Text) Warning 1 Runtime errors might occur when converting 'String' to 'System.Collections.ICollection'.
Last reply by Nate Bross, -
-
-
- Administrators
- 11 replies
- 1.2k views
Hi all, I've got a MDIParent Form (frmMain) from which I launch a MDIChild Form (frmMDI_1). Now I want to launch the second MDIChild Form (frmMDI_2) from within the first MDIChild Form. The MDIParent of the second MDIChild Form should also be frmMain. I tried to do this as shown below 'Inside a Module Public WithEvents MainForm As frmMain Public WithEvents Child1 As frmMDI_1 Public WithEvents Child2 As frmMDI_2 'Inside the frmMDI_1 Form Child2 = New frmMDI_2 With Child2 .MdiParent = MainForm .Show() .WindowState = FormWindowState.Maximized End With When the code above is ran the frmMDI_2 Form is not shown as a MDIChild but as a normal form. W…
Last reply by Thei, -
-
-
- Administrators
- 2 replies
- 865 views
Hello, I want to detect if my application is running under XP, 2003 or Vista? (I know just one of these, no ther OS) How can I detect the current version? I have the following information but don't know how should I compare them? Dim MyVersion As Version = Environment.OSVersion.Version Dim XPVersion As New Version(5, 1, 0, 0) Dim ServerVersion As New Version(5, 2, 0, 0) Dim VistaVersion As New Version(6, 0, 0, 0)
Last reply by SIMIN, -
-
- 1 reply
- 1.6k views
Hi Is there any other/better way to get the windows directory rather than this method: Environ("windir") ???
Last reply by MrPaul, -
- 1 reply
- 1.3k views
I have a dll that I need to distibute, but I would like to secure it so only authorized users can use it. Is it best to add a product license key, or something like it. What is the best method for packaging it for deployment. Any suggestions would be greatly appreciated.
Last reply by OMID SOFT, -
Hi im trying to write a simpel ftp upload program... iv been trying to use the FtpWebRequest but well every time i wanna do some thing i have to create a new instance of the class and so a new connection to the server... is there any user written ftp class that manages this in a better way? Tnx alot!
Last reply by OMID SOFT, -
-
- *Experts*
- 1 reply
- 1.2k views
Hi Guys, Using the Printer Class it is not too hard to find all the installed printers and print drivers. But how can I find only the physical printers, like a Lexmark, HP, Epson, etc. Thanks, Dan
Last reply by OMID SOFT, -
-
- 0 replies
- 6.9k views
It took me a while to find this information, so I though I'd post it here incase it might save some time for some one else. Here's a simple code example: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim AppPath As String = """" & Application.ExecutablePath & """" & " ""%1""" Dim IconStr As String = "shell32.dll,116" 'What to do with mp3-files (icon, open command etc.) SaveToRegistry("SOFTWARE\Classes\Litware.Player.AssocFile.MP3", "", "MP3 Format Sound") SaveToRegistry("SOFTWARE\Classes\Litware.Player.AssocFile.MP3\DefaultIcon", "", IconStr) SaveToRegi…
Last reply by JumpyNET, -
- 1 reply
- 888 views
Hi, In VS.NET 2008, in project properties window, a new button added named "View UAC Settings". If I set it to: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> 1. Then my application will run in Vista ONLY as admin mode with full privileges? 2. So I won't need to internally check in my application if user is admin and warn/close? 3. This only works for Vista? Or XP also? Thanks
Last reply by OMID SOFT, -
-
- Administrators
- 3 replies
- 798 views
Hello, My application failed on a test for Certified for Vista Logo program, here is the details of test: ---------- Expected Behaviour: 1. The application must not allow the Least-Privileged user to save any files to Windows System directory in order to pass this test case. 2. The application must not edit the ACLS of the �%SYSTEMDRIVE%\Windows� directory in order to pass this test case NOTES: 1. The application must prompt user with a message indicating that the user does not have permission to save files to this location in order to pass this test case. Observed Behaviour: Status: Fail 1. The application doesn�t allow any Least-Privileged user…
Last reply by PlausiblyDamp, -
-
- 6 replies
- 1.2k views
Hi, how do I run a program and get the results it sends? Shell returns the process ID, and I'm sure I just have the command wrong. Thanks :) EDIT: Here's what I mean: MsgBox(Shell("php c:\test1.php")) test1.php returns "MEH". I want that result in the msgbox. (I have a more complex use but that's the test part for now).
Last reply by Jaxbot, -
- 1 reply
- 757 views
Hi there I'm in the process of building a web application, one part of which I will have to send a prefilled document to the User for them to print. It will have stuff like the name and address etc, so that they can just print it off and stick it in an envelope. What are the best options to achieve this? I've looked into iTextSharp, which looks fine for generating PDF files. But I'll need a 'master' PDF with fields in it that I can search + replace, and I'm not sure at the moment how to do this. If there's an alternative to a PDF that is cross-platform and easy to create, let me know, thanks
Last reply by Nate Bross, -
- 1 reply
- 1.6k views
I have a ListBox with a list of files in it. When a user presses the letter "a", then it goes to the first file that starts with the letter "a". When a user presses the next letter "s", then it goes to the first file that starts with the letter "s". Etc. I want to disable the default keypress navigation for the ListBox, and perform my own navigation, so instead of the ListBox doing what I described above, it will search as follows: When a user presses the letter "a", then it goes to the first file that starts with the letter "a". When a user presses the next letter "s", then it goes to the first file that starts with the letter "as". Etc. I ALREADY have code that ac…
Last reply by JumpyNET, -
-
- Leaders
- 3 replies
- 1.7k views
Is it possible to have one main Hashtable to store mulitple sub-hashtables? So it works like this: 1: Sub-Hashtable1 contains n objects (strings). 2: Sub-Hashtable2 contains n objects (strings). 3: Main-Hashtable contains these two Sub-Hashtables. 4: Retrieve these objects through the Main-Hashtable? I have been looking into Hashtable.Values property but running into dead-end, would this achieve it? Thanks in advance, Carl
Last reply by mskeel, -
-
-
- Administrators
- 2 replies
- 856 views
I have added a ContextMenuStrip Control to my Listview. Since the user will most likely select more options from the contextmenu, (context menu items are acting as checkboxes,) I want the menu to stay open, even after the user has selected an item in the menu. I've already tried setting the .autoclose property to false, but then the menu won't open after a rightclick. Is there anyway to achieve this?
Last reply by Arokh, -
-
-
- Administrators
- 7 replies
- 1k views
I'm wondering if that is somehow possible. I've written a program which uses plugins, now I want the PluginAPI to offer some custom Events. Custom as in not some controls Events, rather a declared event which is then raised somewhere in my code. Now I know only 2 solutions which I'd rather not use: Move all the declarations of the Events to the class which is passed to the Addoninterface, which is usable by the addonwriter, or pass the whole class where the Event declarations reside, also making any other public declared object accessible. Here is an example: Class MainProgram Public Event Bla() End Class Public Class cAddons Interface iHost End …
Last reply by MrPaul, -
-
- 1 reply
- 1.2k views
Hello, I am new to learn English! Well, I want to say a commercial sentence but I cannot make it, anyone speaking in English can help me please? I want to say that "You cannot find a stable and reliable service like ours, with our high features and low prices". In other words I want to say that you cannot find a service that have the same features as we have (because ours have a lot of features) with the low price as ours (because ours is cheapest) that is stable and reliable. How should I make this 1 sentence? Thank you for your help:)
Last reply by tfowler, -
-
- Leaders
- Administrators
- 4 replies
- 1.1k views
I am one of those older programmers that has spent most of his life in C++ without databases. Now, I am working more with VB and C# using more and more SQL Server data. In the database, there are Tables and there are Views. Most of the old code that we have here collects data by calling one of the Views instead of reading directly from the Tables. Why? I tried asking someone before, but the answer didn't fully explain anything. I was told something like "a View presents a snapshot of the data and consumes fewer resources that querying data from a Table." Could someone expand on this? ...in layman's terms, please.
Last reply by TRANSLTR, -
-
Who's Online 0 Members, 0 Anonymous, 54 Guests (See full list)
- There are no registered users currently online