Answer Questions
joesanders How to work this code?
AUI = 0 UserItems(AUI + 1) = "Steel Sword" Form2.Label (AUI). text = "Steel Sword" Form2.PictureBox1 (AUI). Image = Image.FromFile( "C:\Documents and Settings\bob\My Documents\Visual Studio 2005\Projects\Strong Knight\Strong Knight\Resources\steel.bmp" ) AUI = AUI + 1 In the real out put of the code. This is an inventory, the user buys an item, and based on how many items they haev the new item is added after the latest one, which is a label for the name of it, and the picture of the item. Once again you have the option of hiding a premade button until the user decides to show it...instead of adding it Dim B as New Button b.Location =New Poi ...Show All
eshashishekhar Opening an EXE in VS
Hi, I have Visual Studio 2005 Pro, and I was wondering how I open a plain .EXE file in Visual Studio to look at the code The computers at the university I go to are able to do this, however, I am now using my laptop (I just installed VS .NET 2005) and it just opens shows the name of the file in the side window. Do I need to install an add-in or plug-in to make this work Thanks! Eric you would need to reflect the assembly using a .NET Reflector tool - do a search on the net and it should be the first hit. absolutely spotty :-) If I'm correct this is only going to work for executables generated using .NET products such as VB.NET or C# . ...Show All
Catalin Zima Code Snippet Manager Invisible Folder
[ Hello ! I add two snippets with the Snippet Manager ( with Subfolder) Now ,I want to delete this folder.In the code ...the Folders exisit, but in the Snippet Manager , i can’t see the folder and i can not delete this Folder! how can I delete the Folder without the Snippet Manager And where is the XML File for this If i delete the SnippetIndex.xml File ..nothing happens.... Thanks for the Help... Pseudocode Hi, Can you please check the following registry keys for me: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\CodeExpansions\Basic\Paths] and [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\CodeExpansions\Visual Basic\Paths] ...Show All
jtaylor42 how to draw analog meter(gauge meter) in vb.net
hi, i need to draw a full circled gauge meter in a window form. it should have the needle in the zero position and change accordingly to the value we provide to it plz help me its urgent You can rawly draw on the winform. Get the Graphics, use the pencil or something else. Or for some encapsulation, you may want to make it a control that can be used later, then you have to implement a customed control. Which part are you confused with, the GDI+ thing Moved to VB forum for better responce. i want to design it as a windowcontrol library i have done it in vb6 with three different gif images and its working fine. i dont know the similar syntax in vb.net. in vb6 picture1.line is used to draw the line ...Show All
Duane Douglas How do I create and post a custom message to the process message loop?
I want to post a 'message' (preferably a custom message) from a child thread which I have created to the message loop in the main thread. This will allow the thread to interleave its communications to the main thread whilst the main loop is servicing other interface messages. I could do this with a form timer which generates messages but this needs a form. A timer running without a form just starts a thread each time it fires and I am back with the same problem. I can also achieve something similar using a 'Background Worker' but I want a variable number of threads so I can not use the event mechanism which needs a single instance. Using C and the Win API I used to be able to create a custom message and ...Show All
TrevorHughes Print from textbox
Does anyone know how to print i vb I have information some textbox on a form which i want to send to the printer. threads merged Does anyone know how to use code to send information a printer in vb.net I want when i click a button it prints information from certain textboxes Any thoughts Thanks!! Here is my code. I got this from a search and i am trying to change it so that it prints from the textbox and not the file. I have a textbox on the form called textbox1. When i run the code with the piece i entered it tells me "Argument Exception was unhandled" Any thoughts Thanks!! Option Strict On Imports System.IO Public Class Form1 Dim fileToPrint As Sy ...Show All
Mikkel Haugstrup TreeNodeCollection.Add(Key, Node)???
Hello, every add method offers the possibility to set a key. But the .Add(node) method does not have this possibility. I need it because i have a derived own treenode class which i want to add with a key. Is it possible to add this feature Because i can't use the Nodes.Find method anymore and must loop through all the nodes. Regards, Markus Dim MyNode As TreeNode = Me . TreeView1 . Nodes . Add ( "NodeKey" , "NodeText" ) MyNode . Name = "NodeName" MyNode . Text = "NewNodeText" MyNode . Tag = "NodeTag" Hello DMan1, thank you very much for your answer. But it does not anwser my question. I have a ...Show All
vgrigor add plugin containing user control onto a Window form container?
I am getting the idea of basic mechanisms for launching a plugin from within a winforms host app; Dim assembly As Assembly = assembly.Load(filename) 'load the dll from a directory objPlugin = objDLL.CreateInstance(Plugin.ClassName) 'instantiate it Here is the part I don't know how to do. I want to add a somewhat complex user control to a host app's panel as the container. How do I 1. create the UserControl as a dll 2. Add the User Control, with all it's inherent functionality, onto a Host Panel. HostApp.Panel.Controls.Add(objPlugin) I am only familiar with the host calling methods/functions in the dll (like multiply 2 numbers) through a pre-established contract (interface). But if you don't know what functions are ...Show All
jchau System.NullReference Exception is unhandled
I'm trying to get my program to open, then import data from a database. However, I keep running into an error depending upon how I word it. The problem revolves around the "query_cmd" declaration. If I declare it as: Dim query_cmd As New Microsoft.Office.Interop.Excel.QueryTable I get the error: Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154 However, if I declare it as: Dim query_cmd As Microsoft.Office.Interop.Excel.QueryTable it throws a NullReferenceException when I try to use it as: query_cmd.CommandType = XlCmdType.xlCmdTable Thanks in advance for your help Public Class GetData Dim Excel As New Microsoft.Office.Interop.Exc ...Show All
Ryan F Event on Button Made in code? Please help
Hi I'm A beginner at control arrays with only using the code, I'm using vb.net 2003. to help this is also one of my first posts. I'm trying to make a button which I can already do. When I Check box checkBringANewButton I Want to make a new button. but I cant make a button.click event for all these buttons Dim Button(1000) as button Dim I as integer private sub ButtonProperties() button(i).height = 50 button(i).width = 50 button(i).location.x = 100 button(i).location.y = 100 button(i).text = "" button(i).name = "Button" & I End Sub Private Sub checkBringANewButton_check( , ByVal e As System.EventArgs) Handles checkbringanewbutton.check i += 1 buttonproperties() ...Show All
Manaxter Visual Basic .Net and Content Management
Hi, I'm developing an application in Visual Basic 2005.Net. This application needs to interact with DB2 Content Manager V8.3. Now this content manager only provides API's for C++, and Java development. The application is mostly developed already, and now I can't figure out how to reference those libraries. Maybe there would be a way to create a dll from all those hpp files... I don't know. Any help that I can receive will be much appreciated. Thank You. I am looking for similar information. I am trying to utilize the XMP SDK from Adobe which only (as far as I can tell) provides access from C++. As I know nothing about C++ I was hoping to find some information here. Have you received any assistance o ...Show All
Syri Activating or opening an existing Excel workbook with Visual Basic from within a Visual Studio Project
Hello all, I have tried numerous ways to modify the responses to "Openening an Excel file from within project" to open an existing Excel workbook and also select and activate a minimized workbook but have totally struck out, Can anyone give me some guidance Also, where should I be looking for samples that answer such basic questions Thanks very much. Noel Rietman What version of VB are you using I am using Visual Studio 2005 with tools for Office "VSTO" Thanks Tom Imports Excel = Microsoft . Office . Interop . Excel Dim XL As Excel . Application 'Set to new instance of excel XL = New Excel . Application XL . Visible = True XL . WindowState ...Show All
lachlanj BITBLT not working?
I have 2 bitmaps in memory; one is an original copy of a picture and the second I intend to block out parts of, and display it. my bitmaps are named b1 and b2. b1 is loaded from a file (and converted to a 32bpp bitmap along the way) b2 is created with the same height, width, pixelformat, horizontal and vertical resolutions. (but empty) I then attempt to copy part of b1 into b2 using BITBLT. (I don't want to use Graphics.DrawImageUnscaled - the reason being that I intend to copy parts of the image in the future) I assign b2 to a picturebox, but it displays a blank image. Here is the code which doesn't seem to work: pbox2.Image = Nothing Dim g1 As Graphics = Graphics.FromImage(b1) Dim hdc1 As IntPtr = ...Show All
Lincbarr bitmap to an icon.
i am not positive this belongs here but i have developed a few program which i would like to place a custom icon on. is there a way or a converter i can use to create this icon and deploy it, i tried to make a bitmap of a simple icon, but see no way to make it into what ever visual basic/visual studio requires. it keeps saying it needs an 'icon' file so how do i make one meow.. This may not be the best/complete answer, but it may be a start: Imports System.Drawing Imports System.IO Public Class Form1 Private Sub Button1_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click ' Filter set in designer mode to JPG files|*.jpg If OpenFile ...Show All
Kendall bennett Convert text file data to Hex file data.
Hello, I have a hex listing in a text file that is 14 bytes long... 40 00 78 7B 7A These are characters. The hex values are... 34 30 20 30 30 20 37 38 20 37 42 20 37 61 How do I go about converting this to a file containing only hex values The resulting file should contain only 5 bytes... 4000787B7A Thank you in advance, ED You may wish to take a look at the hex function: (from the object browser) Public Shared Function Hex (ByVal Number As Integer ) As String Member of Microsoft.VisualBasic . Conversion Summary: Returns a string representing the hexadecimal value of a number. Parameters: Number : Required. Any valid numeric expression or String ...Show All
