how can i create a monochrome bitmap from a semi transparent bitmap in vb.net? the bmp is for a transparency mask image for an icon i'm trying to create with the CreateIconIndirect API function.
i'm using vb2008 .Net3.5, but i would prefer an answer that would also work in vb2005
In the below code I load the image to the graphics path using resource image and adding text on it. When I add the image through open file dialog it paints on the form with original size but I need to resize it, add it to the PictureBox, add text to it and give zoom and pan options to it and then I need to save with the original size.
When I resize and when save the image I endi up with a small image.
Here is my code:
Imports System.Collections.ObjectModel Imports System.Drawing.Drawing2D Public Class Form1
I am trying to create a function to convert a mapped drive path to a UNC path. I did some googling and found several different pages on the matter. I am most interested in the first one, but I cannot seem to get the code to cooperate. Since the original post was in C#, here is my VB.NET conversion:
I'm using the following code to create a bitmap from a webbrowsercontrol that is located just off-screen (not visible to user, but control is "visible") Does the CopyFromScreen method work for something that is not ACTUALLY displayed on the screen?
I checked the values of p.X and p.Y at runtime and they are correct, but my "img" does not reflect the portion of the "Screen" i'm trying to capture.
Not sure what I'm doing wrong here, or if CopyFromScreen will still work if my control is outside of the bounds of the primaryscreen.
vb.net 'This is set at FormShown time 'Position the browser off-screen Dim wbPoint As New Point(Me.Location.X + Me.Width - 50, Me.Location.Y)
I'm trying to create an image for printing and I know what the dimensions of the image (Bitmap object) is supposed to be in Inches but the Bitmap uses pixels so how would I define it's size to the number of pixels per inch?I do know what the printer's DPI is too, I'm able to get the horizontal DPI and the vertical DPI (which is 99.99% of the time always the same)
I've been reading a bunch of tutorials on Drawing in VB.Net, and still am reading them, but I have a question which I know I'll need to ask sooner or later:
How can I create a 4000x4000 size bitmap, and then draw a pixel at a certain coordinate on a bitmap? Like say I want to draw a BLUE pixel at coordinate X = 3000 Y = 3450. How could I do that?
how can i create an icon (with transparency) from a bitmap?
i've tried this code, which i converted from a create cursor function which worked ok with transparency. i'm guessing its the IconInfo hbmMask + hbmColor properties?
#Region " CreateIconIndirect" Private Structure IconInfo Public fIcon As Boolean
I want to know how I could create a bitmap from scratch with no images to start with.(I would say need. but than you would think this was for some sort of school project and it's not.)Basically, what I have is an image which is perfectly square in shape and has a black border with a black x going through it, what is not black is white. What I'm looking to know is how to take that small image (50x50 pixels) and make an image based upon those by placing them in X Rows of X amount. I'll make a couple example to show what I mean.(X's represent the 50x50 image.
I am trying to convert from a text file to an image(bitmap) file. For example, test.txt: 01 23 34 56 78 90
[Code]....
The first step will be reading the data, so I created some VB codes:
Dim openFileDialog1 As New OpenFileDialog() openFileDialog1.Filter = "Text Files (*.txt)|*.txt" openFileDialog1.Title = "Select a text File" ' Show the Dialog.
' If the user clicked OK in the dialog and ' an image file was selected, open it.
If openFileDialog1.ShowDialog() = DialogResult.OK Then ' Open file. [Code]...
The second step will be converting the data to some data format which can be used in a bitmap image. This part is making me confused. Some codes I made is listed below:
I'm using Bitmap to show picture box like slideshow using Timer. For each timer interval, I've to go for new instance of Bitmap, there System memory increases to 1MB, How to resolve this, 'BG is picture box
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tic Dim img As Bitmap
img = New Bitmap(System.Drawing.Bitmap.FromFile(FileIO.FileSystem.GetFiles
I am trying to create bitmap with my text and transformation. I am sure that there is no error in my code. Because this code is worked previously. Here is my code.
I have a grass image located here in my directory. I want to just create a Bitmap, but I am getting an error. (Parameter is not valid.) Immediate Window: A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll
I have a Access program and I'm using VBA code in the background to run Winunzip using shell command. Well, the path of the .zip file has spaces in it and it's not recongizing the path as a valid path. Is there a another way to tackle this problem besides the shell?I can't us pkzip either. Has you can see I had to use progra~1 instead of Program Files.[code]
I was googling / searching the forums for this type of code.I want to be able create a folder within my application folder, mainly because I don't want people using my program to use a specified path to be able to use my program.
Example,If I would using a specified path It would be ("C:/Macbrutal/Foldername")And the user who would install my application surely, doesn't have macbrutal as username for windows so their path would be ("C:/User/Foldername") and that would bring my program an error, if you get me.
So to brake it down a little, Let's say my path for my program is ("C:/Macbrutal") I want my program to generate a folder where my application is located (not with specified path) which would be (C:/Macbrutal/newfolder")
I have a bunch of objects, they aren't in XML but the xml document would look like this[code]...
The tree is obviously very deep. Does anyone have an algorithm to create this into a jstree, series of "UL" and "LI". It would be christmas if you had the code in vb...but I will be satisfied with just the logic. My thought is to eventually make this into a jsonp web service so I can use jstree to build a tree, but for now im just trying to understand the logic necessary to parse this correctly.
I have a bunch of objects, they aren't in XML but the xml document would look like this:
<object> <path>root</path> </object> <object>
[code]....
The tree is obviously very deep. Does anyone have an algorithm to create this into a jstree, series of "UL" and "LI". It would be christmas if you had the code in vb...but I will be satisfied with just the logic. My thought is to eventually make this into a jsonp web service so I can use jstree to build a tree, but for now im just trying to understand the logic necessary to parse this correctly.
I have a VB 6.0 code that creates file/directory on given path. If the path is local or a mapped drive then it's working fine but if I am having a network path like \netpathputfileshere" then it is not working. If I mapped "\netpathputfileshere" to some x: drive on local then it will work fine BUT I need not mapped this path. So is there any way to do this directly on network path. I get error for ChDrive "\netpathpullfileshere"
I have completed my VB project using vb 2008 express edition..I am not able to create a set up file for my project and I think it is because of the file path i have provided in my program
dbSource = "Data Source = C:Documents and SettingscfadminDesktopLead_managementLead_Management_ProjectLead_Management_ProjectLondon.mdb"
The above path is a fixed path which connects my program to the database. Now when I create a set up file and try to run on another machine it wont recognize this path . have placed the database in the same folder that of the program.