hi guys i've written an bare OS and now im trying to go a little furthur and create a very simple GUI for it . but i have no idea how to create such a thing . my os is running in text_mode though i can change to some other mode but it will couse some problems as i've written nearly all the nessecary libraries of c myself (couse i didn't have them for direct developing ) and by doing this it will be no longer possible to write characters on the screen . i got to write a VGA …

Member Avatar
Member Avatar
+0 forum 5

Did you know that you can data bind a bitmap to a PictureBox's image property, and the source image doesn't have to be in a binary format stored in a data table? Using a standard object setup for data binding (iNotify etc.) you can easily update your program's image propertie's from one place.

Member Avatar
+0 forum 0

NOTE: The games GUI is not fully implemented, so changing it's image and difficulty is done manually in the Button.Click Event NOTE: Whether you download the VS2013 source file or copy and paste the code, you need to download, and extract the two image files to the project's "Bin\Debug" directory. If you copy and paste the source ensure your form has the following controls: Button (Button1) PictureBox (Name:pbGameBoard, Width:792, Height:792) # THE GAME # This is a fun example using graphics. It is a representation of the classic tile slide game, where you slide the tiles around to make the …

Member Avatar
Member Avatar
+1 forum 1

I'm creating multiple custom info windows using only one xml layout, all of the info inside the window will be put In programmatically. I am now trying to give the ImageView an image but when I do that for one marker all of the other markers ImageView images become the same, any idea why? final Bitmap bmp = BitmapFactory.decodeByteArray(data, 0,data.length); if(postc.getAuthor().getObjectId().equals(ParseUser.getCurrentUser().getObjectId())){ Marker oldMarker = mapMarkers.get(postc.getObjectId()); final MarkerOptions MarkerT = new MarkerOptions().snippet(postc.getTContent()); MarkerT.title(postc.getAuthor().getUsername()); MarkerT.position(new LatLng(postc.getLat(), postc.getLong())); MarkerT.icon(BitmapDescriptorFactory.fromBitmap(bmp)); final Marker markeri = map.addMarker(MarkerT); map.setInfoWindowAdapter(new InfoWindowAdapter(){ @Override public View getInfoContents(final Marker marker) { View v = getLayoutInflater().inflate(R.layout.custommarker, null); final LinearLayout ll = (LinearLayout)v.findViewById(R.id.ll); …

Member Avatar
Member Avatar
+0 forum 1

I want to know how I can have an array of strings for example: a[] = {A,B,C,...,Z} and then randomly choose one character from the array (for instance 'F') and apply a font format from windows on it and then render that particular letter in the form of Bitmap image with specific width and heights pixels and display the image to the user (for example in the image box in my form).

Member Avatar
Member Avatar
+0 forum 1

Hi All, My problem is: i'm trying to convert byte[] into image. The byte[] comes from JSON and it's in this format: `"4oCwUE5HDQoaCgAAAA1JSERSAAAAfwAAAFAIBgAAADBHwqrDsAAAAAlwSFlzAAAAJwAAACcBKgnigJhPAAAgAElEQVR4xZPCrMK9ecWSZcOZfcOfw7c5w5vCvW/CqXp..."` it goes for another 100 lines. The code where the problem occurs: DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(PlayersListActivity.URL); httpPost.setEntity(new UrlEncodedFormEntity(parameters, "UTF-8")); HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); BufferedHttpEntity bufferedEntity = new BufferedHttpEntity(httpEntity); // if this is null the web service returned an empty page if(httpEntity == null) // response is empty so exit out return null; String jsonString = EntityUtils.toString(bufferedEntity); // again some simple validation around the returned string if(jsonString != …

Member Avatar
+0 forum 0

