Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

pnpfriend

@pnpfriend
About
Posts
391
Topics
198
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • converting 24bit color depth image to 1bpp image
    P pnpfriend

    Thank You Dave. I had looked at that link and already using it. There is a problem so I had to post this message here. I should be more specified on my question. Here is what i want.. I have color Jpg image file and I converted it to black and white tiff image using colorMatrix. Everything came out good but the tiff image is in 24 bit color depth. I need it to 1 bit color depth and should not change the look of tiff image. I also found out if the tiff image is in floyd-steinberg and it can have grayscal with 1pbb. But I just dont 'know how to do it. Here what i did. 1) convert the jpg to GrayScale() using colorMatrix 2) then use the result image which is black and white with 24 bpp and convert it to 1bpp using the example on this link http://www.wischik.com/lu/programmer/1bpp.html[^] but the image turn all black and white .. no more shadow.. depth like I have before.

    Visual Basic graphics question

  • converting 24bit color depth image to 1bpp image
    P pnpfriend

    Hi, I am trying to convert the 24 bit image to 1 bit image. How can I convert it. I had tried the following code and obviously it didn't work. Thank You. Public Function ConvertTo1bpp(ByVal img As Bitmap) As Bitmap Dim rc As New Rectangle(0, 0, img.Width, img.Height) Dim bmpS As New Bitmap(img.Width, img.Height, PixelFormat.Format1bppIndexed) bmpS.SetResolution(img.HorizontalResolution, img.VerticalResolution) Dim bmpDataSet As BitmapData = bmpS.LockBits(rc, ImageLockMode.ReadWrite, PixelFormat.Format1bppIndexed) Dim bmpDataSource As BitmapData = img.LockBits(rc, ImageLockMode.ReadOnly, img.PixelFormat) bmpDataSource.PixelFormat = PixelFormat.Format1bppIndexed img.UnlockBits(bmpDataSource) Return img End Function

    Visual Basic graphics question

  • Saving MS Word's embedded objects
    P pnpfriend

    Hi Is there anyway to save Microsoft Word Embedded Object to my local drive programmatically? I am using InLineShapes and OLEObject but do not know how to save those embedded objects, Please.

    C# hardware tutorial question

  • Is it possible to add import dll during runtime?
    P pnpfriend

    Hi all, I do have lots of dlls saved in one folder and the new dll will be added to the same folder frequetly. I also have a program, myProgram, that needs to reference all dlls in that folder. Inorder to use the functions/methods of a dll, we have to 1) add Reference to myProgram, 2) using mydll; 3) create the instance and call the appropriate function. So how can I add the reference and import the dlls as the program click on Button so I can use functions from those dlls. or is there any other ways that myProgram to find out if there is new dll in the folder and start using it without recompliing myProgram.

    C# question

  • host application and add-in application
    P pnpfriend

    Hi I do have an managed c++ application. I would like to write the addin application for my application. So I went to create the sheared add-in in visitual studio. Select Create New Project->Extensiblity->Shared Add-in. The wizard asks for application host name. There are Miscrosoft word, microsoft excel.. etc. How can I make my application, the one I wrote, showed in the host list in wizard? Thanks

    C# question c++

  • creating addin or plugged in application
    P pnpfriend

    Hi I do have an managed c++ application. I would like to write the addin application for my application. So I went to create the sheared add-in in visitual studio. The wizard ask for application host name. There are Miscrosoft word, microsoft excel.. etc. How can I make my application showed in the host list in wizard? Thanks

    Managed C++/CLI question c++

  • MAPIFolderPtr olItemType
    P pnpfriend

    Hi I am reading all the emails and having problem identifying the type of the email. I use MAPIFolderPtr and browse all the email items. I used UnManaged C++ MAPIFolderPtr MFolder _ItemsPtr mItems; _MailItemPtr mItem; _AppointmentItemPtr aptItem; ..... ..... mItems = MFolder->Items; for(int index=1;indexCount;index++) { if (MFolder->DefaultItemType == olMailItem) { mItem = mItems->Item(x); .... } else if (MFolder->DefaultItemType == olAppointmentItem) { aptItem = mItems->Item(x); ... } .... } However MFolder->DefaultItemType is always returning olMailItem. I also used MFolder->DefaultMessageClass(), etc. but Dont' know how to find out what type of item it is. How can I find out itemType so I can get the right mail item? Thanks.

    C / C++ / MFC question c++ database help tutorial

  • How to Rreference COM object(tlb file) in VC++
    P pnpfriend

    You have to import the tlb file to ur VC++ I declare it in header file. #import "C:\myDll\mydll.tlb" raw_interface_only ... .. public Void INiComObj() { CoInitialize(NULL); HRESULT hr = CocreateInstance(CLSID...) }

    COM com c++ tutorial

  • C# class library
    P pnpfriend

    Hi I am creating dll using C#. I made the research and little bit confused with following: 1) does all the classes need Guid? 2) Does all the class need interface classes? or can I have just regular class without interface and Guid? [Guid("....")] public interface myclass_interface { .... } [Guid("...."), ClassInterface(ClassInterfaceType.None)] public class myclass_class:myclass_interface { .. } 3) Can library have static function/procedures so other classes can call them directly? 4) Can I have a class, that will not be calling from COM client, without a guid? Thank you.

    COM csharp com question

  • Creating Class library (COM object)
    P pnpfriend

    Hi I am creating dll using C#. I made the research and little bit confused with following: 1) does all the classes need Guid? 2) Does all the class need interface classes? or can I have just regular class without interface and Guid? [Guid("....")] public interface myclass_interface { .... } [Guid("...."), ClassInterface(ClassInterfaceType.None)] public class myclass_class:myclass_interface { .. } 3) Can library have static function/procedures so other classes can call them directly? Thank you.

    C# csharp com question

  • debugging C# dll
    P pnpfriend

    I found [Build][Comfiguration Manager] in Vistual Studio 2003. But not in visual studio 2005. I'm using Visual Studio 2005. I need to know how to debug myCShart.dll from different program that could be written in VB.Net, C# or C++.

    C# csharp debugging visual-studio tutorial

  • debugging C# dll
    P pnpfriend

    Hi I have created dll using C# and add reference to another project that was written in VB.net. so I have two project, one is using C#, the other one is using VB.net. Both written in Visual Studio.net 2005. When I set break point of my function from dll project because that's what I want to debug. So I started running CallingDll VB project in debug mode, I got following message The following module was built either with optimizations enabled or without debug information: C:\myDll.dll To debug this module, change its poject build configuration to Debug mode. To supress this message, disalbe the "Warn if no user code on launch" debugger option. Where should I change it? I went to Project\Properties, I couldnt' find anything that said Debug Mode. I looked into Debug, I found StartAction, Start Options, enable debuggers. I changed put Start external program: "c:\CallDll.exe" and then build and run the project in debug mode. but I still got the same message and I couldnt' debug myDll.dll at all neither from myDll project nor callDll project. I also looked into Build.. I dont 'see anything that is saying debug mode. I check the MSDN and saying the same thing.. to change it to Debug mode. But where should I go and change it so myDll.dll can be debug. I recreated myDll.dll and CallDll.exe using visual studio 2003. I had no prolem debugging. but not with visual studio 2005. Would anyone please tell me how to debug myDll.dll from another project like CallDll?? Thanks

    C# csharp debugging visual-studio tutorial

  • Creating PrinterPort
    P pnpfriend

    You are right, but I can's save to the specific location for all the files at once. Everytime the document prints, I got Message Prompted asking me where do I want to save the output file. Here what I did when I add new Printer. 1) Add Printer 2) Click Next 3) Select Local printer attached to this computer 4) Click Next 5) Print To File Port 7) Select Printer Driver like HP Laser Jet 5Si PS When I print test page, the printer ask me where I would like to save every time I print. I would I tell the driver to save all the printed pages to specific location with user defined name?? From what I userstanding, port is the one who saving all the printed data into specific location? If I'm wrong, please correct me. Thanks.

    C# tutorial question

  • Creating PrinterPort
    P pnpfriend

    Port like FILE;(Print to File) using existing HP print postscript driver. There isn't actual physical printer. Thanks.

    C# tutorial question

  • Creating PrinterPort
    P pnpfriend

    Hi, Is there anyway to create the port for the printer and its interface? I browsed online and couldnt' find any. I am not sure how to do it at all.. if you know any links or reference please tell me. Thanks

    C# tutorial question

  • Couldn't click any botton using BackgroundWorker
    P pnpfriend

    Is it returning to the UI Thread? Invoke(new BrowseIFFDelegate(BrowseFileFolder)); It is working now for me after I added Application.DoEvent(); I am not so sure if it is in BK worker or not anymore but I can now click on cancel button. Thanks for your help mike.

    C# help tutorial visual-studio learning

  • Couldn't click any botton using BackgroundWorker
    P pnpfriend

    I know.. there might be something is totally wrong on what I am doing. but i just couldnt' see it. Yes.. I believe my function is running the BackgroundWorker thread.. but looks like i am not. therefore I posted my code at first place. Please refer to my first post. I worte down exactly what I did.. I'm trying to get the file and folder information using recursive. since there are lots of files to browse I would like to allow the user interrupts by clicking Cancel Button. However, I can no longer click any button once the program gets into that function. I used Invoke method too. So what am I missing? what am I doing it wrong?? Please guide me, point me out my error. Thanks.

    C# help tutorial visual-studio learning

  • Couldn't click any botton using BackgroundWorker
    P pnpfriend

    Thank you Mike, I have Invoke Methods.. I do not have any problem updating any of my form controls only that after I called the invoke method.. ( when the user click on Start Button) I can no longer click on any of form buttons like Cancel Button. I would like to enable user interrupting whatever the program is busy working after the Start Button got clicked. Thanks.

    C# help tutorial visual-studio learning

  • Couldn't click any botton using BackgroundWorker
    P pnpfriend

    Hi, I'm new to Threading.. After learning how to work with threading, I found out that I could use BackgroundWorker since I'm using VS 2005. I also check on the example and try to do the same like following. However I couldn't click on Cancel Button after I click StartButton. I couldn't interrupt what my program is currenting doing. I dont' know what I am doing it wrong. I couldnt' find the answer. Please help me. Thank you. My form has StartButton, Cancel Button, Edit Text To Display the message 1) Add BackgroundWorker to my Form, 2) Set WorkerReportsProgress = False 3) WorkderSupportsCancella = True; 4) Add DoWork and RunWokerCompleted events 5) Add event to StartButton, and Cancel button. 6) Add functions: Private void BrowseFileFolder(),that will browse the folder given and then get all file information. private void BrowseFF(BackgroundWorker bk, DoWorkEventArgs e), 7) Add another function: public delegate void BrowseFFDelegate(); because i got error calling BrowseFileFolder() directly from DoWork(). 8) OnStartButton() -> myBkWorker.RunWorkderAsync(); 9) OnMyBkWorker_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorkder worker = sender as BackgroundWorkder; BrowseFF(worker,e); } 10) private void BroswerFF(BackgroundWorker bk, DoWorkEventArgs e) { BKWorker = worker; workerEvent = e; Invoke(new BrowseFFDelegate(BrowseFileFolder)); } 11) private void BrowseFileFolder() { if(BKWorker.CancellationPending) { workerEvent.Cancel = true; return; } else { DirectoryInfo dirfolder = new DirectoryInfo(pathToBrowse); .... .... //Getting file and folder information .... } } Thank you.

    C# help tutorial visual-studio learning

  • MySQL inserting UnicodeStr
    P pnpfriend

    I am using 4.1.10a-nt-max after I called Select Version();

    C# question database mysql announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups