|
Ok, Thanks for the answer.
Now I have to decide on either using MDX or sticking with GDI+ and skipping the video background feature
Yours Sincerely
/Rickard Haake
Bachelor of Science in Software development, but functioning as a
Youth Minister in the Mission Covenant Church of Sweden
|
|
|
|
|
Friends,
Is is possible in .NET to safely download and execute a code remotely ? (something like JINI in JAVA)? If yes, then how ?
Imtiaz
|
|
|
|
|
Hello,
I am developing my project, which is 3-tier architecture. I have a doubt in this architecture. As the Data Access component is unavailable to the UI layer, how can I work with the transaction states?
Because, as it is not possible to get the data access procedures are not available at UI layer, it is not possible at UI layer to Begin the transaction state and finally to commit the transation state.
Is it possible to handle the transaction state in the 3-tier architecture? I need your suggestions.
Thanks in advance.
With Regards,
Sheshadrinath.R
|
|
|
|
|
The best would be to handle the transaction entirey from the business layer, as it's all about business logic, not user interaction.
If that is not possible, you can create methods in the business layer for handling the transactions, and expose them to the UI layer. As the UI layer does not directly handle the transactions, it's an acceptable solution.
---
b { font-weight: normal; }
|
|
|
|
|
I am working on a binary clock program and have the logistics worked out and it "seems" to work. The only thing I am having trouble with is how to put it in the system tray over top of the windows clock. I guess I am looking for it to be a "skin" of sorts. So if I double-click on it, it still brings up the Date and Time. Anyone out there know where in the registry/system settings I can change it?
Bowlermonk
|
|
|
|
|
bowlermonk wrote: Anyone out there know where in the registry/system settings I can change it
[chuckles lightly] If only it was that easy! There's nothing in the registry that has anything to to with the clock, save for a single value. This value only specified whether the time will be displayed in 12hr or 24hr format. Nothing more...
Replacing the system tray clock is, by no means, easy. It involves finding the clock's window, getting it's thread, setting a hook to capture messages going to that window (which can't be done in Managed Code!), subclassing the window, and essentially bumping the real clock out of the way and taking over rendering of its window.
You can find a C++ (no .NET) example on SourceForge, I think it's called WinCalendarTime...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the quick respone. I guess I will be coming up with a different idea, rather than the system tray. I tell you, I love this site!
Bowlermonk
|
|
|
|
|
Quite possibly the best System Tray Clock replacement on the planet -> http://www.drive-software.com/[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello all,
I am trying to create a video capture app using the windows media encoder9 sdk in visual studio 2003 .net a windows form project. using c++
and don't understand why this function call
CoCreateInstance(CLSID_WMEncoder,NULL,CLSCTX_INPROC_SERVER,IID_IWMEncoder2,(void**)&g_pEncoder);
will work perfectly fine in button1_click function (ie the g_pEncoder gets a value) but if I call the same function in the thread "mainloop" g_pEncoder comes back as not defined.
I have illiminated a lot of code ie: defines, includes etc. to save space.
Thanks for your time.
IWMEncoder2* g_pEncoder; //Global Variable
namespace TestingMyService
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
public __gc class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
}
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
private:
System::ComponentModel::Container * components;
void InitializeComponent(void)
{
}
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)
{
CoCreateInstance(CLSID_WMEncoder,NULL,CLSCTX_INPROC_SERVER,IID_IWMEncoder2,(void**)&g_pEncoder);
Threading::ThreadStart* threadstart = new Threading::ThreadStart(this,mainloop);
servicethread = new Threading::Thread(threadstart);
servicethread->Start();
}
public: static void mainloop(void)
{
CoCreateInstance(CLSID_WMEncoder,NULL,CLSCTX_INPROC_SERVER,IID_IWMEncoder2,(void**)&g_pEncoder);
}
|
|
|
|
|
Heyas all,
Is it possible, using the .NET framework, to programmatically determine if there is text in a textbox control or not. Say just a simple Bool value or something similiar. Basically I'm trying to build a query string dependant on what textboxes have text in them, if a textbox has text then include that text in the query if not, ignore completely. Is this possible or should I be going a completely different route?
Thanks,
John
|
|
|
|
|
Whatever textbox control you are talking about (web, windows or mobile), it has a Text property that you can use to get the text in the textbox. Simply check if the length of the string is zero or not.
---
b { font-weight: normal; }
|
|
|
|
|
That would work perfectly, thanks a lot guffa
Thanks,
John
|
|
|
|
|
Or simply check that the TextLength property is greater than zero.
--
I've killed again, haven't I?
|
|
|
|
|
TextBox1.Text.Equals("") may solve it
or use TextBox1.Text.Length
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshres
http://himabinduvejella.blogspot.com
|
|
|
|
|
Hello,
I am developing an application controlling various devices using a COM, dll or library.
The application is unique and must support any type of device. It is therefore built with all the dlls, COMs / interops that may be used.
However, only the dll, COM, library corresponding to the available device is installed when the product is deployed.
How can I prevent getting an error when the application starts because the unused dlls, (COMs + interops) or assemblies are missing, and then make sure I do not call them later on?
Thanks in advance for your help.
Michel
|
|
|
|
|
hi,
i have just downloaded sql ce from the microsoft website..but after installing it isn't working..nothing happens on my desktop let alone ppc. so is it required to have sql server for desktop b4 using sql ce? ..is there any tutorial on how to install or code that?
thanks..
|
|
|
|
|
SQL Server CE is an in-process database engine more like Microsoft Access than a standalone database server like the desktop SQL Server. Nothing much happens on your device until you deploy or debug your application, when Visual Studio will copy the device runtime components to the device.
I don't recall having to download anything separately from Microsoft before using SQL Server CE with VS.NET 2003. From what I recall the appropriate bits are installed when you install Smart Device support.
To create a new database, create a new instance of the SqlCeEngine class and call the CreateDatabase method. Don't forget to Dispose the SqlCeEngine object when you're done. You'll generally create your tables using SQL DDL statements; for this you'll need a SqlCeConnection , a SqlCeCommand , and use the ExecuteNonQuery method. Again, these objects need to be Disposed when you're finished using them. A using block (in C# and VB 2005) is very useful in ensuring you clean up properly since it automatically calls Dispose for you.
Programming for data access with SQL Server CE is very much like programming for the desktop - you simply use SqlCeConnection where you would use SqlConnection , etc. The SqlConnection class in Compact Framework is used for remote access to a SQL Server 2000 server, if you want to do that.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hello all,
I am trying to create a Smart Mobile/GPS application using .Net 2003 framework. In addition for the GPS support I am using OpenNETCF SDK 1.4 library. I am having problems reading in data from the GPS . The following is my code snippet:
private void button1_Click(object sender, System.EventArgs e)
{
gps.BaudRate = OpenNETCF.IO.Serial.BaudRates.CBR_9600;
gps.ComPort = "COM1:";
textBox1.Text = gps.ToString() + "\n";
gps.GpsSentence += new OpenNETCF.IO.Serial.GPS.GPS.GpsSentenceEventHandler(gps_GpsSentence);
gps.GpsCommState += new OpenNETCF.IO.Serial.GPS.GPS.GpsCommStateEventHandler(gps_GpsCommState);
gps.Start();
}
private void gps_GpsSentence(object sender,GpsSentenceEventArgs e)
{
MessageBox.Show("calling");
textBox1.Text += "calling" ;
textBox1.Text += e.Sentence + " ";
}
private void gps_GpsCommState(object sender,GpsCommStateEventArgs e)
{
switch(e.State)
{
case OpenNETCF.IO.Serial.GPS.States.Running:
textBox1.Text += "GPS Started";
break;
case OpenNETCF.IO.Serial.GPS.States.Stopped:
textBox1.Text += "GPS Stop";
break;
}
}
When I run the code using a pocket PC emulator , the code fires gps_GpsCommState event (it always shows the message GPS started even when its not connected) , and more importantly it does not fire the gps_GpsSentence event ever. What is the problem?? Could anyone help me out with this. I would be greatly obliged. If you of any other way to read in data pls lemme know. Also let me know what is the problem with the code.
|
|
|
|
|
I have been having trouble publishing my assembly to a server on the network. Sometimes it says:
Failed to copy file 'filename\setup.exe' to 'servername\setup.exe'. Unable to add 'setup.exe' to the Web. The file 'setup.exe' already exists in this Web.
When I try go to the actual file on the server, it says that the file cannot be modified as somebody has it in use. But nobody on the network is using it, and it only says it after I try to republish the build. Sometimes it doesn't complain at all, anybody know how to fix this?
|
|
|
|
|
So I want to write a .NET application to show and save video streams frmo an ip camera. But I'm having some troubles getting started. Should I look for an Axis camera so I'd be able to use their api (http://www.axis.com/techsup/cam_servers/dev/index.htm)
or will I be fine accessing the video stream using directshow or whatnot using any other camera :-s ?
|
|
|
|
|
I have a camera hooked up to an Axis 241Q. Axis has an SDK that is killer - can supply MJPEG, MPG4... There is also code to record the video coming from the IP camera. I have tweaked the code so my camera's IP is always in the textbox. I launch my program and get the viewer, then press a button I added to launch the recorder minimized.
Now, if I could just get the video to the web......
xlthim
|
|
|
|
|
I have been thinking of making a C# program that would make an image of a small area of the screen (through BitBlt in gdi32.dll), apply a transformation on it (like maybe negative the colors, or tinting brighter or darker), and then putting it in a (TopMost=true) form over the original area. I plan on updating by periodically hiding the form, retaking the image, and re-showing the form again. Up to now not too complicated. Here's where I can't figure out what to do: I would like to still be able to interact with any windows underneath the form as if the form wasn't there, at least for mouse clicks if not also keystrokes.
So basically, how would one go about making a Form "transparent" to clicks and/or keystrokes?
(I know the whole idea might seem impractical, and I doubt the performance would be that great, but it's an interesting idea that i've been itching to try out for a while now.)
Also, any suggestions/ideas/constructive criticisms are more than welcome, since I am over-extending my technological comfort zone on this project.
|
|
|
|
|
Lucky you! I wrote an article on doing just that. You can find it here[^] on CP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Wow, exactly what I was wondering about!
Thanks a lot man!
Up till now the only thing I had found that was relevant were these short directions:
"Assuming there are no controls on the form,
override the WndProc of the form, respond to the WM_NCHITTEST message and
return HTTRANSPARENT."
Which needless to say was pretty much greek to me.
Your article on the other hand is neat, clear, and easy to understand.
Thanks again! ^_^
|
|
|
|
|
TheZeusJuice wrote: Your article on the other hand is neat, clear, and easy to understand.
Hey, Thanks!
TheZeusJuice wrote: Assuming there are no controls on the form,
override the WndProc of the form, respond to the WM_NCHITTEST message and
return HTTRANSPARENT."
This is just an alternate method of "punch a hole through your form", as far as the mouse is concerned.
What this means is that you're capturing the WM_MCHITTEST message comming from Windows. What it wants is for you to use the mouse coordinates, provided by Windows, and check those against your window to see if the mouse actually clicked on something in YOUR window. It's entirely up to you if the mouse did or, more importantly, didn't hit something on your form. If it did NOT hit something, you set a return code to the value of HTTRANSPARENT.
You can find the values of both of these constants somewhere in the *.H header files in the Platform SDK.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|