Hello. I have been looking long and hard for an image library that meets these criteria that I have for pretty much any library I will use (with some obvious exceptions): A) Cross-Platform (If at all possible) B) Weightless (or nearly weightless) C) Stand-alone (I hate having to include DLLs in my projects, SLLs are fine though) D) Relatively Simple E) Standards complient (If there are standards for image loading?) F) Long-lasting (I hate when I have code that I have to re-write tons of code because a library I used ceases to be supported. [Of course I use modularization …

Member Avatar
Member Avatar
+0 forum 2

Hello, I am making a program that deals with bitmap files and I want to try to load bitmap data manually. The issue is that I cannot find a good resource for exactly what bitmap files can contain. [Wikipedia](http://en.wikipedia.org/wiki/BMP_file_format) has a decent article, but it is missing some important information. For example, it only explains how BITMAPINFOHEADERs work, but I would need to know how all of them work. Also the examples on wikipedia show integers stored in a sort of interleaved-endianness... I am wondering if normal c-style stdio file io would accurately read these values. Basically I just need …

Member Avatar
Member Avatar
+0 forum 6

Hello everyone! So I wrote a program that simulates a dice game, almost like the game of Craps. I want to turn this normal console app into a dialogue based MFC. So I would create a button labeled "Roll" and the window would show two die being rolled. Here is the code I have for the condole app. It works perfectly, but I am so confused as to how to assign the code to the button and also how to assign the die faces to its respective bitmaps. I appreciate the help! //Game of chance "Craps" #include "stdafx.h" using namespace …

Member Avatar
Member Avatar
+0 forum 1

Hi everyone. I'm used to programming in C/C++ and I've created some dialog based windows apps. Recently, I've got an assignment at work to learn C# + WPF and its capabilities showing video. My company works with cameras and my job is to create an app to show their feed. Learning C# was fairly easy as many people say C# is easier than C++ but I struggle with WPF. A LOT. For starters, I have a 10 second HD video converted to bitmaps frame by frame and I'm supposed to show them. I should test the performance when adding more …

Member Avatar
Member Avatar
+0 forum 1

Anyone has any idea why this error is happening? The weird thing is that this page works in one server but not in another. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Parameter is not valid. Source Error: Line 37: Line 38: Dim streamImage As MemoryStream = New MemoryStream(byteImage) Line 39: Dim bitmapImage As Bitmap = Bitmap.FromStream(streamImage) Line 40: Dim imageId As Integer Line 41: Dim opeSubNum As String = …

Member Avatar
Member Avatar
+0 forum 2

So, this seems like it should be the default to me... if you're going to make your own picture for a button, I don't see why you'd want the default border around it, but I can't for the life of me figure out how to get rid of it. I also need to change the picture of the button while it's pressed (and change back once it's released) so you can tell that you're actually pressing it. I actually did figure this out yesterday (It literally took all day though.), but deleted the code because I decided not to use …

Member Avatar
Member Avatar
+0 forum 5

Situation: i have a bitmap loadedImage1 which the user is able to resize, and move around inside picturebox1. objective: this loadedImage1 is then to be added to a pdf document (which is working) but needs to be using the current size and location(as the user can move it around) atm: the picture gets added, but the image is resized to fit the control, so the user's movement and resizing is ignored. picturebox_double click looks like [CODE] // load image to image object loadedImage1 = Image.FromFile(openFD.FileName); // set initial rectangle bounds for image imageBounds1 = new System.Drawing.Rectangle(new Point(), loadedImage1.Size); // refresh …

Member Avatar
Member Avatar
+0 forum 5

So i'm creating a form, on the form is a panel (panel1) which holds all data, pictures etc... This is then to be made into a bmp for professional printing (ie 300dpi). A4 @ 300dpi = 2480 x 3508; i am able to create the image at the panel's height and width. and i have also recently got it to create a document 2480x3508, but the panel is being shown in the top left corner with a whole lot of white space.. what am i doing wrong?.. is there a [I]Better [/I]way to create this image, as quality is a …

Member Avatar
Member Avatar
+0 forum 4

hi, i wrote the following piece code to create a new bitmap file with random RGB values. I wanted to copy the header from the input file. the problem is it adds two additional bytes to 3rd and 4th (just after the magic number). i can't figure out why. // img.magic.magic[2] = 'G'; // img.magic.magic[3] = 'Y'; if i uncomment the above lines. those bytes will be replaced by 'G' and 'Y'. can anyone please explain me what's going on here? thanks in advance. [CODE] #include <stdio.h> #include <stdint.h> #include <fcntl.h> #include <stdlib.h> #include <inttypes.h> #include <sys/types.h> #include <unistd.h> typedef …

Member Avatar
Member Avatar
+0 forum 5

Hi! In my direct 2d game i want to draw a big background picture entered by the user. Im currently trying to do this as described on [url]http://msdn.microsoft.com/en-us/library/ee719658%28v=vs.85%29.aspx[/url] . Altough it gives me read error at pos 0x0000. Heres the code: [CODE] RECT rc; GetClientRect(hWnd, &rc); using namespace D2D1; //Render Target ID2D1Factory *pD2DFactory = NULL; HRESULT hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED,&pD2DFactory); ID2D1HwndRenderTarget* pRT = NULL; hr = pD2DFactory->CreateHwndRenderTarget(RenderTargetProperties(), HwndRenderTargetProperties(hWnd, SizeU( rc.right - rc.left,rc.bottom - rc.top)), &pRT); // Wallpaper IWICBitmapDecoder *pDecoder = NULL; IWICImagingFactory *pImagingFactory = NULL; hr = pImagingFactory->CreateDecoderFromFilename(L"wall.jpg",// Image to be decoded NULL, // Do not prefer a particular vendor GENERIC_WRITE, …

Member Avatar
Member Avatar
+0 forum 1

Hi all. I have a requirement to collect a bitmap image directly from a given AVI file. Does anyone know of any decent .Net only libraries that by any chance can achieve this? I would like to avoid any COM interops if possible but if you have had experience using any in a .Net environment which worked well I am open to suggestion. I have given DirectShow a go and while it works, it seems pretty cumbersome to for what I am trying to achieve. Thanks

Member Avatar
Member Avatar
+0 forum 1

Hello. I'm creating a program with dialog editor. How can i set bitmap on button? I set bitmap at properties to True. I tried to search on google but i could only find how to set bitmap on button created with CButton. Thank you

Member Avatar
Member Avatar
+0 forum 5

I have a curius problem with my bitmap writing function, it takes a char array and writes a 24 bit BGR bitmap. It was working fine using an array captured from a camera, I printed out the content of the first couple of bytes: 132 135 131 132 135 131 139 138 133 135 138 130 138 140 131 135 138 129 140 140 131 And my code below produces a lovely bitmap from that information, however, I am trying to average a load of these pictues and to do that I need to make my own array. I've made …

Member Avatar
Member Avatar
+0 forum 4

I am trying to write a char array to a bitmap in c++. I (think) i know what values I need in my file header and bitmap info header, and i have looked at some examples but I cant seem to solve this problem (i'm sure its something stupid) In the code below, writing the file header is fine. I am writing the info header in exactly the same way, but it comes up with: error C2227: left of '->biSize' must point to class/struct/union/generic type 1> type is 'LPBITMAPINFOHEADER *' for the whole header, this made me think to use …

Member Avatar
Member Avatar
+0 forum 1

It may seem like a simple answer, but how do I pass an image to a bitmaps constructor. for example: [CODE]Bitmap bmp = new Bitmap(########);[/CODE] what would I put in place of the pound signs If i wanted the default image to be C://Users/Me/Documents/Visual Studio 2010/Projects/MyProject/Image.jpg Please help.

Member Avatar
Member Avatar
+0 forum 2

[CODE]private Bitmap _picture = new Bitmap(@"<C:\Users\Jack\Documents\Visual Studio 2010\Projects\Animotion1.0\DefaultCharPic.jpg>");[/CODE] as a datamember to a class? Can I just not assign Bitmaps as members?

Member Avatar
Member Avatar
+0 forum 1

Hello! I am trying to display a FITS image, if your not familiar with the extension its fine (gtk.Image.new_from_file() isn't either). I can get my image data to a numpy array (2D (256x256 to be exact)) I am having the most difficult time getting this into a grayscale image. I've tried gtk.Image() Ive tried pixbufs and pixmaps everything on the web. I'm having trouble making the color scales/maps. Something about visuals? My computer didn't have any that would work (debian linux). I've been slamming my head against the wall for days over this one and It seems like it should …

Member Avatar
Member Avatar
+0 forum 1

I have no idea how to move a bitmap with the arrow keys. Here is my code [CODE] #include <windows.h> #include <tchar.h> #include <stdlib.h> #include <string.h> #include "Menu.h" #include "Icon.h" LPCTSTR ClsName = L"App"; // Class name LPCTSTR WndName = L"WindowsAPI"; // Window title HWND hwnd; // Handle to our main window //////////////////////////////////////////////////// LRESULT CALLBACK WndProcedure(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam); //////////////////////////////////////////////////// INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) { MSG Msg; // Structure to hold messages for our WinProc WNDCLASSEX WndClsEx; // Our WNDCLASSEX structure used to define a window // Define our window WndClsEx.cbSize …

Member Avatar
Member Avatar
+0 forum 24

Which is better Double Buffering or assigning to a Static Control. I would like an example of double buffering or both. This is my bitmap code. [CODE] #include <windows.h> #include <tchar.h> #include <stdlib.h> #include <string.h> #include "Menu.h" #include "Icon.h" LPCTSTR ClsName = L"App"; // Class name LPCTSTR WndName = L"WindowsAPI"; // Window title HWND hwnd; // Handle to our main window //////////////////////////////////////////////////// LRESULT CALLBACK WndProcedure(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam); //////////////////////////////////////////////////// INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) { MSG Msg; // Structure to hold messages for our WinProc WNDCLASSEX WndClsEx; // Our WNDCLASSEX structure used …

Member Avatar
Member Avatar
+0 forum 1

Hello Python community, I've just finished building an app with Python and I'd like to share my experiences and get some feedback. This was from scratch (no code templates) all the way to compile and distribution on a Windows environment. Now all my colleagues at work are using the app with no problems. I'll start off with some queries and questions that I had building the app, that I couldn't solve and then we'll move on to my experiences. 1. What is the standard way to put images on your toolbar buttons on other languages? Do you put your images …

Member Avatar
Member Avatar
+0 forum 12

hi all .. just want to ask if anyone have an idea how can i move image down throug keyboard cursors up an down .. i know that there is the keydown event and the keyup event but really i don't know how to write the code .. other qusetion how can i show images randomly with timer ? thanks

Member Avatar
Member Avatar
+0 forum 13

Hi, Iv had to convert a program from Java to C#, I thought I had done it, but it doesnt work, and Im at a loose end because I cant figure out why it isnt working. Anyway, what it is is a Mandelbrot Set that Im trying to display in a picturebox, I am drawing the fractal to a bitmap then getting the picturebox to display the bitmap. If anyone can explain what Im doing wrong that would be great. [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D; using System.Design; …

Member Avatar
Member Avatar
+0 forum 5

Ok I'm converting a program from Java to C# and currently stuck on a certain aspect of it. Ok I have; [code=Java]private Graphics g1; private Bitmap picture; picture = new Bitmap(x1, y1); g1 = Graphics.FromImage(picture); pbMand.Image = picture;[/code] pbMand is the name of my picture box, which I will use to display the image (not drawing directly to form, using PB). Then further on I have... [code=java] g1.setColor(Color.FromArgb(Convert.ToInt16(h), Convert.ToInt16(0.8f), Convert.ToInt16(b))); //djm test Color col = Color.getHSBColor(h, 0.8f, b);[/code] I can't find an equivilent form javas setColor to something in C#...It seems to lack anything colour related in g1's methods. And …

Member Avatar
Member Avatar
+0 forum 2

Hi all. Could anyone give me a pointer please? I've almost finished a project I'm working on but have one last issue to resolve. I have an image on a form that I apply a colour gradient to. However, when I grab this to create a bitmap (this.DrawToBitmap(BackGroundBmp, BackGroundRect);) I do not get the gradient. So, I've applied the gradient to the bitmap directly. However this is noticeably darker than the form image with the gradient over it. Any idea? Bitmap BackGroundBmp = new Bitmap(this.Width, this.Height); Rectangle BackGroundRect = new Rectangle(0, 0,this.Width, this.Height); this.DrawToBitmap(BackGroundBmp, BackGroundRect); Graphics g = Graphics.FromImage(BackGroundBmp); g.FillRectangle(RenderBGGradient, …

Member Avatar
Member Avatar
+0 forum 2

The End.