|
Hi all,
I'm using a WebControl object in a .NET Compact Framework application dealing with a big amount of data (map database, images etc...).
I'm trying to play flash videos in the WebControl, however, in some cases,
when the swf file is more than 2 Mo, the video won't play and I get
just a blank widget.
I was first thinking that my PDA was out of resources, but I'm able to
launch Internet Explorer with the same video without any problem while
my app is running.
When I reduce the amount of resources used by my application the videos
is playing well. So it seems to be a memory allocation problem.
Is there any way to increase the amount of memory allocated to the
WebBrowser control ?
I'm coding in C# using CF 2.
Thanks in advance for your help,
Julien
|
|
|
|
|
Hi all,
i am trying to communicate with a virtual com port to get the input from a scanner(a USB device) using the system.io.ports class. i have opened the port (port.open), but when i try to scan some input, the program (using vb.net) won't trigger the DataReceived events, any idea how to get the input from the scanner? Thanks in advance!
elcheah
|
|
|
|
|
USB devices do not work that way. For a scanner, you should be using TWAIN or some other appropriate interface.
--
I've killed again, haven't I?
|
|
|
|
|
Thanks for your reply,
i have stucked there for a very ong time ,i have searched for TWAIN like you have suggested to me, but i am still lost, how to use TWAIN in vb.net? can you give me some guidelines or any tutorial site i can refer to? Thanks
|
|
|
|
|
There are articles about using TWAIN. Here's one now.[^]
--
I've killed again, haven't I?
|
|
|
|
|
Thanks for that article,
Is TWAIN for just image scanning? what about a bar code USB scanner? is that the same?
|
|
|
|
|
Yes, TWAIN is for image acquisition from imaging devices like scanners and digital cameras.
A bar code scanner, on the other hand, is not an imaging device. They could require one of many interfaces. Most USB bar code scanners emulate keyboard input. A simple way to test this, if the bar code scanner is set up, is to open Notepad, focus in the text area, and scan a bar code--like off a box of food or a book.
If, by "scanner" earlier, you meant a bar code scanner, and it supports a virtual COM port, then you can, in fact, use the SerialPort class to connect to that virtual COM port and translate that data as needed. I used SoftCom32 when I first started with a serial (RS232) bar code scanner; it's a tray app that does exactly that--monitors the COM port for data, then emulates keystrokes. I've since replaced it with a sloppy little number I wrote in C# to interface directly to my app, so I don't get stray scans.
--
I've killed again, haven't I?
|
|
|
|
|
I have tried to use the SerialPort class to connect the barcode scanner's virtual COM port, i can detect the scanner's COM port but i failed to read the input in my program. When i try to scan the DataReceived event is not triggered but i can read the input into the HyperTerminal in windows, Any idea how to do read the input of the barcode scanner in vb.net using that class? or is there any alternatives besides that? Thanks
|
|
|
|
|
I don't see any reason why VB wouldn't let you scan bar codes if C# will.
You can post your port opening code so we can take a look at it.
There are a couple simple things to check:
- Make sure your
ReceivedBytesThreshold isn't set to some ungodly high number (should default to 1) - Make sure you call
Open() after you create the port
If it will help, I can post my C# class code this evening when I get back to that computer, so you can see the way I did it. I took a threaded byte-at-a-time approach because the DataReceived events I got resulted in fragmented scans (e.g. scanning "1234567890" got broken up into two events, "123456" and "7890") and I was scanning variable-length bar codes, so I couldn't just set it to fire DataReceived after n bytes.
--
I've killed again, haven't I?
|
|
|
|
|
This is how I open a com port
<br />
With serialPort<br />
.ReceivedBytesThreshold = 1<br />
.PortName = "COM3"<br />
.BaudRate = 9600<br />
.Parity = IO.Ports.Parity.None<br />
.DataBits = 8<br />
.StopBits = IO.Ports.StopBits.One<br />
End With<br />
serialPort.Open()<br />
and detect my com port using
For i As Integer = 0 To My.Computer.Ports.SerialPortNames.Count - 1<br />
combobox.Items.Add(My.Computer.Ports.SerialPortNames(i)) <br />
Next
after i open the COM port, i try to scan in some input won't trigger DataReceived events, anything that i have done wrongly? or anything i should set?
|
|
|
|
|
for my data received events goes this way
<br />
Private Sub serialPort_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles serialPort.DataReceived<br />
Me.Invoke(New EventHandler(AddressOf DoUpdate))<br />
End Sub<br />
<br />
Private Sub DoUpdate(ByVal s As Object, ByVal e As EventArgs)<br />
txtDataReceived.Text = txtDataReceived.Text + serialPort.ReadExisting()<br />
End Sub<br />
anything i have done wrongly? please advice... Thanks
|
|
|
|
|
Hey, i got it worked, i just set the RtsEnable to true then it worked
serialPort.RtsEnable = True
Thanks for all your support
|
|
|
|
|
Congratulations!
Glad to be of (little) help.
It would have been ages before I would check the handshaking; my old serial bar code scanner works with the default of none.
--
I've killed again, haven't I?
|
|
|
|
|
Hi all,
Hope someone who's had experience releasing commercial software/shareware can help... I have a VB.Net 1.1 app that automates many Photoshop functions to allow people to process whole folders of images into various formats while adding borders, dropshadows, doing conversions to B&W, etc. (It does waaaaay more than that but that's not the point here!)
Anwyay, I now want to sell this app on various shareware sites and hope to ask US$19.95 (or thereabouts) but I want to allow a user to download it and either use it for a trial period then stop or else disable certain functionality (like only allowing a max of 5 of the resulting images to be saved etc) until they download and pay for the licensed version. I also need to protect the software from disassembly/reverse engineering and also want do some sort of install/uninstall package.
I'm quite an experienced .Net developer but I've never had to do any of the above stuff for a commercial product - anyone know of any good resources to tell where to get started and best practices, etc?
TIA for any help/suggestions...
Mike
-- modified at 0:08 Monday 29th May, 2006
|
|
|
|
|
Does no-one have any input on this? Surely there must be a few shareware authors out there that could get me started with a few suggestion or recommendations?
|
|
|
|
|
http://www.siliconrealms.com/[^]
Well worth the money.
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
|
In my app i've to add a custom simple string property to columns collection such as:
datagridview1.columns(0).myproperty = "mystring"
i'm using vb2005
any suggestion?
|
|
|
|
|
Which library should you use for editing, playing ect. media files in Windows Vista?
Is DirectShow discontinued in DirectX10?
Will .NET 2.0 be included in Win Vista?
Programming is like Mathematics… you take ONE step at the time!
|
|
|
|
|
Friends!
I've two managed executables in my machine both target the similar version of CLR. I run the first application, the CLR gets loaded and runs my application. Now first application is running and at the same time i launch the second application.
As such whether the new copy of CLR gets loaded OR CLR is loaded only once and previous copy is resued ?
Imtiaz
|
|
|
|
|
I believe that's not going to be true for never versions of the CLR but the current version of .NET Runtime implemented as the InProc COM server.
That means that each managed executable creates a process and CLR loaded into this version.
That effectively means that new copy of CRL created for each copy of application.
Best regards,
-----------
Igor Sukhovhttp://sukhov.net
|
|
|
|
|
Dear All,
Please send me code snippet, tutorial or anythings which discribe how to use microsoft reporting service technology to generate reports within vb.net....? Thanks before.
|
|
|
|
|
|
Hi All,
I am building VB.NET web form application which access Web Service. I am wondering why the VB.NET send two packets to request the to the web service.
First packet:
POST /webservice/webservice1.asmx HTTP/1.1
SOAPAction: "http://webservice1/insUserName"
Content-length: xxx
Expect: 100-continue
Host: 192.168.1.1
Response from the web service:
HTTP/1.1 100 Continue
Date: ...
Second packet:
<xml version="1.0" encoding="utf-8">
Response from the web service:
HTTP/1.1 200 OK
...
I am wondering if there is a way that this packet can be just one packet,
such as:
POST /webservice/webservice1.asmx HTTP/1.1
SOAPAction: "http://webservice1/insUserName"
Content-length: xxx
Expect: 100-continue
Host: 192.168.1.1
<xml version="1.0" encoding="utf-8">
I am using VS 2003 with .NET 1.1
Thanks and best regards,
Riwan
|
|
|
|
|
I am trying to implement double buffering in a form, and I am getting a crash. I have a fix for the crash but I don't know if it's "correct".
To enable double buffering, I call this function from the form's constructor:
System::Void enable_double_buffering()
{
using System::Windows::Forms::ControlStyles;
SetStyle(static_cast<ControlStyles>(ControlStyles::DoubleBuffer |
ControlStyles::UserPaint |
ControlStyles::AllPaintingInWmPaint),
true);
UpdateStyles();
}
My Paint handler looks like this:
System::Void PlotDisplayWindow_Paint(System::Object* , System::Windows::Forms::PaintEventArgs* e)
{
using System::Drawing::Graphics;
Graphics* g = e->Graphics;
g->Dispose();
}
If I do not enable double buffering, then it works fine, but with flickering. With double buffering, I get the following exception:
************** Exception Text **************
System.ArgumentException: Invalid parameter used.
at System.Drawing.Graphics.EndContainer(GraphicsContainer container)
at System.Windows.Forms.DibGraphicsBufferManager.ReleaseBuffer(GraphicsBuffer buffer)
at System.Windows.Forms.GraphicsBuffer.Dispose()
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
If I comment out the g->Dispose(); line in the Paint handler, then I do not get the crash. Is it correct/acceptable not to dispose of the Graphics object after painting?
--
Marcus Kwok
|
|
|
|