Is there a way in Visual Basic 2008/Framework 2.0 to create and save a 8bits bitmap(Format8bppIndexed) to a .GIF file using custom colors(about 30) instead of the standard web colors?
If not, is there a way to convert a 24bits or 32bits bitmap to a 8bits bitmap using custom colors?
In VB6 I drew a bitmap pixel by pixel (the pixel would a small square - not a pixel on the screen) using the line command, the coords, the colour and using the 'box fill' parameter [code]...
VB 2010, Trying add custom colors to a dialog box, save and reload on opening. The "add custom color button" just adds it to the boxes on the left and does not save it for future use. If the user select that color having added it the left you can then get the integer value and add it to the code
ColorDialog1.CustomColors = New Integer () {CustCol1, 16646145, 16580610, 16645891, 16711426, 65536, 6699546} And save for displaying next time. but it does not return the same color.
Why does it return a different color, it displays the correct color when used at the time of saving? Is there no way of saving all the custom colors, if a user puts several in the boxes on the left? You have to make sure you select Basic color first otherwise it changes existing custom color or if you select a blank box you cannot select anything.
When custom colors are added via code as above it goes along the top row first but when you click the "Add custom color button" it adds the first color to first position of the top row and the next to the first position of the bottom row. How to add custom colors to a dialog box, save and reload on opening.
I created a bitmap, that is supposed to be displayed on the screen, in the middle. It will have to be on top of EVERYTHING!! Even if a full screen application is running, I want it to show. My questions are: Is it possible to even display a CUSTOM MADE bitmap on the screen?
Option Strict Off Imports System.Drawing.Drawing2D Imports System.IO[code]....
I have 6 bitmaps, all the same size. Their ImageFormat is Format32bppPArgb. Sometimes when I try to resize the bitmaps I get the Out of Memory message. This doesn't happen all the time, only after about six or seven resizes.In Task Manager, the program's memory use never goes above 800k.Is there a way to resize a Bitmap without creating a new one?If I have to recreate the Bitmap, do I need to dispose the current one (or set it to Nothing)?
I am trying to create 5 Bitmaps 'on the fly' which I want to use in a ToolStrip DropDown.So far I have found a working way but I wonder if there isn't an easier way to do that?The reason why I have to create this images 'on the fly' is because users can select different colors for the Categories (which I have managed with Button(x).BackColor, so, in order to have the Menu Items shown the exact same colors I try to get a Bitmap based on the Button's back color and add it as MenuItem picture.Here is my code to create the images:
Public Sub MenuCategoryImages() Dim menuPic1 As Bitmap = New Bitmap(24, 24, PixelFormat.Format1bppIndexed) Dim pal1 As ColorPalette = menuPic1.Palette
if there is a quick way of creating a new blank bitmap say 1680x1050 - just wondering cause i want to make a live animation that is this big ... but when looping this it is fairly slow while doing this...I have tried:
New method: Dim B as new bitmap(1680,1050)
Create once then clone:
Static NewB as new bitmap(1680,1050) Dim B as bitmap = NewB.Clone[code]....
All of the above are about as slow as each other...
The Vb.Net application creates a bitmap from scratch and either converts to a tiff or sends it to a printer. In both cases, the quality of the image (in this case the font) is not good at all. The sample code listed below creates the graphics object that I use to write to the image.
Dim gr2 As Graphics = Graphics.FromImage(New Bitmap(800, 1000), Imaging.PixelFormat.Format32bppPArgb))
I have a array of pixels. And I would like to Quantize them.
For Example
FF00FF,00FFFF stuff like that, but most are custom colors and are not a standard 256 color palette. So I need code to convert a color to a 256 color. I dont have any idea on how to do this, but thats why I came here. I do not want to use System.Graphics.Image.Palette or anything like that as this project uses arrays for images. I would like to if at all possible be able to convert a R, G, B color to 8bit, 16bit, 256bit and possibly use the HSL or NeuQuant method or something close to that, or maybe even some other methods of doing it. I do need to be able to do this for a single pixel, but I will also need a method for a array of them.
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
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
I would like to create an order form for my ASP.net page (I included an example image below). However I don't know how to approach this. I'm assuming the best method would be a gridview but it would involve two levels of grouping. Other requirements would be be to accept a quantity and then calculate the total price. Can anyone point me to some good books or websites that explain creating custom grid views like this (or maybe a better method than using gridview, I'm open to whatever). I consider myself to be an intermediate programmer in asp.net.
Is this possible? I am trying to create my own "X" and "minimize" buttons on my form -- the only way that I can currently think to do it is by making my form have no border, and creating a 'fake' menu bar using labels and buttons for minimizing and maximizing. The goal here is to be able to have custom icons for maximize, close, etc that may not match the Windows default scheme.
want to create a custom control of the button such as the button will be a bit enlarged and with a different colour.A custom control is a class that either inherits the Control class directly or some other control.So Iadded class named class1.vb and added this line:Inherits System.Windows.Forms.Button
Iam developing a OS using wince Kernel.It supports .net framework 2.0.
so i succesfully extracted the kernel and i booted my mips processor,Now i can see a black screen running wince kernel.
Now i want to create a form that should look like a desktop in vb.net and should have desktop Properties.cool huh?
what are the properties of the desktop.
Property-1
The Deskstop should be attached at last.
For Example:when a application is opened it should have the capability to open the application on the top of the Desktop.
and it should be locked on the background.
Property-2
If i close a application in my kernel the application is closed but the image stays still because there is no desktop background to repaint itself.so i want to create a form with the two properties above Mentioned.
I'm having a bit of trouble with my project here... and Google isn't helping very much. To put it briefly, I'm currently making a sticky note program (one fairly similar to Sticky Notes, for those of you familiar with Windows Vista or 7). It's relatively simple, as the "note" itself is basically a glorified Rich Text Box.
My problem is this: I obviously want to allow some for some customization with the font, however I don't want to use a standard full-on Dialog Box. So I designed a small form with 2 Combo Boxes--one for font and the other for size--and 2 buttons, "OK" and "Cancel". What I'm attempting to do is program this form (named dlgFont) to more or less be recognized as a Font Dialog Box. I've got some of it figured out I think, but I can't seem to put the pieces together in a way that actually works.In the code for my main form, I have this within the Class... stuff:
Friend WithEvents dlgFont As System.Windows.Forms.FontDialog
As for the Command Button that pulls up the dialog box itself, well, it's actually a Context Menu Strip Item... I'm not really sure what to put. So far I've only tried this:
dlgFont.ShowDialog
And for the Apply event, I've got the generic stuff:
Private Sub dlgFont_Apply(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dlgFont.Apply If dlgFont.ShowDialog = Windows.Forms.DialogResult.OK Then Me.Font = dlgFont.Font End If End Sub
That's all I have for the main form. This is what dlgFont looks like: 'A limited-ability font dialog box.
I am working on a project that has some events already created and working. One of these events is called SelectedIndexChanged Event. I am using it for one of my Subs in my frmNewInspection Class, and I am trying to use it for a second Sub and it says that "Event SelectedIndexChanged Cannot Be Found".
The event is created here in a class called LabelComoBox Private Sub tctlInspection_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tctlInspection.SelectedIndexChanged 'MsgBox("Index: " & tctlInspection.SelectedIndex.ToString) [Code] .....
I want to create a folder " c:imagebox " when the user runs my setup. I tried this in " Add special folder --> Custom folder " then a folder appears i renamed it to ImageBox and in default location i typed " C: " and set its property to always create but when i tested the setup on xp an vista i did not created any folder.
I am wondering if I can extend a component (e.g a button ) in vb the same way I can in java which enables you to modify the component for your specific requirement or create a new one from scratch.
I am new to VB 2008 having spent most of my time in 2003. What is the recommendation for the best place to get a primer on creating custom controls in VB.NET. I prefer to use VB directly and not the WPF.
I have a form that is populated with specific data for each user. The user chooses this data themselves.I plan on saving this data in the application settings or via xml serialization.What I want to do, is allow users to generate a unique code for that data so that they can supply this code to others and all they will have to do is copy and paste it into their client and that data will populate for them.I could just allow users to trade XML files, but I want it to be easier than that.The form is basically setup this way;
Picture - Data 1, Data 2, Data 3, Data 4 Picture - Data 1, Data 2, Data 3, Data 4
The pictures correlate to pictures that are numbered anywhere from 0-600. The data can be any integer value from 0 - 200.
I'm running several different automated processes and when I get done with them, I show the results in a form with various controls.
In this form, I use Panels, Labels, TextBoxes, and TreeViews, and ListViews to display a wealth of information.
When the automation part is done, I want to be able to log this info and save that log file on the User's PC.
I thought it would be best to make a custom file extension and then hash it with MD5.
I'm pretty sure I can get all of that done. The problem is that I'm not sure how I would load that info back into the application.
Since the log files will appear on a seperate form, I can't just load the data back into the original controls.
Would it be best to create a blank template of controls and then load the data into those controls? Or is there a way to save content "as is", controls and all?
I got this whole thing pretty well down (it's actually quite easy), but I've seen custom controls created where you can click that little arrow on the top-right corner and add things or change things about it.
How exactly is this done? I'd Google it (which is why you don't see me post here too often) but I really don't know how to describe it.
Here at my company we have an Access application that allows users to create documents based on invoices that are in Great Plains, an accounting program. Documents such as invoices, packing lists, export documentation, etc., etc.This application is very old and very hard to maintain so we're doing a rewrite and I've chosen this project to be my first Visual Basic .NET project.Basically what the application is going to do is allow users to do the following:
Pull up invoice information and then add some secondary information such as comments and the like Choose which documents they want to print out Open the documents and then allow the user to edit the documents That last part is the tricky part. The users right now create these documents out of Access and print to a PDF and then edit the PDF with comments that can be specific to the document and customer. If they didn't have to do that, then I could just used canned reports or something.
What I am thinking of doing is creating Word templates with text boxes and inside those text boxes adding addressable bookmarks. When the user goes to print the documents, open Word, populate the bookmarks from the database (SQL Server) and then that will let them draw text boxes and fill them with whatever they want before they print the documents and then they can save them.
Here's the code I worked out to do this (of course the final result will be much more complex):
Public Const wdPageBreak = 7 Dim oWord As Word.Application Dim oDoc As Word.Document