|
If you use a mdb file in your application, you can add it in the setup project and it will be included in the installer.
Besides, if the target machine does not have MS Access installed, you will need to include in your installer the Microsoft Data Access Components (MDAC), which can be freely distributed. You could install this components as a Custom Action in the setup project.
Hope it helped
|
|
|
|
|
Hello,
I want to resize the checkbox of the checkbox control.
I think, I should override the OnPaint event, but I do not know how.
Please help me.
Thank you.
|
|
|
|
|
If you want to resize the checkbox control itself (i.e., the rectangle including the text accompanying the checkbox), then you can use the "Size" property by indicating the new height and width of the control (or alternatively, you can directly change the values of the properties "Height" and "Width"). These changes can be made in the constructor of the Form on which the checkbox control is placed, after the InitializeComponent() has already been called.
However, if you are interested to change the size of the "checkbox" itself and not of the "control as a whole", perhaps the only method would be derive your own custom control with the appropriate size.
|
|
|
|
|
hi. i was wondering if anyone had encountered my problem before.
I have a print document and it works with the .print() method.
next i create a new printpreviewdialog and set its .document to the print document
what happens is that the printpreviewdialog shows an appropriate preview of the document, but when i click the print button it simple prints a blank page.
it is supposedly working before (i am extending a previous work)
can anyone tell me what the possible problems could be?
just an addition, for the printdialog, do i need to set anything for printer settings to work? (i.e. draft or best quality)
|
|
|
|
|
I have three question:
1.how do an abnormity form?
2.how display line-number in richtextbox control?
3.how display highlight color keywords in richtextbox control?
thanks!
|
|
|
|
|
1) I have no idea what you mean by an "abnormity form"...
2) A RichTextBox control is not a good candidate for this. There is no support for adding line numbers. You'll either have to come up with your own control or search the web for a control that does support this.
3) Look at the SelectionStart , SelectionLength , and SelectionColor properties.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
I meet a question in defeloping a addin project.
When I run the project with ide the first time ,I could find the icon of my addin in tool menu.
But when I run the project again in order to debug it, I couldn't find the icon, although I could find it in the addin project manager and I had set it enabled.
ps,I had download a sample of addin project from codeproject and change the code of it,then ,this question had never taken place in this project.
Had somebody met the seem question? and would somebody mind give me some advice.
You can send email to me .
my email is py1@263.net or buaa.pengyi@gmail.com.
thank you
|
|
|
|
|
could anybody help me? is this question too easy to answer or I haven't described it clearly enough
|
|
|
|
|
Hi
What I want to know is if the this.budget is a copy of the sent in object or if it just works as a ref?
/Regards Johan Hertz
<br />
public class Statment : System.Windows.Forms.TabPage<br />
{<br />
private XmlBudgetDocument budget;<br />
<br />
public Statment(ref XmlBudgetDocument budget)<br />
{<br />
ChartStatment c = new ChartStatment();<br />
this.budget = budget;<br />
Array bankaccounts = budget.GetAccountNodes();<br />
c.BuildBankaccount(bankaccounts);<br />
this.Controls.Add(c);<br />
}<br />
}<br />
|
|
|
|
|
It's hard to answer that question definitively without knowing if XmlBudgetDocument is a reference type (lives on the heap with only a memory reference in the stack/vtable) or if it's a value type (lives solely on the stack).
If XmlBudgetDocument is a reference type (like an ArrayList or most collection classes, for instance), then the 'budget' field will get a copy of the pointer to the original 'budget' parameter passed to the constructor, the two variables will point to the same object, and changes to one will be reflected by the other.
If XmlBudgetDocument is a value type (like a struct, or custom type), then the 'budget' field will get a distinct copy of the 'budget' parameter passed to the constructor - the copy will occupy its own stack space and changes to one will not affect the other.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Okej, I'm quite sure that it is a value type since I have not made anything "strange" with it. How do I make it in to reference type or is there some other way I should consider?
/Regards Johan
|
|
|
|
|
First off, do you understand the difference between value types and reference types? You don't have to do anything "strange" to create a reference type. There's very little a programmer has to do to make a type live on the heap.
I'll ask the original question a different way:
[Assuming you have access to the source code for XmlBudgetDocument]
Does the description (in code) of the type begin with
class XmlBudgetDocument ? -- reference type
or
interface XmlBudgetDocument ? -- reference type
or
struct XmlBudgetDocument {...} ? value type
or
enum XmlBudgetDocument {...} ? value type
or
<something else> XmlBudgetDocument {...} ?
If you need do not want to make a copy of the instance you're passing to the constructor of your class, your type should probably be either a class or an interface.
If none of this makes sense, you could just post the source code for your type and I'll try to go from there.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Ok it is a class so that would make it a reference right? So is it correct to say that when ever I pass a class to a function I just pass the reference to that class? And if so do I need to use the key word ref?
I think I understand at least the basic difference between value types and reference types. If I have a reference to a object it just a pointer to the memory where the object is located if it's a value type it a copy of that object some where else in the memory. Or am I completely wrong here?
/Regards Johan
|
|
|
|
|
I would like to create my own Formatters but have been unable to find examples. I want to be able to serialize my data in other formats besides binary and SOAP. Can anyone point me to some code that shows how to create custom formatters?
|
|
|
|
|
Aside from the documentation in MSDN, you might want to have a look at the implementation of SafeFormatter here.[^]
Not too complex, but it helps get the point across...
Good luck.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
i succeeded to capture my webcam using DirectX.Capture.dll
but i need to extract the vedio into single images something like foreach() or for()
any body has an idea for that
Miss With The Best And Die Like The Rest
|
|
|
|
|
Hello, Snouto
You can try to use Sample Grabber filter, if you wish to use DirectX.
Or, you can try Video for Windows, or even ffmpeg library - it depends on your needs.
Andrew
|
|
|
|
|
Ups, I've read your previous post.
The most common way is to use Sample Grabber filter in your case.
Andrew
|
|
|
|
|
how to use the grabber filter can you tell me man
with illustrative code please
Miss With The Best And Die Like The Rest
|
|
|
|
|
Hello.
Here is the code, I am using to access my cam. The code is using an interop library for DirectX - something similar to DirectX.Capture.dll. I hope, you will understand it and it will help you.
<br />
Grabber grabber = new Grabber(this);<br />
<br />
<br />
Type srvType = Type.GetTypeFromCLSID(Clsid.FilterGraph);<br />
if (srvType == null)<br />
throw new ApplicationException("Failed creating filter graph");<br />
<br />
graphObj = Activator.CreateInstance(srvType);<br />
graph = (IGraphBuilder) graphObj;<br />
<br />
UCOMIBindCtx bindCtx = null;<br />
UCOMIMoniker moniker = null;<br />
int n = 0;<br />
<br />
if (Win32.CreateBindCtx(0, out bindCtx) == 0)<br />
{<br />
if (Win32.MkParseDisplayName(bindCtx, source, ref n, out moniker) == 0)<br />
{<br />
Guid filterId = typeof(IBaseFilter).GUID;<br />
moniker.BindToObject(null, null, ref filterId, out sourceObj);<br />
<br />
Marshal.ReleaseComObject(moniker);<br />
moniker = null;<br />
}<br />
Marshal.ReleaseComObject(bindCtx);<br />
bindCtx = null;<br />
}<br />
<br />
if (sourceObj == null)<br />
throw new ApplicationException("Failed creating device object for the moniker");<br />
<br />
sourceBase = (IBaseFilter) sourceObj ;<br />
<br />
srvType = Type.GetTypeFromCLSID(Clsid.SampleGrabber);<br />
if (srvType == null)<br />
throw new ApplicationException("Failed creating sample grabber");<br />
<br />
grabberObj = Activator.CreateInstance(srvType);<br />
sg = (ISampleGrabber) grabberObj;<br />
grabberBase = (IBaseFilter) grabberObj;<br />
<br />
graph.AddFilter(sourceBase, "source");<br />
graph.AddFilter(grabberBase, "grabber");<br />
<br />
AMMediaType mt = new AMMediaType();<br />
mt.majorType = MediaType.Video;<br />
mt.subType = MediaSubType.RGB24;<br />
sg.SetMediaType(mt);<br />
<br />
if (graph.Connect(DSTools.GetOutPin(sourceBase, 0), DSTools.GetInPin(grabberBase, 0)) < 0)<br />
throw new ApplicationException("Failed connecting filters");<br />
<br />
if (sg.GetConnectedMediaType(mt) == 0)<br />
{<br />
VideoInfoHeader vih = (VideoInfoHeader) Marshal.PtrToStructure(mt.formatPtr, typeof(VideoInfoHeader));<br />
<br />
System.Diagnostics.Debug.WriteLine("width = " + vih.BmiHeader.Width + ", height = " + vih.BmiHeader.Height);<br />
grabber.Width = vih.BmiHeader.Width;<br />
grabber.Height = vih.BmiHeader.Height;<br />
mt.Dispose();<br />
}<br />
<br />
graph.Render(DSTools.GetOutPin(grabberBase, 0));<br />
<br />
sg.SetBufferSamples(false);<br />
sg.SetOneShot(false);<br />
sg.SetCallback(grabber, 1);<br />
<br />
IVideoWindow win = (IVideoWindow) graphObj;<br />
win.put_AutoShow(false);<br />
win = null;<br />
<br />
mc = (IMediaControl) graphObj;<br />
<br />
mc.Run();<br />
And the next
<br />
private class Grabber : ISampleGrabberCB<br />
{<br />
private int width, height;<br />
<br />
public int Width<br />
{<br />
get { return width; }<br />
set { width = value; }<br />
}<br />
public int Height<br />
{<br />
get { return height; }<br />
set { height = value; }<br />
}<br />
<br />
public Grabber()<br />
{<br />
}<br />
<br />
public int SampleCB(double SampleTime, IntPtr pSample)<br />
{<br />
return 0;<br />
}<br />
<br />
public int BufferCB(double SampleTime, IntPtr pBuffer, int BufferLen)<br />
{<br />
System.Drawing.Bitmap img = new Bitmap(width, height, PixelFormat.Format24bppRgb);<br />
<br />
BitmapData bmData = img.LockBits(<br />
new Rectangle(0, 0, width, height),<br />
ImageLockMode.ReadWrite,<br />
PixelFormat.Format24bppRgb);<br />
<br />
int srcStride = bmData.Stride;<br />
int dstStride = bmData.Stride;<br />
<br />
int dst = bmData.Scan0.ToInt32() + dstStride * (height - 1);<br />
int src = pBuffer.ToInt32();<br />
<br />
for (int y = 0; y < height; y++)<br />
{<br />
Win32.memcpy(dst, src, srcStride);<br />
dst -= dstStride;<br />
src += srcStride;<br />
}<br />
<br />
img.UnlockBits(bmData);<br />
<br />
<br />
img.Dispose();<br />
<br />
return 0;<br />
}<br />
}<br />
|
|
|
|
|
I have the name of a button in a string and wish to change the text of the button e.g:
CString strTemp="button1";
Button btnTmp=(Button)FindControl(strTemp);
btnTemp.Text="New text";
But I cannot get it to complile, whatever using clauses I try. It cannot find defininition for FindControl.
How can I get at my button control from my string in a non ASP application.
thanks,
|
|
|
|
|
This is because there is no FindControl in the object the code lives in. I am making a big assumption but I bet you are in a Form object of some sort. You can be confusing the System.Web.UI.Control and System.Windows.Forms.Control objects. Without any more information I can not help you.
Beyond that, there are a number of ways to traverse the widget tree. The form itself has a property Controls which is a control collection it contains.
ps. How can you possibly use CString ?
|
|
|
|
|
hi how are you all ?
this is my next message in this website great message board .
iam developing new chat messenger that uses all possible chat options such as text transfer between clients and webcam images and also audio voice transfer
i used the namespace DirectX.Capture.dll
for capturing vedio from my webcam and audio and it works thank god
but what i need is to transfer these images instantly between client and the other connected client in private chat with the webcam and audio and i don't know how it works if any has any solution for that please send me notification to my email address at
-----------------------------------
matrix_623@yahoo.com
snouto@phreaker.net
-----------------------------------
Please Send me any help with that i will be very thoughtful for you .
Miss With The Best And Die Like The Rest
|
|
|
|
|
Use something like .NET remoting. There are many examples of using remoting on this site and also on MSDN and others. I suggest you look there. Basically, you convert your image into a byte[], send the bytes over using remoting, then recreate the image on the client side from the byte[].
So search around for .NET remoting, you should find some interesting examples. FYI, .NET remoting isn't the only way to do this, but it is currently the recommended way if both applications are .NET desktop apps.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
I tried to develope a basic empty asp.net appliaction.
When i tried to run it by F5 it executes properly .Bt then i addes a simple UI button control and tested event handling for simple clik event .
When i press F5 ,it start the browser and shows a message in status bar 'Web site found...waiitng for reply'And it hangs there .Instead if i manually open the form thru browser ,it opens..
I dont understand wats the problem
|
|
|
|